[PATCH v5 05/11] perf symbol: Set binary/symtab type for split kallsyms
From: Namhyung Kim
Date: Tue Oct 13 2026 - 13:35:22 EST
When it creates new DSOs for split kallsyms, set the binary and symtab
type to KALLSYMS properly.
Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/util/symbol.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index cf099cbd29f268ec..56b8d75966133f87 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1099,6 +1099,13 @@ static int maps__split_kallsyms(struct maps *kmaps, struct dso *dso, u64 delta,
return -1;
dso__set_kernel(ndso, dso__kernel(dso));
+ if (dso__kernel(dso) == DSO_SPACE__KERNEL_GUEST) {
+ dso__set_binary_type(ndso, DSO_BINARY_TYPE__GUEST_KALLSYMS);
+ dso__set_symtab_type(ndso, DSO_BINARY_TYPE__GUEST_KALLSYMS);
+ } else {
+ dso__set_binary_type(ndso, DSO_BINARY_TYPE__KALLSYMS);
+ dso__set_symtab_type(ndso, DSO_BINARY_TYPE__KALLSYMS);
+ }
dso__set_loaded(ndso);
curr_map = map__new2(pos->start, ndso);
--
2.56.0.385.gd3acb90ef8-goog