linux/tools
James Clark 3e0bf9fde2 perf pmu: Restore full PMU name wildcard support
Commit b2b9d3a3f0 ("perf pmu: Support wildcards on pmu name in dynamic
pmu events") gives the following example for wildcarding a subset of
PMUs:

  E.g., in a system with the following dynamic pmus:

        mypmu_0
        mypmu_1
        mypmu_2
        mypmu_4

  perf stat -e mypmu_[01]/<config>/

Since commit f91fa2ae63 ("perf pmu: Refactor perf_pmu__match()"), only
"*" has been supported, removing the ability to subset PMUs, even though
parse-events.l still supports ? and [] characters.

Fix it by using fnmatch() when any glob character is detected and add a
test which covers that and other scenarios of
perf_pmu__match_ignoring_suffix().

Fixes: f91fa2ae63 ("perf pmu: Refactor perf_pmu__match()")
Signed-off-by: James Clark <james.clark@arm.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: robin.murphy@arm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240626145448.896746-2-james.clark@arm.com
2024-06-27 20:28:01 -07:00
..
accounting
arch perf tools fixes and improvements for v6.10: 2024-05-21 15:45:14 -07:00
bootconfig
bpf bpftool, selftests/hid/bpf: Fix 29 clang warnings 2024-05-06 14:39:36 -07:00
build perf build: Use pkg-config for feature check for libtrace{event,fs} 2024-06-21 16:19:03 -07:00
certs
cgroup proc: rewrite stable_page_flags() 2024-04-25 20:56:15 -07:00
counter
crypto
debugging
firewire
firmware
gpio
hv Merge 6.9-rc5 into char-misc-next 2024-04-23 13:16:03 +02:00
iio
include perf tools fixes and improvements for v6.10: 2024-05-21 15:45:14 -07:00
kvm/kvm_stat
laptop
leds
lib perf record: Ensure space for lost samples 2024-06-13 20:45:31 -07:00
memory-model
mm
net/ynl ynl: ensure exact-len value is resolved 2024-05-13 14:59:24 -07:00
objtool objtool: Fix compile failure when using the x32 compiler 2024-03-30 22:12:37 +01:00
pci
pcmcia
perf perf pmu: Restore full PMU name wildcard support 2024-06-27 20:28:01 -07:00
power Turbostat 2024.05.10 update since 2024.04.08: 2024-05-19 12:33:28 -07:00
rcu
scripts
sound ASoC: dapm-graph: new tool to visualize DAPM state 2024-04-21 09:58:17 +09:00
spi
testing 16 hotfixes, 11 of which are cc:stable. 2024-05-25 15:10:33 -07:00
thermal
time
tracing tools/latency-collector: Fix -Wformat-security compile warns 2024-05-23 10:46:01 -04:00
usb
verification tools/verification: Use tools/build makefiles on rv 2024-03-20 05:39:06 +01:00
virtio
wmi
workqueue workqueue: remove unnecessary import and function in wq_monitor.py 2024-03-25 10:11:32 -10:00
writeback writeback: add wb_monitor.py script to monitor writeback info on bdi 2024-05-05 17:53:51 -07:00
Makefile tools/Makefile: remove cgroup target 2024-03-26 11:07:21 -07:00