Skip to content

Commit d6cbe9b

Browse files
namhyunggregkh
authored andcommitted
perf tools: Mark split kallsyms DSOs as loaded
[ Upstream commit 7da4d60 ] 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: 2e538c4 ("perf tools: Improve kernel/modules symbol lookup") Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 0b6216f commit d6cbe9b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/perf/util/symbol.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,7 @@ static int maps__split_kallsyms(struct maps *kmaps, struct dso *dso, u64 delta,
950950
return -1;
951951

952952
dso__set_kernel(ndso, dso__kernel(dso));
953+
dso__set_loaded(ndso);
953954

954955
curr_map = map__new2(pos->start, ndso);
955956
if (curr_map == NULL) {

0 commit comments

Comments
 (0)