Re: [PATCH 3/3] perf disasm: Allow configuring what disassemblers to use
From: Steinar H. Gunderson
Date: Wed Nov 13 2024 - 08:00:17 EST
On Mon, Nov 11, 2024 at 02:24:34PM -0300, Arnaldo Carvalho de Melo wrote:
> On my todo list, and here Steinar could help, is to check if we an have
> source code intermixed with the llvm based disassembler, like we have
> with the objdump based one.
I am no LLVM expert; the only time I ever touched it was for perf :-)
TBH I'm not entirely sure what functionality this is, though; I don't
think I've ever gotten perf to list source code for me, ever (in the ~15
years I've used it). I can give --line-numbers (and optionally --inlines)
to objdump and then look up the line numbers by hand with an editor,
but the actual source? Is there some way perf can attribute the samples
back to individual source code lines the way some other profilers can
(i.e., showing the source instead of instructions)?
I would assume that LLVM has some way of outputting line numbers
(presumably by parsing debug information), since llvm-objdump supports
--line-numbers, but that's perhaps not what you're asking about?
/* Steinar */