lkml.org 
[lkml]   [2021]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 4/8] perf cs-etm: Fix bitmap for option
Em Tue, Feb 09, 2021 at 09:58:55AM +0800, Leo Yan escreveu:
> On Mon, Feb 08, 2021 at 01:46:41PM -0700, Mathieu Poirier wrote:
> > On Sat, Feb 06, 2021 at 11:08:29PM +0800, Leo Yan wrote:
> > > From: Suzuki K Poulose <suzuki.poulose@arm.com>
> > >
> > > When set option with macros ETM_OPT_CTXTID and ETM_OPT_TS, it wrongly
> > > takes these two values (14 and 28 prespectively) as bit masks, but
> > > actually both are the offset for bits. But this doesn't lead to
> > > further failure due to the AND logic operation will be always true for
> > > ETM_OPT_CTXTID / ETM_OPT_TS.
> > >
> > > This patch defines new independent macros (rather than using the
> > > "config" bits) for requesting the "contextid" and "timestamp" for
> > > cs_etm_set_option().
> > >
> > > [leoy: Extract the change as a separate patch for easier review]
> >
> > This should go just above your name - see below.

I fixed this up and added this patch to my perf/urgent branch, for
v5.12, since the kernel bits are upstream and this is a fix.

Looking at the other patches in the series.

- Arnaldo

> > > Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> > > Signed-off-by: Leo Yan <leo.yan@linaro.org>
> > > Reviewed-by: Mike Leach <mike.leach@linaro.org>
> >
> > Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> > [Extract the change as a separate patch for easier review]
> > Signed-off-by: Leo Yan <leo.yan@linaro.org>
> > Reviewed-by: Mike Leach <mike.leach@linaro.org>
> >
> > > ---
> > > tools/perf/arch/arm/util/cs-etm.c | 12 ++++++++----
> > > 1 file changed, 8 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c
> > > index bd446aba64f7..c25c878fd06c 100644
> > > --- a/tools/perf/arch/arm/util/cs-etm.c
> > > +++ b/tools/perf/arch/arm/util/cs-etm.c
> > > @@ -156,6 +156,10 @@ static int cs_etm_set_timestamp(struct auxtrace_record *itr,
> > > return err;
> > > }
> > >
> > > +#define ETM_SET_OPT_CTXTID (1 << 0)
> > > +#define ETM_SET_OPT_TS (1 << 1)
> > > +#define ETM_SET_OPT_MASK (ETM_SET_OPT_CTXTID | ETM_SET_OPT_TS)
> > > +
> >
> > I would much rather see this fixed with the BIT() macro as it is done in the
> > rest of this set than defining new constant.
> >
> > With the above:
> >
> > Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> >
> > I have picked up the kernel portion of this set. I suggest you fix the above
> > and send another revision to Arnaldo with my RBs.
>
> Will do this. Thanks for suggestion, Mathieu.
>
> Leo
>
> [...]

--

- Arnaldo

\
 
 \ /
  Last update: 2021-03-05 18:31    [W:0.115 / U:1.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site