Re: [PATCH 1/1] perf bpf: Move BPF disassembly routines to separate file to avoid clash with capstone bpf headers

From: Ian Rogers
Date: Thu Aug 01 2024 - 11:18:50 EST


On Wed, Jul 31, 2024 at 11:51 AM Arnaldo Carvalho de Melo
<acme@xxxxxxxxxx> wrote:
>
> On Wed, Jul 31, 2024 at 10:07:50AM -0700, Namhyung Kim wrote:
> > On Wed, Jul 31, 2024 at 8:12 AM Arnaldo Carvalho de Melo
[snip]
> > I think this can be gated by LIBBFD and LIBBPF config, but not sure
> > it can express the both requirements easily.
>
> It is possible, but as discussed with Ian in another message, the
> cheapest way to do it was, I think, like I did, in the end it is just a
> stub returning an error when those libraries are not linked with perf.
>
> When we manage to implement the disassembly of BPF using something other
> than libbfd we can spend more time in this area, I think.

Not following this, can you show an example perf command. There is a
BPF disassembler already in the kernel tree:
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/kernel/bpf/disasm.c?h=perf-tools-next
and in use in bpftool that we use in the perf build.

Thanks,
Ian