From: Peter Collingbourne Date: Tue, 3 Mar 2026 23:00:54 +0000 (-0800) Subject: perf annotate: Specify llvm features="+all" for aarch64 X-Git-Tag: v7.1-rc1~91^2~112 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b1718b0367ba31e8db273e3896ebd1707bcbe59e;p=thirdparty%2Fkernel%2Flinux.git perf annotate: Specify llvm features="+all" for aarch64 This is consistent with what llvm-objdump does (see [1]) and allows the LLVM disassembler to disassemble instructions not in the base instruction set. [1] https://reviews.llvm.org/D127741 Link: https://linux-review.googlesource.com/id/I52e4fef18d2e12b45f875231fa9d3efff2538fd4 Signed-off-by: Peter Collingbourne Reviewed-by: Ian Rogers Acked-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- diff --git a/tools/perf/util/llvm.c b/tools/perf/util/llvm.c index 0d126d233c019..a0deb742a7331 100644 --- a/tools/perf/util/llvm.c +++ b/tools/perf/util/llvm.c @@ -153,11 +153,17 @@ int symbol__disassemble_llvm(const char *filename, struct symbol *sym, /*get_op_info=*/NULL, symbol_lookup_callback); } else { char triplet[64]; + const char *features = NULL; scnprintf(triplet, sizeof(triplet), "%s-linux-gnu", args->arch->name); - disasm = LLVMCreateDisasm(triplet, &storage, /*tag_type=*/0, - /*get_op_info=*/NULL, symbol_lookup_callback); + if (args->arch->id.e_machine == EM_AARCH64) + features = "+all"; + disasm = LLVMCreateDisasmCPUFeatures(triplet, /*cpu=*/"", + features, &storage, + /*tag_type=*/0, + /*get_op_info=*/NULL, + symbol_lookup_callback); } if (disasm == NULL)