lkml.org 
[lkml]   [2021]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 44/49] perf stat: Uniquify hybrid event name
Date
From: Jin Yao <yao.jin@linux.intel.com>

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@linux.intel.com>
Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
---
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
\
 
 \ /
  Last update: 2021-02-08 19:18    [W:0.400 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site