diff options
| author | Namhyung Kim <namhyung@kernel.org> | 2025-12-02 15:57:14 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-12-18 13:55:14 +0100 |
| commit | d6cbe9b36f3682a85fefcccc2a08510a65126a50 (patch) | |
| tree | 5c13b79b26abe30a28463d99337b7cf927af078b /tools/perf | |
| parent | 0b6216f9b3d1c33c76f74511026e5de5385ee520 (diff) | |
| download | linux-d6cbe9b36f3682a85fefcccc2a08510a65126a50.tar.gz linux-d6cbe9b36f3682a85fefcccc2a08510a65126a50.tar.bz2 linux-d6cbe9b36f3682a85fefcccc2a08510a65126a50.zip | |
perf tools: Mark split kallsyms DSOs as loaded
[ Upstream commit 7da4d60db33cccd8f4c445ab20bba71531435ee5 ]
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 <irogers@google.com>
Fixes: 2e538c4a1847291cf ("perf tools: Improve kernel/modules symbol lookup")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf')
| -rw-r--r-- | tools/perf/util/symbol.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index c0ec5ed4f1aa..c60e38dc39db 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -950,6 +950,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) { |
