linux-stable/tools
Jin Yao 5e4edd1f73 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>
2021-04-29 10:30:59 -03:00
..
accounting
arch ia64: tools: remove duplicate definition of ia64_mf() on ia64 2021-04-16 16:10:37 -07:00
bootconfig tools/bootconfig: Add tracing_on support to helper scripts 2021-01-14 10:32:20 -05:00
bpf Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2021-02-26 13:16:31 -08:00
build perf build: Move feature cleanup under tools/build 2021-03-06 16:54:24 -03:00
cgroup tools/cgroup/slabinfo.py: updated to work on current kernel 2021-04-23 14:42:40 -07:00
debugging
edid
firewire
firmware
gpio tools: gpio: remove uAPI v1 code no longer used by selftests 2021-02-15 11:43:28 +01:00
hv
iio
include tools headers uapi: Update tools's copy of linux/perf_event.h 2021-04-29 10:30:59 -03:00
io_uring
kvm/kvm_stat tools/kvm_stat: Add restart delay 2021-03-30 13:07:09 -04:00
laptop
leds
lib perf util: Move bpf_perf definitions to a libperf header 2021-04-29 10:30:58 -03:00
memory-model
objtool objtool,x86: Fix uaccess PUSHF/POPF validation 2021-03-12 09:15:49 +01:00
pci
pcmcia
perf perf parse-events: Support event inside hybrid pmu 2021-04-29 10:30:59 -03:00
power platform-drivers-x86 for v5.12-1 2021-02-22 08:50:01 -08:00
scripts New features: 2021-02-22 13:59:43 -08:00
spi
testing Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2021-04-16 15:48:08 -07:00
thermal/tmon
time
tracing tracing/tools: fix a couple of spelling mistakes 2021-02-25 12:54:16 -05:00
usb
virtio
vm
wmi
Makefile tracing/tools: Add the latency-collector to tools directory 2021-02-12 11:52:59 -05:00