From: Leo Yan <leo.yan@arm.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jesper Dangaard Brouer <hawk@kernel.org>,
James Clark <james.clark@linaro.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
LKML <linux-kernel@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
Quentin Monnet <qmo@kernel.org>
Subject: Re: [PATCH v1] samples/bpf: Add a trace tool with perf PMU counters
Date: Mon, 20 Jan 2025 21:37:08 +0000 [thread overview]
Message-ID: <20250120213708.GB261349@e132581.arm.com> (raw)
In-Reply-To: <365689f8-12c1-44b3-a351-97e6f54c1928@iogearbox.net>
On Mon, Jan 20, 2025 at 08:54:30PM +0100, Daniel Borkmann wrote:
> On 1/20/25 8:38 PM, Alexei Starovoitov wrote:
> > On Mon, Jan 20, 2025 at 10:50 AM Leo Yan <leo.yan@arm.com> wrote:
[...]
> > > My understanding for bpftool is for eBPF program specific. I looked
> > > into a bit the commit 47c09d6a9f67, it is nature for integrating the
> > > tracing feature for eBPF program specific. My patch is for tracing
> > > normal userspace programs, I am not sure if this is really wanted by
> > > bpftool. I would like to hear opinions from bpftool maintainer before
> > > proceeding.
>
> Yes, that suggestion was if it would have been applicable also
> for the existing bpftool (BPF program) profiling functionality.
>
> > > My program mainly uses eBPF attaching to uprobe. selftest/bpf has
> > > contained the related functionality testing, actually I refered the
> > > test for writing my code :). So maybe it is not quite useful for
> > > merging the code as a test?
> > >
> > > If both options are not ideal, I would spend time to land the
> > > feature in perf tool - the perf tool has supported eBPF backend for
> > > reading PMU counters, but it is absent function based profiling.
> >
> > We don't add tools to kernel repo. bpftool is an exception
> > because it's used during the selftest build.
> > 'perf' is another exception for historical reasons.
> >
> > This particular feature fits 'perf' the best.
>
> Agree, looks like perf is the best target for integration then.
Thanks for suggestions, Alexei and Daniel. It makes sense for me to
move to perf, and now I understand the policy for moving code from
samples/bpf.
It may be irrelevant to the patch itself. I know we have great BPF
toolings (BCC/bpftrace, etc), but it would be a bit confused for me
that we don't have a offical repo to maintain C based BPF toolkits.
Sometimes, C based BPF tool is small and handy ...
Thanks,
Leo
prev parent reply other threads:[~2025-01-20 21:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-19 15:33 [PATCH v1] samples/bpf: Add a trace tool with perf PMU counters Leo Yan
2025-01-20 16:18 ` Daniel Borkmann
2025-01-20 18:50 ` Leo Yan
2025-01-20 19:38 ` Alexei Starovoitov
2025-01-20 19:54 ` Daniel Borkmann
2025-01-20 21:37 ` Leo Yan [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=20250120213708.GB261349@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=acme@kernel.org \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=hawk@kernel.org \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=namhyung@kernel.org \
--cc=qmo@kernel.org \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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