* [PATCH] perf llvm: Specify features="+all" for aarch64
@ 2026-03-03 23:00 Peter Collingbourne
2026-03-03 23:31 ` Ian Rogers
2026-03-05 22:20 ` Namhyung Kim
0 siblings, 2 replies; 4+ messages in thread
From: Peter Collingbourne @ 2026-03-03 23:00 UTC (permalink / raw)
To: Ian Rogers
Cc: Peter Collingbourne, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark,
Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
linux-perf-users, linux-kernel, llvm
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>
---
tools/perf/util/llvm.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/llvm.c b/tools/perf/util/llvm.c
index 87fceae8488a7..44eff99970fe2 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)
--
2.53.0.473.g4a7958ca14-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] perf llvm: Specify features="+all" for aarch64
2026-03-03 23:00 [PATCH] perf llvm: Specify features="+all" for aarch64 Peter Collingbourne
@ 2026-03-03 23:31 ` Ian Rogers
2026-03-04 22:06 ` Arnaldo Carvalho de Melo
2026-03-05 22:20 ` Namhyung Kim
1 sibling, 1 reply; 4+ messages in thread
From: Ian Rogers @ 2026-03-03 23:31 UTC (permalink / raw)
To: Peter Collingbourne, James Clark
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Adrian Hunter, Nathan Chancellor, Nick Desaulniers, Bill Wendling,
Justin Stitt, linux-perf-users, linux-kernel, llvm
On Tue, Mar 3, 2026 at 3:01 PM Peter Collingbourne <pcc@google.com> wrote:
>
> 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>
Thanks,
Ian
> ---
> tools/perf/util/llvm.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/llvm.c b/tools/perf/util/llvm.c
> index 87fceae8488a7..44eff99970fe2 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)
> --
> 2.53.0.473.g4a7958ca14-goog
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] perf llvm: Specify features="+all" for aarch64
2026-03-03 23:31 ` Ian Rogers
@ 2026-03-04 22:06 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2026-03-04 22:06 UTC (permalink / raw)
To: Ian Rogers
Cc: Peter Collingbourne, James Clark, Peter Zijlstra, Ingo Molnar,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Adrian Hunter, Nathan Chancellor, Nick Desaulniers, Bill Wendling,
Justin Stitt, linux-perf-users, linux-kernel, llvm
On Tue, Mar 03, 2026 at 03:31:42PM -0800, Ian Rogers wrote:
> On Tue, Mar 3, 2026 at 3:01 PM Peter Collingbourne <pcc@google.com> wrote:
> >
> > 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>
Namhyung, this should go to 7.1 (perf-tools-next),
Regards,
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf llvm: Specify features="+all" for aarch64
2026-03-03 23:00 [PATCH] perf llvm: Specify features="+all" for aarch64 Peter Collingbourne
2026-03-03 23:31 ` Ian Rogers
@ 2026-03-05 22:20 ` Namhyung Kim
1 sibling, 0 replies; 4+ messages in thread
From: Namhyung Kim @ 2026-03-05 22:20 UTC (permalink / raw)
To: Ian Rogers, Peter Collingbourne
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter,
James Clark, Nathan Chancellor, Nick Desaulniers, Bill Wendling,
Justin Stitt, linux-perf-users, linux-kernel, llvm
On Tue, 03 Mar 2026 15:00:54 -0800, Peter Collingbourne wrote:
> 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
>
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-05 22:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-03 23:00 [PATCH] perf llvm: Specify features="+all" for aarch64 Peter Collingbourne
2026-03-03 23:31 ` Ian Rogers
2026-03-04 22:06 ` Arnaldo Carvalho de Melo
2026-03-05 22:20 ` Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox