[PATCH v1 7/7] perf symbol: Do not set binary type from symtab type
From: Namhyung Kim
Date: Mon Oct 05 2026 - 02:36:48 EST
The DSO binary type is to access the binary (e.g. instruction) data
while symtab type is for the symbol table. They may or may not be in
the same file. We should track them separately and correctly.
As special binaries already set their type before loading symbols, leave
the binary type info and only update it when actually opening the DSO.
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/util/symbol.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 389dbd7e5192f4f2..1175cb60f8206757 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1956,19 +1956,6 @@ int dso__load(struct dso *dso, struct map *map)
if (next_slot) {
ss_pos++;
-
- /*
- * The binary type is used to find the file containing
- * the executed instructions, so prefer the types that
- * refer to the actual object over debug-only files such
- * as DSO_BINARY_TYPE__DEBUGLINK.
- */
- if (dso__binary_type(dso) == DSO_BINARY_TYPE__NOT_FOUND ||
- symtab_type == DSO_BINARY_TYPE__BUILD_ID_CACHE ||
- (symtab_type == DSO_BINARY_TYPE__SYSTEM_PATH_DSO &&
- dso__binary_type(dso) != DSO_BINARY_TYPE__BUILD_ID_CACHE))
- dso__set_binary_type(dso, symtab_type);
-
if (syms_ss && runtime_ss)
break;
} else {
--
2.55.0