aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
authorAndi Kleen <[email protected]>2019-06-24 19:37:10 +0000
committerArnaldo Carvalho de Melo <[email protected]>2019-07-02 01:50:41 +0000
commit2f87f33f4226523df9c9cc28f9874ea02fcc3d3f (patch)
tree53bd617dcee59f4fa9f9c0b6bd8708468e555321 /tools/perf/util/annotate.c
parentperf stat: Don't merge events in the same PMU (diff)
downloadkernel-2f87f33f4226523df9c9cc28f9874ea02fcc3d3f.tar.gz
kernel-2f87f33f4226523df9c9cc28f9874ea02fcc3d3f.zip
perf stat: Fix group lookup for metric group
The metric group code tries to find a group it added earlier in the evlist. Fix the lookup to handle groups with partially overlaps correctly. When a sub string match fails and we reset the match, we have to compare the first element again. I also renamed the find_evsel function to find_evsel_group to make its purpose clearer. With the earlier changes this fixes: Before: % perf stat -M UPI,IPC sleep 1 ... 1,032,922 uops_retired.retire_slots # 1.1 UPI 1,896,096 inst_retired.any 1,896,096 inst_retired.any 1,177,254 cpu_clk_unhalted.thread After: % perf stat -M UPI,IPC sleep 1 ... 1,013,193 uops_retired.retire_slots # 1.1 UPI 932,033 inst_retired.any 932,033 inst_retired.any # 0.9 IPC 1,091,245 cpu_clk_unhalted.thread Signed-off-by: Andi Kleen <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Fixes: b18f3e365019 ("perf stat: Support JSON metrics in perf stat") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.c')
0 files changed, 0 insertions, 0 deletions