Re: [PATCH bpf-next] selftests/bpf: add BPF program dump in veristat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2025-08-13 at 14:51 -0700, Andrii Nakryiko wrote:

[...]

> > I have a feature request for this:
> > generate local labels for branch and call targets.
> > E.g. as in the tools/testing/selftests/bpf/jit_disasm_helpers.c.
> > Or as in llvm-objdump -d --symbolize-operands.
> 
> should we teach bpftool that?

Would be nice to, imo.

> > That aside, it looks like the code is very similar to bpftool's
> > xlated_dumper.c. Is there a way to share the code?
> > There would be now three places where xlated program is printed:
> > - bpftool
> > - veristat
> > - selftests (this one does not handle ksyms, but it would be nice if it could)
> 
> I was going to ask the question if veristat should just delegate all
> this functionality to bpftool using popen() (it's very likely you'll
> have bpftool installed if you have veristat), but I guess if we can
> share more code between bpftool and veristat, it's fine as well.

If code reuse proves to be convoluted, popen() sounds like a good idea to me.

[...]





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux