summaryrefslogtreecommitdiff
path: root/tools/perf/python/tracepoint.py
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2025-01-09 20:54:01 +0300
committerNamhyung Kim <namhyung@kernel.org>2025-02-21 09:35:10 +0300
commit7e05269ba8e340af255765869c91c1be869d85dc (patch)
tree55c46420ef65c1b5a075e8edabb6440082894cbf /tools/perf/python/tracepoint.py
parent4bac7fb5862740087825eda3ed6168e91da8b7e6 (diff)
downloadlinux-7e05269ba8e340af255765869c91c1be869d85dc.tar.xz
perf parse-events: Tidy name token matching
Prior to commit 70c90e4a6b2f ("perf parse-events: Avoid scanning PMUs before parsing") names (generally event names) excluded hyphen (minus) symbols as the formation of legacy names with hyphens was handled in the yacc code. That commit allowed hyphens supposedly making name_minus unnecessary. However, changing name_minus to name has issues in the term config tokens as then name ends up having priority over numbers and name allows matching numbers since commit 5ceb57990bf4 ("perf parse: Allow tracepoint names to start with digits "). It is also permissable for a name to match with a colon (':') in it when its in a config term list. To address this rename name_minus to term_name, make the pattern match name's except for the colon, add number matching into the config term region with a higher priority than name matching. This addresses an inconsistency and allows greater matching for names inside of term lists, for example, they may start with a number. Rename name_tag to quoted_name and update comments and helper functions to avoid str detecting quoted strings which was already done by the lexer. Signed-off-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250109175401.161340-1-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/python/tracepoint.py')
0 files changed, 0 insertions, 0 deletions