From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Leo Yan <leo.yan@linaro.org>
Cc: Wei Li <liwei391@huawei.com>, Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
James Clark <james.clark@arm.com>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
guohanjun@huawei.com
Subject: Re: [PATCH] perf: arm-spe: Fix check error when synthesizing events
Date: Thu, 20 Aug 2020 09:28:30 -0300 [thread overview]
Message-ID: <20200820122830.GC2667554@kernel.org> (raw)
In-Reply-To: <20200724083218.GA5185@leoy-ThinkPad-X240s>
Em Fri, Jul 24, 2020 at 04:32:18PM +0800, Leo Yan escreveu:
> Hi Wei,
>
> On Fri, Jul 24, 2020 at 03:26:28PM +0800, Wei Li wrote:
> > In arm_spe_read_record(), when we are processing an events packet,
> > 'decoder->packet.index' is the length of payload, which has been
> > transformed in payloadlen(). So correct the check of 'idx'.
> >
> > Signed-off-by: Wei Li <liwei391@huawei.com>
>
> Good catch. I checked the ARMv8 ARM and the function payloadlen(),
> can confirm the fixing is correct.
>
> Reviewed-by: Leo Yan <leo.yan@linaro.org>
Thanks, applied.
- Arnaldo
> > ---
> > tools/perf/util/arm-spe-decoder/arm-spe-decoder.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
> > index 302a14d0aca9..93e063f22be5 100644
> > --- a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
> > +++ b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
> > @@ -182,15 +182,15 @@ static int arm_spe_read_record(struct arm_spe_decoder *decoder)
> > if (payload & BIT(EV_TLB_ACCESS))
> > decoder->record.type |= ARM_SPE_TLB_ACCESS;
> >
> > - if ((idx == 1 || idx == 2 || idx == 3) &&
> > + if ((idx == 2 || idx == 4 || idx == 8) &&
> > (payload & BIT(EV_LLC_MISS)))
> > decoder->record.type |= ARM_SPE_LLC_MISS;
> >
> > - if ((idx == 1 || idx == 2 || idx == 3) &&
> > + if ((idx == 2 || idx == 4 || idx == 8) &&
> > (payload & BIT(EV_LLC_ACCESS)))
> > decoder->record.type |= ARM_SPE_LLC_ACCESS;
> >
> > - if ((idx == 1 || idx == 2 || idx == 3) &&
> > + if ((idx == 2 || idx == 4 || idx == 8) &&
> > (payload & BIT(EV_REMOTE_ACCESS)))
> > decoder->record.type |= ARM_SPE_REMOTE_ACCESS;
> >
> > --
> > 2.17.1
> >
--
- Arnaldo
prev parent reply other threads:[~2020-08-20 12:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 7:26 [PATCH] perf: arm-spe: Fix check error when synthesizing events Wei Li
2020-07-24 8:32 ` Leo Yan
2020-08-18 3:45 ` liwei (GF)
2020-08-20 12:28 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200820122830.GC2667554@kernel.org \
--to=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=guohanjun@huawei.com \
--cc=james.clark@arm.com \
--cc=jolsa@redhat.com \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liwei391@huawei.com \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).