mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-18 12:22:27 -04:00
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:
committed by
Namhyung Kim
parent
6910944bf0
commit
b1718b0367
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user