From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>, Song Liu <song@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Kan Liang <kan.liang@linux.intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] perf bpf: Move BPF disassembly routines to separate file to avoid clash with capstone bpf headers
Date: Thu, 1 Aug 2024 14:38:32 -0300 [thread overview]
Message-ID: <ZqvIGLQNAtYqjo7u@x1> (raw)
In-Reply-To: <CAP-5=fVH-YG65AmFz-N0uSXg2OcGJrmkw5tQtuEuFY=h_4K8_g@mail.gmail.com>
On Thu, Aug 01, 2024 at 08:18:23AM -0700, Ian Rogers wrote:
> On Wed, Jul 31, 2024 at 11:51 AM Arnaldo Carvalho de Melo
> <acme@kernel.org> 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.
Well, looking at the files in this patch shows it, here, more precisely:
tools/perf/util/disasm_bpf.c
#else // defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT)
int symbol__disassemble_bpf(struct symbol *sym __maybe_unused, struct annotate_args *args __maybe_unused)
{
return SYMBOL_ANNOTATE_ERRNO__NO_LIBOPCODES_FOR_BPF;
}
#endif // defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT)
- Arnaldo
prev parent reply other threads:[~2024-08-01 17:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 15:12 [PATCH 1/1] perf bpf: Move BPF disassembly routines to separate file to avoid clash with capstone bpf headers Arnaldo Carvalho de Melo
2024-07-31 15:45 ` Arnaldo Carvalho de Melo
2024-07-31 17:07 ` Namhyung Kim
2024-07-31 17:35 ` Ian Rogers
2024-07-31 18:49 ` Arnaldo Carvalho de Melo
2024-07-31 18:51 ` Arnaldo Carvalho de Melo
2024-08-01 15:18 ` Ian Rogers
2024-08-01 17:38 ` Arnaldo Carvalho de Melo [this message]
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=ZqvIGLQNAtYqjo7u@x1 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=song@kernel.org \
/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