Home
last modified time | relevance | path

Searched hist:"5 e4edd1f73b5d59905aeb0fe43ab74301c39a5c1" (Results 1 – 1 of 1) sorted by relevance

/linux/tools/perf/util/
H A Dparse-events.cdiff 5e4edd1f73b5d59905aeb0fe43ab74301c39a5c1 Tue Apr 27 09:01:25 CEST 2021 Jin Yao <yao.jin@linux.intel.com> perf parse-events: Support event inside hybrid pmu

On hybrid platform, user may want to enable events on one pmu.

Following syntax are supported:

cpu_core/<event>/
cpu_atom/<event>/

But the syntax doesn't work for cache event.

Before:

# perf stat -e cpu_core/LLC-loads/ -a -- sleep 1
event syntax error: 'cpu_core/LLC-loads/'
\___ unknown term 'LLC-loads' for pmu 'cpu_core'

Cache events are a bit complex. We can't create aliases for them.
We use another solution. For example, if we use "cpu_core/LLC-loads/",
in parse_events_add_pmu(), term->config is "LLC-loads".

Then we create a new parser to scan "LLC-loads". The
parse_events_add_cache() would be called during parsing.
The parse_state->hybrid_pmu_name is used to identify the pmu
where the event should be enabled on.

After:

# perf stat -e cpu_core/LLC-loads/ -a -- sleep 1

Performance counter stats for 'system wide':

24,593 cpu_core/LLC-loads/

1.003911601 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-13-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>