Commit 3e0bf9fd authored by James Clark's avatar James Clark Committed by Namhyung Kim
Browse files

perf pmu: Restore full PMU name wildcard support



Commit b2b9d3a3 ("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 f91fa2ae ("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: f91fa2ae ("perf pmu: Refactor perf_pmu__match()")
Signed-off-by: default avatarJames Clark <james.clark@arm.com>
Reviewed-by: default avatarIan Rogers <irogers@google.com>
Cc: robin.murphy@arm.com
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240626145448.896746-2-james.clark@arm.com
parent 4553c431
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment