Skip to content

Commit e8097bd

Browse files
namhyunggregkh
authored andcommitted
perf tools: Fix split kallsyms DSO counting
[ Upstream commit ad0b9c4 ] It's counted twice as it's increased after calling maps__insert(). I guess we want to increase it only after it's added properly. 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 d6cbe9b commit e8097bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/perf/util/symbol.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,11 +938,11 @@ static int maps__split_kallsyms(struct maps *kmaps, struct dso *dso, u64 delta,
938938
if (dso__kernel(dso) == DSO_SPACE__KERNEL_GUEST)
939939
snprintf(dso_name, sizeof(dso_name),
940940
"[guest.kernel].%d",
941-
kernel_range++);
941+
kernel_range);
942942
else
943943
snprintf(dso_name, sizeof(dso_name),
944944
"[kernel].%d",
945-
kernel_range++);
945+
kernel_range);
946946

947947
ndso = dso__new(dso_name);
948948
map__zput(curr_map);

0 commit comments

Comments
 (0)