summary refs log tree commit diff
path: root/tools/perf/util/evsel.h
diff options
context:
space:
mode:
authorJin Yao <yao.jin@linux.intel.com>2021-04-27 15:01:29 +0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-04-29 10:30:59 -0300
commit660e533e87ff4e66434f90fca987b929d4eb0059 (patch)
tree9939ca5f95109d6b5c4b32ce2ae3cae5e4f448ea /tools/perf/util/evsel.h
parent92637cc7295510f4b3cb945cafcaec97c82e42f2 (diff)
downloadlinux-660e533e87ff4e66434f90fca987b929d4eb0059.tar.gz
perf stat: Warn group events from different hybrid PMU
If a group has events which are from different hybrid PMUs,
shows a warning:

"WARNING: events in group from different hybrid PMUs!"

This is to remind the user not to put the core event and atom
event into one group.

Next, just disable grouping.

  # perf stat -e "{cpu_core/cycles/,cpu_atom/cycles/}" -a -- sleep 1
  WARNING: events in group from different hybrid PMUs!
  WARNING: grouped events cpus do not match, disabling group:
    anon group { cpu_core/cycles/, cpu_atom/cycles/ }

   Performance counter stats for 'system wide':

           5,438,125      cpu_core/cycles/
           3,914,586      cpu_atom/cycles/

         1.004250966 seconds time elapsed

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210427070139.25256-17-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.h')
-rw-r--r--tools/perf/util/evsel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index a9cc9563ac59..75cf5dbfe208 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -462,4 +462,5 @@ struct perf_env *evsel__env(struct evsel *evsel);
 int evsel__store_ids(struct evsel *evsel, struct evlist *evlist);
 
 void evsel__zero_per_pkg(struct evsel *evsel);
+bool evsel__is_hybrid(struct evsel *evsel);
 #endif /* __PERF_EVSEL_H */