BPF List
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
	Ian Rogers <irogers@google.com>, KP Singh <kpsingh@kernel.org>,
	Matt Bobrowski <mattbobrowski@google.com>,
	Song Liu <song@kernel.org>, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Yonghong Song <yonghong.song@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	James Clark <james.clark@linaro.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Mike Leach <mike.leach@linaro.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/6] perf auxtrace: Support AUX pause and resume with BPF
Date: Fri, 8 Aug 2025 12:47:34 +0100	[thread overview]
Message-ID: <20250808114734.GB3420125@e132581.arm.com> (raw)
In-Reply-To: <0a0ed9d4-6511-4f0b-868f-22a3f95697f8@intel.com>

On Tue, Aug 05, 2025 at 10:16:29PM +0300, Adrian Hunter wrote:
> On 30/07/2025 21:26, Leo Yan wrote:
> > Hi Adrian,
> > 
> > On Mon, Jul 28, 2025 at 08:02:51PM +0300, Adrian Hunter wrote:
> >> On 25/07/2025 12:59, Leo Yan wrote:
> >>> This series extends Perf for fine-grained tracing by using BPF program
> >>> to pause and resume AUX tracing. The BPF program can be attached to
> >>> tracepoints (including ftrace tracepoints and dynamic tracepoints, like
> >>> kprobe, kretprobe, uprobe and uretprobe).
> >>
> >> Using eBPF to pause/resume AUX tracing seems like a great idea.
> >>
> >> AFAICT with this patch set, there is just support for pause/resume
> >> much like what could be done directly without eBPF, so I wonder if you
> >> could share a bit more on how you see this evolving, and what your
> >> future plans are?
> > 
> > IIUC, here you mean the tool can use `perf probe` to firstly create
> > probes, then enable tracepoints as PMU event for AUX pause and resume.
> 
> Yes, like:
> 
> $ sudo perf probe 'do_sys_openat2 how->flags how->mode'
> Added new event:
>   probe:do_sys_openat2 (on do_sys_openat2 with flags=how->flags mode=how->mode)
> 
> You can now use it in all perf tools, such as:
> 
>         perf record -e probe:do_sys_openat2 -aR sleep 1
> 
> $ sudo perf probe do_sys_openat2%return
> Added new event:
>   probe:do_sys_openat2__return (on do_sys_openat2%return)
> 
> You can now use it in all perf tools, such as:
> 
>         perf record -e probe:do_sys_openat2__return -aR sleep 1
> 
> $ sudo perf record --kcore -e intel_pt/aux-action=start-paused/k -e probe:do_sys_openat2/aux-action=resume/ --filter='flags==0x98800' -e probe:do_sys_openat2__return/aux-action=pause/ -- ls

Thanks a lot for sharing the commands. I was able to replicate them
using CoreSight.

Given that we can achieve the same result without using BPF, I am not
sure how useful this series is. It may give us a base for exploring
profiling that combines AUX trace and BPF, but I am fine with holding
on until we have clear requirements for it.

I would get suggestion from you and maintainers before proceeding
further.

Thanks,
Leo

  reply	other threads:[~2025-08-08 11:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-25  9:59 [PATCH v3 0/6] perf auxtrace: Support AUX pause and resume with BPF Leo Yan
2025-07-25  9:59 ` [PATCH PATCH v2 v3 1/6] perf/core: Make perf_event_aux_pause() as external function Leo Yan
2025-07-25  9:59 ` [PATCH PATCH v2 v3 2/6] bpf: Add bpf_perf_event_aux_pause kfunc Leo Yan
2025-07-25  9:59 ` [PATCH PATCH v2 v3 3/6] perf: auxtrace: Control AUX pause and resume with BPF Leo Yan
2025-07-25  9:59 ` [PATCH PATCH v2 v3 4/6] perf: auxtrace: Add BPF userspace program for AUX pause and resume Leo Yan
2025-07-25  9:59 ` [PATCH PATCH v2 v3 5/6] perf record: Support AUX pause and resume with BPF Leo Yan
2025-07-25  9:59 ` [PATCH PATCH v2 v3 6/6] perf docs: Document " Leo Yan
2025-07-25 10:16 ` [PATCH v3 0/6] perf auxtrace: Support " Leo Yan
2025-07-28 17:02 ` Adrian Hunter
2025-07-30 18:26   ` Leo Yan
2025-08-05 19:16     ` Adrian Hunter
2025-08-08 11:47       ` Leo Yan [this message]
2025-09-04 16:38         ` Arnaldo Carvalho de Melo

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=20250808114734.GB3420125@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mattbobrowski@google.com \
    --cc=mhiramat@kernel.org \
    --cc=mike.leach@linaro.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --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