[PATCH 44/49] perf stat: Uniquify hybrid event name
From: kan . liang
Date: Mon Feb 08 2021 - 13:18:14 EST
From: Jin Yao <yao.jin@xxxxxxxxxxxxxxx>
It would be useful to tell user the pmu which the event belongs to.
perf-stat has supported '--no-merge' option and it can print the pmu
name after the event name.
Now this option is enabled by default for hybrid platform.
Before:
root@otcpl-adl-s-2:~# ./perf stat -e cycles -a -- sleep 1
Performance counter stats for 'system wide':
10,301,466 cycles
1,557,794 cycles
1.002068584 seconds time elapsed
After:
root@otcpl-adl-s-2:~# ./perf stat -e cycles -a -- sleep 1
Performance counter stats for 'system wide':
11,190,657 cycles [cpu_core]
669,063 cycles [cpu_atom]
1.002147571 seconds time elapsed
Reviewed-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Signed-off-by: Jin Yao <yao.jin@xxxxxxxxxxxxxxx>
---
tools/perf/builtin-stat.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 0b08665..bfe7305 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -2379,6 +2379,9 @@ int cmd_stat(int argc, const char **argv)
evlist__check_cpu_maps(evsel_list);
+ if (perf_pmu__hybrid_exist())
+ stat_config.no_merge = true;
+
/*
* Initialize thread_map with comm names,
* so we could print it out on output.
--
2.7.4