From: Ian Rogers <irogers@google.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
James Clark <james.clark@linaro.org>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/5] perf tools: Mark split kallsyms DSOs as loaded
Date: Tue, 2 Dec 2025 12:57:45 -0800 [thread overview]
Message-ID: <CAP-5=fX_Qxmi5WNS5Xd++zJbvoM2kPn0cF-FfVWsUUTvov86Ng@mail.gmail.com> (raw)
In-Reply-To: <20251202081645.931527-2-namhyung@kernel.org>
On Tue, Dec 2, 2025 at 12:16 AM Namhyung Kim <namhyung@kernel.org> wrote:
>
> The maps__split_kallsyms() will split symbols to module DSOs if it comes
> from a module. It also handled some unusual kernel symbols after modules
> by creating new kernel maps like "[kernel].0".
>
> But they are pseudo DSOs to have those unexpected symbols. They should
> not be considered as unloaded kernel DSOs. Otherwise the dso__load()
> for them will end up calling dso__load_kallsyms() and then
> maps__split_kallsyms() again and again.
>
> Fixes: 2e538c4a1847291cf ("perf tools: Improve kernel/modules symbol lookup")
Fixed after 16 years :-)
Reviewed-by: Ian Rogers <irogers@google.com>
Thanks,
Ian
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/util/symbol.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> index d8fc5ea77f849326..5a38435d90c96092 100644
> --- a/tools/perf/util/symbol.c
> +++ b/tools/perf/util/symbol.c
> @@ -972,6 +972,7 @@ static int maps__split_kallsyms(struct maps *kmaps, struct dso *dso, u64 delta,
> return -1;
>
> dso__set_kernel(ndso, dso__kernel(dso));
> + dso__set_loaded(ndso);
>
> curr_map = map__new2(pos->start, ndso);
> if (curr_map == NULL) {
> --
> 2.52.0.158.g65b55ccf14-goog
>
next prev parent reply other threads:[~2025-12-02 20:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 8:16 [PATCHSET 0/5] perf tools: Fix /proc/kallsyms map split Namhyung Kim
2025-12-02 8:16 ` [PATCH 1/5] perf tools: Mark split kallsyms DSOs as loaded Namhyung Kim
2025-12-02 20:57 ` Ian Rogers [this message]
2025-12-02 8:16 ` [PATCH 2/5] perf tools: Fix split kallsyms DSO counting Namhyung Kim
2025-12-02 20:56 ` Ian Rogers
2025-12-02 8:16 ` [PATCH 3/5] perf tools: Fallback to initial kernel map properly Namhyung Kim
2025-12-02 20:55 ` Ian Rogers
2025-12-02 8:16 ` [PATCH 4/5] perf tools: Use machine->root_dir to find /proc/kallsyms Namhyung Kim
2025-12-02 20:53 ` Ian Rogers
2025-12-02 21:26 ` Namhyung Kim
2025-12-02 8:16 ` [PATCH 5/5] perf test: Add kallsyms split test Namhyung Kim
2025-12-02 20:46 ` Ian Rogers
2025-12-02 21:31 ` Namhyung Kim
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='CAP-5=fX_Qxmi5WNS5Xd++zJbvoM2kPn0cF-FfVWsUUTvov86Ng@mail.gmail.com' \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).