diff options
author | John Garry <[email protected]> | 2021-07-20 23:10:19 +0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-07-27 13:21:46 -0300 |
commit | c07d5c9226980ca5ae21c6a2714baa95be2ce164 (patch) | |
tree | bfcb874bc3a1a7cf05b0ea0e443af86040452e43 /scripts/gdb/linux/dmesg.py | |
parent | 48e8a7b5a551f956002b60d2095bdfb58db96e59 (diff) |
perf pmu: Fix alias matching
Commit c47a5599eda324ba ("perf tools: Fix pattern matching for same
substring in different PMU type"), may have fixed some alias matching,
but has broken some others.
Firstly it cannot handle the simple scenario of PMU name in form
pmu_name{digits} - it can only handle pmu_name_{digits}.
Secondly it cannot handle more complex matching in the case where we
have multiple tokens. In this scenario, the code failed to realise that
we may examine multiple substrings in the PMU name.
Fix in two ways:
- Change perf_pmu__valid_suffix() to accept a PMU name without '_' in the
suffix
- Only pay attention to perf_pmu__valid_suffix() for the final token
Also add const qualifiers as necessary to avoid casting.
Fixes: c47a5599eda324ba ("perf tools: Fix pattern matching for same substring in different PMU type")
Signed-off-by: John Garry <[email protected]>
Tested-by: Jin Yao <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/dmesg.py')
0 files changed, 0 insertions, 0 deletions