From: Namhyung Kim <namhyung@kernel.org>
To: Blake Jones <blakejones@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ian Rogers <irogers@google.com>, Jiri Olsa <jolsa@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Kan Liang <kan.liang@linux.intel.com>,
Steven Rostedt <rostedt@goodmis.org>,
Tomas Glozar <tglozar@redhat.com>,
James Clark <james.clark@linaro.org>, Leo Yan <leo.yan@arm.com>,
Guilherme Amadio <amadio@gentoo.org>,
Yang Jihong <yangjihong@bytedance.com>,
Charlie Jenkins <charlie@rivosinc.com>,
Chun-Tse Shao <ctshao@google.com>,
Aditya Gupta <adityag@linux.ibm.com>,
Athira Rajeev <atrajeev@linux.vnet.ibm.com>,
Zhongqiu Han <quic_zhonhan@quicinc.com>,
Andi Kleen <ak@linux.intel.com>,
Dmitry Vyukov <dvyukov@google.com>,
Yujie Liu <yujie.liu@intel.com>,
Graham Woodward <graham.woodward@arm.com>,
Yicong Yang <yangyicong@hisilicon.com>,
Ben Gainey <ben.gainey@arm.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
bpf@vger.kernel.org
Subject: Re: [PATCH v2 3/4] perf: collect BPF metadata from new programs, and display the new event
Date: Fri, 6 Jun 2025 12:02:33 -0700 [thread overview]
Message-ID: <aEM7SeSC7yup7TJ7@google.com> (raw)
In-Reply-To: <20250605233934.1881839-4-blakejones@google.com>
Hi Blake,
On Thu, Jun 05, 2025 at 04:39:33PM -0700, Blake Jones wrote:
> This collects metadata for any BPF programs that were loaded during a
> "perf record" run, and emits it at the end of the run. It also adds support
> for displaying the new PERF_RECORD_BPF_METADATA type.
Can you please split the final synthesis and the processing/display
parts? I prefer commits doing one at a time.
>
> Here's some example "perf script -D" output for the new event type. The
> ": unhandled!" message is from tool.c, analogous to other behavior there.
> I've elided some rows with all NUL characters for brevity, and I wrapped
> one of the >75-column lines to fit in the commit guidelines.
>
> 0x50fc8@perf.data [0x260]: event: 84
> .
> . ... raw event: size 608 bytes
> . 0000: 54 00 00 00 00 00 60 02 62 70 66 5f 70 72 6f 67 T.....`.bpf_prog
> . 0010: 5f 31 65 30 61 32 65 33 36 36 65 35 36 66 31 61 _1e0a2e366e56f1a
> . 0020: 32 5f 70 65 72 66 5f 73 61 6d 70 6c 65 5f 66 69 2_perf_sample_fi
> . 0030: 6c 74 65 72 00 00 00 00 00 00 00 00 00 00 00 00 lter............
> . 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> [...]
> . 0110: 74 65 73 74 5f 76 61 6c 75 65 00 00 00 00 00 00 test_value......
> . 0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> [...]
> . 0150: 34 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 42..............
> . 0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> [...]
>
> 0 0x50fc8 [0x260]: PERF_RECORD_BPF_METADATA \
> prog bpf_prog_1e0a2e366e56f1a2_perf_sample_filter
> entry 0: test_value = 42
> : unhandled!
Looks good, thanks!
Namhyung
next prev parent reply other threads:[~2025-06-06 19:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 23:39 [PATCH v2 0/4] perf: generate events for BPF metadata Blake Jones
2025-06-05 23:39 ` [PATCH v2 1/4] perf: detect support for libbpf's emit_strings option Blake Jones
2025-06-06 19:04 ` Namhyung Kim
2025-06-06 21:52 ` Blake Jones
2025-06-05 23:39 ` [PATCH v2 2/4] perf: collect BPF metadata from existing BPF programs Blake Jones
2025-06-05 23:39 ` [PATCH v2 3/4] perf: collect BPF metadata from new programs, and display the new event Blake Jones
2025-06-06 19:02 ` Namhyung Kim [this message]
2025-06-06 21:51 ` Blake Jones
2025-06-05 23:39 ` [PATCH v2 4/4] perf: add test for PERF_RECORD_BPF_METADATA collection Blake Jones
2025-07-09 21:02 ` Ian Rogers
2025-07-09 21:08 ` Blake Jones
2025-07-09 21:44 ` Ian Rogers
2025-07-26 0:41 ` Blake Jones
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=aEM7SeSC7yup7TJ7@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adityag@linux.ibm.com \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=amadio@gentoo.org \
--cc=atrajeev@linux.vnet.ibm.com \
--cc=ben.gainey@arm.com \
--cc=blakejones@google.com \
--cc=bpf@vger.kernel.org \
--cc=charlie@rivosinc.com \
--cc=ctshao@google.com \
--cc=dvyukov@google.com \
--cc=graham.woodward@arm.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=leo.yan@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=quic_zhonhan@quicinc.com \
--cc=rostedt@goodmis.org \
--cc=tglozar@redhat.com \
--cc=yangjihong@bytedance.com \
--cc=yangyicong@hisilicon.com \
--cc=yujie.liu@intel.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).