linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: zhengjun.xing@linux.intel.com, peterz@infradead.org,
	mingo@redhat.com, alexander.shishkin@intel.com, jolsa@redhat.com,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	adrian.hunter@intel.com, ak@linux.intel.com,
	kan.liang@linux.intel.com
Subject: Re: [PATCH] perf jevents: Fix event syntax error caused by ExtSel
Date: Thu, 26 May 2022 12:25:35 -0300	[thread overview]
Message-ID: <Yo+b79zg9hsS0H9Q@kernel.org> (raw)
In-Reply-To: <CAP-5=fUm4G043v6-pToBiT-psxt-_r4kxtsWwkjLh=ARmhmP_A@mail.gmail.com>

Em Wed, May 25, 2022 at 07:27:08AM -0700, Ian Rogers escreveu:
> On Wed, May 25, 2022 at 7:04 AM <zhengjun.xing@linux.intel.com> wrote:
> >
> > From: Zhengjun Xing <zhengjun.xing@linux.intel.com>
> >
> > In the origin code, when "ExtSel" is 1, the eventcode will change to
> > "eventcode |= 1 << 21”. For event “UNC_Q_RxL_CREDITS_CONSUMED_VN0.DRS",
> > its "ExtSel" is "1", its eventcode will change from 0x1E to 0x20001E,
> > but in fact the eventcode should <=0x1FF, so this will cause the parse
> > fail:
> >
> >   # perf stat -e "UNC_Q_RxL_CREDITS_CONSUMED_VN0.DRS" -a sleep 0.1
> > event syntax error: '.._RxL_CREDITS_CONSUMED_VN0.DRS'
> >                                   \___ value too big for format, maximum is 511
> >
> > On the perf kernel side, the kernel assumes the valid bits are continuous.
> > It will adjust the 0x100 (bit 8 for perf tool) to bit 21 in HW.
> >
> > DEFINE_UNCORE_FORMAT_ATTR(event_ext, event, "config:0-7,21");
> >
> > So the perf tool follows the kernel side and just set bit8 other than bit21.
> >
> > Fixes: fedb2b518239 ("perf jevents: Add support for parsing uncore json files")
> > Signed-off-by: Zhengjun Xing <zhengjun.xing@linux.intel.com>
> > Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
> 
> Acked-by: Ian Rogers <irogers@google.com>

Thanks, applied.

- Arnaldo


      reply	other threads:[~2022-05-26 15:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 14:04 [PATCH] perf jevents: Fix event syntax error caused by ExtSel zhengjun.xing
2022-05-25 14:27 ` Ian Rogers
2022-05-26 15:25   ` 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=Yo+b79zg9hsS0H9Q@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=zhengjun.xing@linux.intel.com \
    /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).