From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5419AC433EF for ; Mon, 11 Oct 2021 14:00:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3BA666121E for ; Mon, 11 Oct 2021 14:00:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238856AbhJKOCq (ORCPT ); Mon, 11 Oct 2021 10:02:46 -0400 Received: from foss.arm.com ([217.140.110.172]:56384 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238353AbhJKOAp (ORCPT ); Mon, 11 Oct 2021 10:00:45 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A31FB101E; Mon, 11 Oct 2021 06:58:45 -0700 (PDT) Received: from [10.1.31.146] (e127744.cambridge.arm.com [10.1.31.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 44E453F694; Mon, 11 Oct 2021 06:58:43 -0700 (PDT) Subject: Re: [RFC] perf arm-spe: Track task context switch for cpu-mode events To: Namhyung Kim Cc: Leo Yan , James Clark , Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , LKML , Andi Kleen , Ian Rogers , Stephane Eranian , Adrian Hunter References: <20210916001748.1525291-1-namhyung@kernel.org> <20210916135418.GA383600@leoy-ThinkPad-X240s> <20210923142305.GA603008@leoy-ThinkPad-X240s> <363c4107-fc6f-51d0-94d8-a3f579c8f5a2@arm.com> <20211004062638.GB174271@leoy-ThinkPad-X240s> <20211006093620.GA14400@leoy-ThinkPad-X240s> From: German Gomez Message-ID: <87dad53f-a9a5-cd36-7348-ee10f4edd8fb@arm.com> Date: Mon, 11 Oct 2021 14:58:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Namhyung, On 09/10/2021 01:12, Namhyung Kim wrote: > Hi German, > > On Fri, Oct 8, 2021 at 4:08 AM German Gomez wrote: > > [...] > > I think we should use context-switch even for kernel samples, but > only if the context packets are not available. > > Thanks, > Namhyung I think I agree with that you say. If --switch-events is not enabled by default like you mention, an user could opt-in to using the fallback if there's no better option for kernel tracing yet. @Leo, what are your thoughts on this? Perhaps adding a warning message to tell the user to please enable context packets, otherwise the results will have workload-dependant inaccuracies, could be a good enough compromise? Thanks, German