linux-stable/tools
John Garry 864bc8c905 perf parse-events: Support event alias in form foo-bar-baz
Event aliasing for events whose name in the form foo-bar-baz is not
supported, while foo-bar, foo_bar_baz, and other combinations are, i.e.
two hyphens are not supported.

The HiSilicon D06 platform has events in such form:

  $ ./perf list sdir-home-migrate

  List of pre-defined events (to be used in -e):

  uncore hha:
    sdir-home-migrate
   [Unit: hisi_sccl,hha]

  $ sudo ./perf stat -e sdir-home-migrate
  event syntax error: 'sdir-home-migrate'
                          \___ parser error
  Run 'perf list' for a list of valid events

   Usage: perf stat [<options>] [<command>]

   -e, --event <event>event selector. use 'perf list' to list available events

To support, add an extra PMU event symbol type for "baz", and add a new
rule in the bison file.

Signed-off-by: John Garry <john.garry@huawei.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Qi Liu <liuqi115@huawei.com>
Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
Cc: linuxarm@huawei.com
Link: https://lore.kernel.org/r/1642432215-234089-2-git-send-email-john.garry@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-01-22 17:20:12 -03:00
..
accounting
arch tools headers UAPI: Sync x86 arch prctl headers with the kernel sources 2022-01-19 14:41:29 -03:00
bootconfig
bpf libbpf 1.0: Deprecate bpf_map__is_offload_neutral() 2022-01-05 16:09:06 -08:00
build Merge remote-tracking branch 'torvalds/master' into perf/core 2022-01-13 10:20:59 -03:00
cgroup
counter
debugging
edid
firewire
firmware
gpio
hv
iio iio: event_monitor: Flush output on event 2021-12-16 12:20:35 +00:00
include tools headers UAPI: Sync files changed by new set_mempolicy_home_node syscall 2022-01-20 11:20:37 -03:00
io_uring
kvm/kvm_stat
laptop
leds
lib perf cpumap: Migrate to libperf cpumap api 2022-01-22 17:08:42 -03:00
memory-model tools/memory-model: litmus: Add two tests for unlock(A)+lock(B) ordering 2021-11-30 17:47:08 -08:00
objtool Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
pci
pcmcia
perf perf parse-events: Support event alias in form foo-bar-baz 2022-01-22 17:20:12 -03:00
power More ACPI updates for 5.17-rc1 2022-01-18 08:51:51 +02:00
rcu
scripts tools: Help cross-building with clang 2021-12-16 12:15:04 -08:00
spi
testing RISCV: 2022-01-16 16:15:14 +02:00
thermal/tmon thermal: tools: tmon: remove unneeded local variable 2021-11-24 17:26:13 +01:00
time
tracing rtla: Add Documentation 2022-01-13 17:02:43 -05:00
usb
virtio
vm
wmi
Makefile tools/lib/lockdep: drop liblockdep 2021-11-12 11:07:17 -08:00