diff options
| author | Andi Kleen <[email protected]> | 2015-04-07 23:25:15 +0200 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2015-04-29 10:38:04 -0300 |
| commit | a0aa21e2281f89a197ad8e7bd8008f3b7b735dfc (patch) | |
| tree | 87e562c5ca0e6a07fec9926a89bc21e401567847 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | d303e85a5c19eb8d913951d1aa81556fc20b20af (diff) | |
perf stat: Fix metrics calculation with event qualifiers
Currently in perf IPC and other metrics cannot be directly shown
separately for both user and kernel in a single run. The problem was
that the metrics matching code did not check event qualifiers.
With this patch the following case works correctly.
% perf stat -e cycles:k,cycles:u,instructions:k,instructions:u true
Performance counter stats for 'true':
531,718 cycles:k
203,895 cycles:u
338,151 instructions:k # 0.64 insns per cycle
105,961 instructions:u # 0.52 insns per cycle
0.002989739 seconds time elapsed
Previously it would misreport the ratios because they were matching the
wrong value.
The patch is fairly big, but quite mechanic as it just adds context
indexes everywhere.
Reported-by: William Cohen <[email protected]>
Signed-off-by: Andi Kleen <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: William Cohen <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jiri Olsa <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions