All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf tools: Add missing Intel CPU events to parser
Date: Wed, 25 Mar 2020 10:15:49 -0300	[thread overview]
Message-ID: <20200325131549.GB14102@kernel.org> (raw)
In-Reply-To: <20200325103345.GA1856035@krava>

Em Wed, Mar 25, 2020 at 11:33:45AM +0100, Jiri Olsa escreveu:
> On Tue, Mar 24, 2020 at 05:04:43PM +0200, Adrian Hunter wrote:
> > perf list expects CPU events to be parseable by name, e.g.

> >     # perf list | grep el-capacity-read
> >       el-capacity-read OR cpu/el-capacity-read/          [Kernel PMU event]

> > But the event parser does not recognize them that way, e.g.

> >     # perf test -v "Parse event"
> >     <SNIP>
> >     running test 54 'cycles//u'
> >     running test 55 'cycles:k'
> >     running test 0 'cpu/config=10,config1,config2=3,period=1000/u'
> >     running test 1 'cpu/config=1,name=krava/u,cpu/config=2/u'
> >     running test 2 'cpu/config=1,call-graph=fp,time,period=100000/,cpu/config=2,call-graph=no,time=0,period=2000/'
> >     running test 3 'cpu/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks',period=0x1,event=0x2/ukp'
> >     -> cpu/event=0,umask=0x11/
> >     -> cpu/event=0,umask=0x13/
> >     -> cpu/event=0x54,umask=0x1/
> >     failed to parse event 'el-capacity-read:u,cpu/event=el-capacity-read/u', err 1, str 'parser error'
> >     event syntax error: 'el-capacity-read:u,cpu/event=el-capacity-read/u'
> >                            \___ parser error test child finished with 1
> >     ---- end ----
> >     Parse event definition strings: FAILED!

> > Fix by adding missing Intel CPU events to the event parser.
> > Missing events were found by using:

> >     grep -r EVENT_ATTR_STR arch/x86/events/intel/core.c
> > 
> > Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> 
> Acked-by: Jiri Olsa <jolsa@redhat.com>

So, I'm not being able to reproduce this, what an I missing?

[root@seventh ~]# grep -m1 'model name' /proc/cpuinfo
model name	: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
[root@seventh ~]#

[root@seventh ~]# perf list | grep el-capacity
  el-capacity OR cpu/el-capacity/                    [Kernel PMU event]
[root@seventh ~]# perf test -v "Parse event" |& grep el-capacity
el-capacity -> cpu/event=0x54,umask=0x2/
[root@seventh ~]# perf stat -e el-capacity:u,cpu/event=el-capacity/u
^C
 Performance counter stats for 'system wide':

                 0      el-capacity:u
                 0      cpu/event=el-capacity/u

       2.315736828 seconds time elapsed


[root@seventh ~]#

[root@seventh ~]# perf test -v "Parse event" |& grep el-capacity -B5
running test 55 'cycles:k'
running test 0 'cpu/config=10,config1,config2=3,period=1000/u'
running test 1 'cpu/config=1,name=krava/u,cpu/config=2/u'
running test 2 'cpu/config=1,call-graph=fp,time,period=100000/,cpu/config=2,call-graph=no,time=0,period=2000/'
running test 3 'cpu/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks',period=0x1,event=0x2/ukp'
el-capacity -> cpu/event=0x54,umask=0x2/
[root@seventh ~]# perf test -v "Parse event" |& grep el-capacity -B5 -A5
running test 55 'cycles:k'
running test 0 'cpu/config=10,config1,config2=3,period=1000/u'
running test 1 'cpu/config=1,name=krava/u,cpu/config=2/u'
running test 2 'cpu/config=1,call-graph=fp,time,period=100000/,cpu/config=2,call-graph=no,time=0,period=2000/'
running test 3 'cpu/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks',period=0x1,event=0x2/ukp'
el-capacity -> cpu/event=0x54,umask=0x2/
el-conflict -> cpu/event=0x54,umask=0x1/
el-start -> cpu/event=0xc8,umask=0x1/
tx-abort -> cpu/event=0xc9,umask=0x4/
topdown-slots-issued -> cpu/event=0xe,umask=0x1/
tx-capacity -> cpu/event=0x54,umask=0x2/
[root@seventh ~]#

  reply	other threads:[~2020-03-25 13:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 15:04 [PATCH] perf tools: Add missing Intel CPU events to parser Adrian Hunter
2020-03-25 10:33 ` Jiri Olsa
2020-03-25 13:15   ` Arnaldo Carvalho de Melo [this message]
2020-03-25 13:53     ` Jiri Olsa
2020-03-25 14:22       ` Arnaldo Carvalho de Melo
2020-03-25 14:24         ` Adrian Hunter
2020-03-25 15:22           ` Jiri Olsa
2020-03-25 17:10             ` Adrian Hunter
2020-03-25 17:44               ` Jiri Olsa
2020-03-26  8:01                 ` [PATCH V2] " Adrian Hunter
2020-03-26  9:25                   ` Jiri Olsa
2020-03-31 19:13                     ` Arnaldo Carvalho de Melo
2020-04-04  8:41                   ` [tip: perf/urgent] perf events parser: " tip-bot2 for Adrian Hunter

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=20200325131549.GB14102@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.