From: Namhyung Kim Date: Tue, 2 Dec 2025 23:57:14 +0000 (-0800) Subject: perf tools: Mark split kallsyms DSOs as loaded X-Git-Tag: v6.19-rc1~61^2~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7da4d60db33cccd8f4c445ab20bba71531435ee5;p=thirdparty%2Fkernel%2Flinux.git perf tools: Mark split kallsyms DSOs as loaded 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. Reviewed-by: Ian Rogers Fixes: 2e538c4a1847291cf ("perf tools: Improve kernel/modules symbol lookup") Signed-off-by: Namhyung Kim --- diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index d8fc5ea77f849..5a38435d90c96 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) {