diff options
| author | Namhyung Kim <[email protected]> | 2020-11-27 04:14:04 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2020-11-30 11:58:26 +0000 |
| commit | 94b69c615e4e2b04d1392d1193c72406ff9fd73e (patch) | |
| tree | 40d84048b3bd7c56eb5bf0818dab3a4c461cb03f /tools/perf/util/python.c | |
| parent | Merge remote-tracking branch 'torvalds/master' into perf/core (diff) | |
| download | kernel-94b69c615e4e2b04d1392d1193c72406ff9fd73e.tar.gz kernel-94b69c615e4e2b04d1392d1193c72406ff9fd73e.zip | |
perf test: Add shadow stat test
It calculates IPC from the cycles and instruction counts and compares it
with the shadow stat for both global aggregation (default) and no
aggregation mode.
$ perf stat -a -A -e cycles,instructions sleep 1
Performance counter stats for 'system wide':
CPU0 39,580,880 cycles
CPU1 45,426,945 cycles
CPU2 31,151,685 cycles
CPU3 55,167,421 cycles
CPU0 17,073,564 instructions # 0.43 insn per cycle
CPU1 34,955,764 instructions # 0.77 insn per cycle
CPU2 15,688,459 instructions # 0.50 insn per cycle
CPU3 34,699,217 instructions # 0.63 insn per cycle
1.003275495 seconds time elapsed
In this example, the 'insn per cycle' should be matched to the number
for each cpu. For CPU2, 0.50 = 15,688,459 / 31,151,685 .
Committer testing:
# perf test shadow
78: perf stat metrics (shadow stat) test : Ok
#
Signed-off-by: Namhyung Kim <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/python.c')
0 files changed, 0 insertions, 0 deletions
