summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJames Clark <james.clark@linaro.org>2026-01-14 15:57:13 +0000
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-01-14 23:13:36 -0300
commit159ca97cd97ce8cc65364fee37319823b5ffb5bd (patch)
tree6241a8400a02d2d59d94b206c42444f42d18ab2a /tools/perf/scripts/python
parentbac74dcbd48b5b441e47841fd0fe507c7b0bcbaf (diff)
downloadlinux-159ca97cd97ce8cc65364fee37319823b5ffb5bd.tar.gz
linux-159ca97cd97ce8cc65364fee37319823b5ffb5bd.zip
perf parse-events: Refactor get_config_terms() to remove macros
The ADD_CONFIG_TERM() macros build the __type argument out of a partial EVSEL__CONFIG_TERM_x enum name. This means that they can't be called from a function where __type is a variable and it's also impossible to grep the codebase to find usages of these enums as they're never typed in full. Fix this by removing the macros and replacing them with an add_config_term() function. It seems the main reason these existed in the first place was to avoid type punning and to write to a specific field in the union, but the same thing can be achieved with a single write to a u64 'val' field. Running the Perf tests with "-fsanitize=undefined -fno-sanitize-recover" results in no new issues as a result of this change. Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: James Clark <james.clark@linaro.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions