From: Namhyung Kim Date: Thu, 25 Apr 2024 00:51:57 +0000 (-0700) Subject: perf annotate: Update DSO binary type when trying build-id X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8f3ec810bb668d421f9d260e3de3bccca954b56f;p=linux.git perf annotate: Update DSO binary type when trying build-id dso__disassemble_filename() tries to get the filename for objdump (or capstone) using build-id. But I found sometimes it didn't disassemble some functions. It turned out that those functions belong to a DSO which has no binary type set. It seems it sets the binary type for some special files only - like kernel (kallsyms or kcore) or BPF images. And there's a logic to skip dso with DSO_BINARY_TYPE__NOT_FOUND. As it's checked the build-id cache link, it should set the binary type as DSO_BINARY_TYPE__BUILD_ID_CACHE. Fixes: 873a83731f1cc85c ("perf annotate: Skip DSOs not found") Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20240425005157.1104789-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c index 412101f2cf2a0..6d1125e687b71 100644 --- a/tools/perf/util/disasm.c +++ b/tools/perf/util/disasm.c @@ -1156,6 +1156,8 @@ fallback: } } mutex_unlock(&dso->lock); + } else if (dso->binary_type == DSO_BINARY_TYPE__NOT_FOUND) { + dso->binary_type = DSO_BINARY_TYPE__BUILD_ID_CACHE; } free(build_id_path);