lkml.org 
[lkml]   [2014]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: perf: Add support for full Intel event lists v7
Thanks for testing.

On Tue, Jul 08, 2014 at 11:43:11AM -0700, Sukadev Bhattiprolu wrote:
> | The JSON format and perf parser has some minor Intelisms, but they
> | are simple and small and optional. It's easy to extend, so it would be
> | possible to use it for other CPUs too, add different pmu attributes, and
> | add new download sites to the downloader tool.
>
> Is there a minimal set of JSON entries an architecture would need ?

That should be enough, assuming the EventCode is enough to select
the event.

>
> I tried the following on Power
> [
> {
> "EventCode": "2",
> "EventName": "PM_INST_CMPL",
> "BriefDescription": "Instructions completed",
> "PublicDescription": "Number of PPC instructions finished",
> },
> {
> "EventCode": "0x1E",
> "EventName": "PM_CYC",
> "BriefDescription": "Cycles completed",
> "PublicDescription": "Number of PPC cycles finished",
> }
> ]
>
> /tmp/perf record --events-file=/tmp/power8.json -e PM_INST_CMPL sleep 1
>
> works, but for some TBD reason,
>
> /tmp/perf list --events-file=/tmp/power8.json doesn't list PM_INST_CMPL.

Works for me with your input file:

% perf list --events-file t.json
...
pm_cyc [Cycles completed]
pm_inst_cmpl [Instructions completed]


> Another observation was that the order of --events-file and -e is significant.
> Maybe worth a note in the man page.

Will add.

> Can you specify the qualifiers like ':k' or ':ku' with the events on
> Intel ?
>to only monitor kernel or user ? Or do they need some additional JSON
> entries ?

They can be all specified.


> With the above events file, I get "invalid event" for 'PM_INST_CMPL:u'

It works in new style syntax, like

perf stat --events-file t.json -e cpu/pm_inst_cmpl/u ls


Thanks,
-Andi

--
ak@linux.intel.com -- Speaking for myself only.


\
 
 \ /
  Last update: 2014-07-08 22:21    [W:0.244 / U:2.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site