Re: [PATCH 3/3] perf disasm: Allow configuring what disassemblers to use
From: Steinar H. Gunderson
Date: Thu Nov 14 2024 - 04:29:04 EST
On Wed, Nov 13, 2024 at 04:14:06PM -0300, Arnaldo Carvalho de Melo wrote:
> So, source code, automatically obtained from a debuginfod server and
> places where one can put a probe.
Mm, OK. Unfortunately I don't have any debuginfod stuff available on
this side, but I understand the desire.
I looked at the LLVM disassembler and it _does_ insert line numbers:
llvm_addr2line(filename, pc, &args->fileloc,
(unsigned int *)&args->line_nr, false, NULL);
But this is maybe not enough? We don't have any machinery in perf to get
from the file + line number to the source ourselves? (What does capstone and
the embedded binutils disassembler do?)
> You can show just instructions or instructions + source code.
>
> There were requests but no attempt that I know of of doing just source
> code.
TBH I'd love the latter, but I'm not going to sign up for doing it. :-)
/* Steinar */