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 <pcc@google.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
Peter Collingbourne
2026-03-03 15:00:54 -08:00
committed by Namhyung Kim
parent 6910944bf0
commit b1718b0367

View File

@@ -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)