Re: [PATCH 09/10] perf, tools: Support DividedBy header in JSON event list
From: Andi Kleen
Date: Mon Oct 17 2016 - 14:29:07 EST
>
> so..
>
> - you put 'DividedBy' into JSON event's defition any further
> explanation how or why the format we use for event defs will
> be used now used to describe ratios
>
> - then you force perf stat to merge together all 'same' uncore events
> to get just one number..
The ratios don't need that. They work fine without merging.
It's an independent feature.
The merging is just a convenience feature for some of the uncore pmus to make
the output much more readable. For example the cbox pmu is duplicated
for each core, and we have systems with 21 cores per socket now.
So without merging you end up with something like the output below.
The second variant is much more readable.
>
> - then you display that ratio (just the number) in perf stat metrics output
> without any explanation or description
The event name is already expressive enough. I find it fairly
straight forward that there is a ratio attached with a count.
>
> I dont see that as a nicely fit, more like hack
I would call it a simple solution that works well.
I don't see any easy path for full scripting, and also I think
it would be vastly overengineered here needing a lot of
infastructure that isn't really needed.
-Andi
% perf stat --no-merge -a -e unc_c_llc_lookup.any sleep 1
Performance counter stats for 'system wide':
694,976 Bytes unc_c_llc_lookup.any
706,304 Bytes unc_c_llc_lookup.any
956,608 Bytes unc_c_llc_lookup.any
782,720 Bytes unc_c_llc_lookup.any
605,696 Bytes unc_c_llc_lookup.any
442,816 Bytes unc_c_llc_lookup.any
659,328 Bytes unc_c_llc_lookup.any
509,312 Bytes unc_c_llc_lookup.any
263,936 Bytes unc_c_llc_lookup.any
592,448 Bytes unc_c_llc_lookup.any
672,448 Bytes unc_c_llc_lookup.any
608,640 Bytes unc_c_llc_lookup.any
641,024 Bytes unc_c_llc_lookup.any
856,896 Bytes unc_c_llc_lookup.any
808,832 Bytes unc_c_llc_lookup.any
684,864 Bytes unc_c_llc_lookup.any
710,464 Bytes unc_c_llc_lookup.any
538,304 Bytes unc_c_llc_lookup.any
1.002577660 seconds time elapsed
% perf stat -a -e unc_c_llc_lookup.any sleep 1
Performance counter stats for 'system wide':
2,685,120 Bytes unc_c_llc_lookup.any
1.002648032 seconds time elapsed