[PATCH 2/4] perf: jevents: Program to convert JSON file to C style file
ak at linux.intel.com
Fri May 29 01:39:11 AEST 2015
> So instead of this flat structure, there should at minimum be broad categorization
> of the various parts of the hardware they relate to: whether they relate to the
> branch predictor, memory caches, TLB caches, memory ops, offcore, decoders,
> execution units, FPU ops, etc., etc. - so that they can be queried via 'perf
The categorization is generally on the stem name, which already works fine with
the existing perf list wildcard support. So for example you only want
perf list br*
[Speculative and retired branches]
[Speculative and retired macro-conditional branches]
[Speculative and retired macro-unconditional branches excluding calls and indirects]
[Speculative and retired direct near calls]
[Speculative and retired indirect branches excluding calls and returns]
[Speculative and retired indirect return branches]
Or mid level cache events:
perf list l2*
[Not rejected writebacks from L1D to L2 cache lines in any state]
[Not rejected writebacks from L1D to L2 cache lines in E state]
[Not rejected writebacks from L1D to L2 cache lines in M state]
[Count the number of modified Lines evicted from L1 and missed L2. (Non-rejected WBs from the DCU.)]
[L2 cache lines filling L2]
There are some exceptions, but generally it works this way.
The stem could be put into a separate header, but it would seem redundant to me.
> We don't just want the import the unstructured mess that these event files are -
> we want to turn them into real structure. We can still keep the messy vendor names
> as well, like IDQ.DSB_CYCLES, but we want to impose structure as well.
The vendor names directly map to the micro architecture, which is whole
point of the events. IDQ is a part of the CPU, and is described in the
CPU manuals. One of the main motivations for adding event lists is to make
perf match to that documentation.
> There should be good 'perf list' visualization for these events: grouping,
> individual names, with a good interface to query details if needed. I.e. it should
> be possible to browse and discover events relevant to the CPU the tool is
> executing on.
I suppose we could change perf list to give the stem names as section headers
to make the long list a bit more readable.
Generally you need to have some knowledge of the micro architecture to use
these events. There is no way around that.
ak at linux.intel.com -- Speaking for myself only
More information about the Linuxppc-dev