]> git.ipfire.org Git - thirdparty/linux.git/commit
perf: Extract is_ignored_kernel_symbol() for kernel mapping symbol filtering
authorRui Qi <qirui.001@bytedance.com>
Fri, 22 May 2026 08:26:03 +0000 (16:26 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 27 May 2026 11:14:37 +0000 (08:14 -0300)
commite987110f09d2817d74a5d624c7bfb620d2bb0d40
tree97d7f90d7a84795ce01fe1df7a68c8f8bfd0fa10
parent3ca7f9ef8fa1d96793b855d331e9fe06d47d2a60
perf: Extract is_ignored_kernel_symbol() for kernel mapping symbol filtering

Mapping symbol filtering is scattered across multiple files with
inconsistent checks.  The kernel's own is_mapping_symbol() covers x86
local symbols ('.L*' and 'L0*') on top of the '$' prefix used by
ARM/AArch64/RISC-V, but the perf tool only checks '$'.

Extract is_ignored_kernel_symbol() into symbol.h matching the kernel
definition, and convert the kallsyms and ksymbol event paths to use it.
Add ksymbol event name validation and early mapping symbol filtering
before any state mutation.

Signed-off-by: Rui Qi <qirui.001@bytedance.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/machine.c
tools/perf/util/symbol.c
tools/perf/util/symbol.h