From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Rui Qi <qirui.001@bytedance.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 0/2] perf: Add is_ignored_kernel_symbol() for kernel symbol filtering
Date: Wed, 27 May 2026 08:15:37 -0300 [thread overview]
Message-ID: <ahbSWSMRlxhJUbz6@x1> (raw)
In-Reply-To: <ahT_m5dG6rITpTNB@google.com>
On Mon, May 25, 2026 at 09:04:11PM -0500, Namhyung Kim wrote:
> Hello,
>
> On Fri, May 22, 2026 at 04:26:02PM +0800, Rui Qi wrote:
> > The perf tool currently has ad-hoc logic to filter out ELF mapping
> > symbols scattered across multiple files. ARM, AArch64 and RISC-V each
> > have their own inline checks in dso__load_sym_internal(), and kallsym
> > processing has yet another check for ARM module symbols.
> >
> > This patch series introduces a single is_ignored_kernel_symbol() inline
> > helper in symbol.h and converts the kernel symbol handling paths to use it.
> > The helper covers the existing "$" prefix used by ARM, AArch64 and RISC-V,
> > and also adds the x86 local symbol prefixes so that perf stays consistent
> > with the kernel's own is_mapping_symbol() logic.
> >
> > Changes in v4:
> > - Rename the helper from is_mapping_symbol() to is_ignored_kernel_symbol()
> > to make its purpose clearer.
> > - Split the single patch into two logical patches:
> > - Patch 1 introduces the helper and applies it to kallsyms and ksymbol events.
> > - Patch 2 applies the helper to the ELF loading path for kernel DSOs.
> >
> > Link (v3): https://lore.kernel.org/all/20260507071103.2772577-1-qirui.001@bytedance.com/
> >
> > Changes in v3:
> > - Add is_mapping_symbol() check for kernel modules in dso__load_sym_internal()
> > - Add is_mapping_symbol() check in machine__process_ksymbol_unregister()
> >
> > Link (v2): https://lore.kernel.org/all/20260506073820.2419087-1-qirui.001@bytedance.com/
> >
> > Changes in v2:
> > - Only apply is_mapping_symbol() filtering to kernel symbols (kallsyms
> > and ksymbol events), not to user-space symbols from ELF files,
> > BFD libraries, or perf map files. This avoids incorrectly
> > discarding valid user-space function names that start with '$',
> > which is a legal character in identifiers for many languages
> > (e.g., Java, Scala) and compilers (GCC).
> > - Move the mapping symbol check in machine__process_ksymbol_register()
> > to the beginning of the function, before any map/dso allocation
> > or insertion, to avoid leaving empty maps in the kernel map tree.
> >
> > Link (v1): https://lore.kernel.org/all/20260504090609.1801880-1-qirui.001@bytedance.com/
> >
> > Rui Qi (2):
> > perf: Extract is_ignored_kernel_symbol() for kernel mapping symbol
> > filtering
> > perf: Apply is_ignored_kernel_symbol() filter in ELF loading path for
> > kernel DSOs
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>
Thanks, applied to perf-tools-next, for v7.2.
- Arnaldo
prev parent reply other threads:[~2026-05-27 11:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 7:38 [PATCH v2] perf: Extract is_mapping_symbol() helper for kernel mapping symbol filtering Rui Qi
2026-05-06 10:43 ` sashiko-bot
2026-05-07 6:27 ` Rui Qi
2026-05-07 7:11 ` [PATCH v3] perf: Add " Rui Qi
2026-05-07 15:23 ` Ian Rogers
2026-05-22 7:34 ` Rui Qi
2026-05-07 20:38 ` sashiko-bot
2026-05-22 8:26 ` [PATCH v4 0/2] perf: Add is_ignored_kernel_symbol() for kernel " Rui Qi
2026-05-22 8:26 ` [PATCH v4 1/2] perf: Extract is_ignored_kernel_symbol() for kernel mapping " Rui Qi
2026-05-22 8:26 ` [PATCH v4 2/2] perf: Apply is_ignored_kernel_symbol() filter in ELF loading path for kernel DSOs Rui Qi
2026-05-26 2:04 ` [PATCH v4 0/2] perf: Add is_ignored_kernel_symbol() for kernel symbol filtering Namhyung Kim
2026-05-27 11:15 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ahbSWSMRlxhJUbz6@x1 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=qirui.001@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox