]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf tools: Fix split kallsyms DSO counting
authorNamhyung Kim <namhyung@kernel.org>
Tue, 2 Dec 2025 23:57:15 +0000 (15:57 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 3 Dec 2025 05:59:14 +0000 (21:59 -0800)
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: 2e538c4a1847291cf ("perf tools: Improve kernel/modules symbol lookup")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/symbol.c

index 5a38435d90c96092ceea645c47c97d8dcaf81d86..8eea49c50453d13a0acf980a85f3678613476571 100644 (file)
@@ -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);