[PATCH v1 3/7] perf symbol: Update symtab type of vmlinux from build-id cache
From: Namhyung Kim
Date: Mon Oct 05 2026 - 02:35:23 EST
Currently dso__load_vmlinux() sets both binary type and symtab type to
VMLINUX. To precisely track the symtab type of the kernel dso, update
the type to build-id cache if it's loaded from there. It won't have
any functional difference though.
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/util/symbol.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 5d98888d068c741a..cf099cbd29f268ec 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -2079,7 +2079,7 @@ int dso__load_vmlinux_path(struct dso *dso, struct map *map)
if (filename != NULL) {
err = dso__load_vmlinux(dso, map, filename, true);
if (err > 0)
- goto out;
+ dso__set_symtab_type(dso, DSO_BINARY_TYPE__BUILD_ID_CACHE);
}
out:
return err;
@@ -2235,8 +2235,10 @@ static int dso__load_kernel_sym(struct dso *dso, struct map *map)
filename = __dso__build_id_filename(dso, NULL, 0, false, false);
if (filename != NULL) {
err = dso__load_vmlinux(dso, map, filename, true);
- if (err > 0)
+ if (err > 0) {
+ dso__set_symtab_type(dso, DSO_BINARY_TYPE__BUILD_ID_CACHE);
return err;
+ }
}
if (!symbol_conf.ignore_vmlinux && vmlinux_path != NULL) {
--
2.55.0