[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210119023207.GA6483@leoy-ThinkPad-X240s>
Date: Tue, 19 Jan 2021 10:32:07 +0800
From: Leo Yan <leo.yan@...aro.org>
To: Mathieu Poirier <mathieu.poirier@...aro.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
John Garry <john.garry@...wei.com>,
Will Deacon <will@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Daniel Kiss <Daniel.Kiss@....com>,
Denis Nikitin <denik@...omium.org>, coresight@...ts.linaro.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Al Grant <al.grant@....com>
Subject: Re: [PATCH v1 2/7] perf cs_etm: Use pid tracing explicitly instead
of contextid
Hi Mathieu,
On Fri, Jan 15, 2021 at 03:44:16PM -0700, Mathieu Poirier wrote:
> On Sat, Jan 09, 2021 at 03:44:30PM +0800, Leo Yan wrote:
> > From: Suzuki K Poulose <suzuki.poulose@....com>
> >
> > If the kernel is running at EL2, the pid of the task is exposed
> > via VMID instead of the CONTEXTID. Add support for this in the
> > perf tool.
> >
> > By default the perf tool requests contextid and timestamp for
> > task bound events. Instead of hard coding contextid, switch
> > to "pid" config exposed by the kernel. While at it, define new
> > independent macros (rather than using the "config" bits) for
> > requesting the "pid" and "timestamp" for cs_etm_set_option(),
> > since the PID config is now dynamic depending on the kernel
> > exception level.
> >
> > Cc: Mike Leach <mike.leach@...aro.org>
> > Cc: Mathieu Poirier <mathieu.poirier@...aro.org>
> > Cc: Al Grant <al.grant@....com>
> > Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
> > Signed-off-by: Leo Yan <leo.yan@...aro.org>
> > ---
> > tools/include/linux/coresight-pmu.h | 11 +++--
> > tools/perf/arch/arm/util/cs-etm.c | 68 ++++++++++++++++++++++-------
> > 2 files changed, 59 insertions(+), 20 deletions(-)
> >
> > diff --git a/tools/include/linux/coresight-pmu.h b/tools/include/linux/coresight-pmu.h
> > index b0e35eec6499..927c6285ce5d 100644
> > --- a/tools/include/linux/coresight-pmu.h
> > +++ b/tools/include/linux/coresight-pmu.h
> > @@ -11,16 +11,19 @@
> > #define CORESIGHT_ETM_PMU_SEED 0x10
> >
> > /* ETMv3.5/PTM's ETMCR config bit */
> > -#define ETM_OPT_CYCACC 12
> > -#define ETM_OPT_CTXTID 14
> > -#define ETM_OPT_TS 28
> > -#define ETM_OPT_RETSTK 29
> > +#define ETM_OPT_CYCACC 12
> > +#define ETM_OPT_CTXTID 14
> > +#define ETM_OPT_CTXTID_IN_VMID 15
> > +#define ETM_OPT_TS 28
> > +#define ETM_OPT_RETSTK 29
> >
> > /* ETMv4 CONFIGR programming bits for the ETM OPTs */
> > #define ETM4_CFG_BIT_CYCACC 4
> > #define ETM4_CFG_BIT_CTXTID 6
> > +#define ETM4_CFG_BIT_VMID 7
> > #define ETM4_CFG_BIT_TS 11
> > #define ETM4_CFG_BIT_RETSTK 12
> > +#define ETM4_CFG_BIT_VMID_OPT 15
>
> Wasn't this done in the previous patch?
In the previous patch, these bits are defined in the kernel's header
include/linux/coresight-pmu.h; at here it defines the same bits in
tool's header.
To be honest, I struggled to understand your suggestions, finally I
think it's feasbile and we can simplify the implementation. I will
try to refine the patch series for the review.
Appreciate for good suggestions!
Leo
Powered by blists - more mailing lists