bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Mykyta Yatsenko <mykyta.yatsenko5@gmail.com>,
	bpf@vger.kernel.org,  ast@kernel.org, andrii@kernel.org,
	daniel@iogearbox.net, kafai@meta.com,  kernel-team@meta.com,
	Mykyta Yatsenko <yatsenko@meta.com>
Subject: Re: [PATCH bpf-next] selftests/bpf: add BPF program dump in veristat
Date: Wed, 13 Aug 2025 14:58:04 -0700	[thread overview]
Message-ID: <8b850ee32bbbd3a8d38cd9ffbb98ebe6d085d631.camel@gmail.com> (raw)
In-Reply-To: <CAEf4BzYVhhX3N0uCB+kOm+yeP_j7bC-mfoDbSdAB5WDq1_=W+g@mail.gmail.com>

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.

[...]

  reply	other threads:[~2025-08-13 21:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11 21:20 [PATCH bpf-next] selftests/bpf: add BPF program dump in veristat Mykyta Yatsenko
2025-08-13 21:29 ` Eduard Zingerman
2025-08-13 21:51   ` Andrii Nakryiko
2025-08-13 21:58     ` Eduard Zingerman [this message]
2025-08-13 21:54 ` Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b850ee32bbbd3a8d38cd9ffbb98ebe6d085d631.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kafai@meta.com \
    --cc=kernel-team@meta.com \
    --cc=mykyta.yatsenko5@gmail.com \
    --cc=yatsenko@meta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).