From: Namhyung Kim Date: Tue, 2 Dec 2025 23:57:15 +0000 (-0800) Subject: perf tools: Fix split kallsyms DSO counting X-Git-Tag: v6.19-rc1~61^2~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad0b9c4865b98dc37f4d606d26b1c19808796805;p=thirdparty%2Fkernel%2Flinux.git perf tools: Fix split kallsyms DSO counting 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 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 5a38435d90c96..8eea49c50453d 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -960,11 +960,11 @@ static int maps__split_kallsyms(struct maps *kmaps, struct dso *dso, u64 delta, if (dso__kernel(dso) == DSO_SPACE__KERNEL_GUEST) snprintf(dso_name, sizeof(dso_name), "[guest.kernel].%d", - kernel_range++); + kernel_range); else snprintf(dso_name, sizeof(dso_name), "[kernel].%d", - kernel_range++); + kernel_range); ndso = dso__new(dso_name); map__zput(curr_map);