Re: [PATCH v6 00/25] perf tool: Add evsel to perf_sample
From: Ian Rogers
Date: Wed Apr 08 2026 - 03:30:31 EST
On Mon, Apr 6, 2026 at 10:50 AM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
>
> On Sun, Apr 05, 2026 at 11:11:03PM -0700, Namhyung Kim wrote:
> > On Fri, Apr 03, 2026 at 08:43:00PM -0700, Ian Rogers wrote:
> > > Nearly all perf code ends up passing an evsel with the perf_sample,
> > > which is problematic if you want to rewrite the evsel such as with
> > > off-CPU processing - all uses of the evsel need fixing up. Previously
> > > I'd mailed this patch as an RFC with everything combined:
> > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@xxxxxxxxxx/
> > > and there was a request to break it up.
> > >
> > > I've started the series by adding documentation to struct
> > > perf_sample. Next I fixed missing perf_sample__init/exit largely from
> > > the recent perf inject callchain rewriting work. The 3rd patch adds
> > > the evsel to struct perf_sample and ensures it is correctly
> > > initialized. The next 22 patches avoid passing the evsel along with
> > > sample for different parts of the perf tool, along with some minor
> > > tweaks like constification and not determining the evsel if it is
> > > present in the sample.
> >
> > I'll test and process the first 3 patches first as I found an issue in
> > patch 6 and I guess applying patch 4 would break partial imports later.
>
> Applied the first 3 patches to perf-tools-next, thanks!
It looks like you tweaked the documentation of struct perf_sample.
There is a typo s/PEF_SAMPLE_IDENTIFIER/PERF_SAMPLE_IDENTIFIER/.
Thanks,
Ian
> Best regards,
> Namhyung
>