tools/perf/builtin-annotate.c | 28 +- tools/perf/builtin-c2c.c | 6 +- tools/perf/builtin-diff.c | 5 +- tools/perf/builtin-inject.c | 75 +++--- tools/perf/builtin-kmem.c | 95 ++++--- tools/perf/builtin-kvm.c | 22 +- tools/perf/builtin-kwork.c | 249 +++++++++++------- tools/perf/builtin-lock.c | 128 +++++---- tools/perf/builtin-mem.c | 1 - tools/perf/builtin-record.c | 3 +- tools/perf/builtin-report.c | 38 ++- tools/perf/builtin-sched.c | 198 +++++++------- tools/perf/builtin-script.c | 22 +- tools/perf/builtin-timechart.c | 164 +++++++----- tools/perf/builtin-top.c | 19 +- tools/perf/builtin-trace.c | 121 +++++---- tools/perf/tests/hists_cumulate.c | 1 - tools/perf/tests/hists_filter.c | 1 - tools/perf/tests/hists_output.c | 1 - tools/perf/tests/mmap-basic.c | 4 +- tools/perf/tests/openat-syscall-tp-fields.c | 2 +- tools/perf/tests/switch-tracking.c | 9 +- tools/perf/util/annotate.c | 19 +- tools/perf/util/annotate.h | 6 +- tools/perf/util/bpf_kwork.c | 22 +- tools/perf/util/build-id.c | 3 +- tools/perf/util/build-id.h | 7 +- tools/perf/util/callchain.c | 8 +- tools/perf/util/callchain.h | 6 +- tools/perf/util/data-convert-bt.c | 2 +- tools/perf/util/data-convert-json.c | 5 +- tools/perf/util/db-export.c | 13 +- tools/perf/util/db-export.h | 3 +- tools/perf/util/evsel.c | 137 +++++++--- tools/perf/util/evsel.h | 12 +- tools/perf/util/hist.c | 26 +- tools/perf/util/hist.h | 3 +- tools/perf/util/intel-pt.c | 2 +- tools/perf/util/intel-tpebs.c | 3 +- tools/perf/util/jitdump.c | 2 +- .../perf/util/kvm-stat-arch/kvm-stat-arm64.c | 19 +- .../util/kvm-stat-arch/kvm-stat-loongarch.c | 17 +- .../util/kvm-stat-arch/kvm-stat-powerpc.c | 17 +- .../perf/util/kvm-stat-arch/kvm-stat-riscv.c | 17 +- tools/perf/util/kvm-stat-arch/kvm-stat-s390.c | 20 +- tools/perf/util/kvm-stat-arch/kvm-stat-x86.c | 70 ++--- tools/perf/util/kvm-stat.c | 19 +- tools/perf/util/kvm-stat.h | 18 +- tools/perf/util/kwork.h | 11 +- tools/perf/util/machine.c | 14 +- tools/perf/util/machine.h | 3 - tools/perf/util/s390-sample-raw.c | 31 ++- .../util/scripting-engines/trace-event-perl.c | 23 +- .../scripting-engines/trace-event-python.c | 47 ++-- tools/perf/util/session.c | 38 +-- tools/perf/util/synthetic-events.c | 49 ++-- tools/perf/util/synthetic-events.h | 2 - tools/perf/util/tool.c | 4 +- tools/perf/util/tool.h | 4 +- tools/perf/util/trace-event-scripting.c | 5 +- tools/perf/util/trace-event.h | 3 - 61 files changed, 991 insertions(+), 911 deletions(-)
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) because all uses of the evsel need to be fixed
up. Since the perf_sample now carries its own resolved evsel pointer,
passing evsel separately is redundant and error-prone (allowing
parameter divergence bugs).
This series cleans up the redundant evsel parameter across all perf
tool subcommands and APIs, ensuring that tools uniformly retrieve
event attributes directly from the sample itself. This simplifies
function signatures and improves API consistency.
Additionally, this series incorporates subsequent memory safety
improvements, robust bounds checking, and memory leak corrections
prompted by address sanitizers and Sashiko code reviews.
The original combined RFC patch:
https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/
was split up per reviewer requests.
v14:
- Incorporate Acked-by tags from Namhyung Kim.
- Re-polish and expand commit descriptions to provide thorough explanations
of the changes and their rationale.
v13: Rebase removing patches merged by Namhyung. Namhyung proposed
changes that are in this series, but we became diverged. Address
some minor Sashiko issues.
https://lore.kernel.org/linux-perf-users/20260512223001.2952848-1-irogers@google.com/
v12: Add missing byteswap for tracepoint rawptr for dynamic
offsets. Avoid some unsigned <0 compiler warnings.
https://lore.kernel.org/linux-perf-users/20260413041143.1736055-1-irogers@google.com/
v11: Separate any remaining error path or other fixes out of
refactoring the evsel into sample. Incorporate Sashiko
feedback. Improve bounds checking for tracepoint data in
samples. Incorporate changes from Namhyung.
https://lore.kernel.org/lkml/20260413012227.1089445-1-irogers@google.com/
v10: Changes to some of the bounds checks as prompted by Sashiko.
https://lore.kernel.org/linux-perf-users/20260412020833.641177-1-irogers@google.com/
v9: Clean up some error path nits caught by Sashiko and simple bound
checks Sashiko recommended.
https://lore.kernel.org/linux-perf-users/20260411191710.524998-1-irogers@google.com/
v8: Fix address sanitizer issues with kwork and move patches, along
with bound check additions, to end of series.
https://lore.kernel.org/linux-perf-users/20260411065718.372240-1-irogers@google.com/
v7: Separate out kwork work->name to a strdup into its own patch, now patch 4.
https://lore.kernel.org/linux-perf-users/20260408072601.210837-1-irogers@google.com/
v6: Address more Sashiko feedback.
https://lore.kernel.org/lkml/20260404034325.3172592-1-irogers@google.com/
v5: Address feedback from Sashiko and Namhyung.
https://lore.kernel.org/lkml/20260403204017.2919994-1-irogers@google.com/
v4: Fix more sashiko issues: bounds checks, memory safety, making
refactors better, inconsistent evsels, mmap2 buildid injection
choice of evsel, mismatched function arguments.
https://sashiko.dev/#/patchset/20260320080835.724836-1-irogers%40google.com
https://lore.kernel.org/lkml/20260320192627.368357-1-irogers@google.com/
v3: Fix various sashiko review comments particularly about unintended
behavior changes.
https://lore.kernel.org/lkml/20260320080835.724836-1-irogers@google.com/
v2: Add review feedback on the first 2 patches from Namhyung, fix a
missed evsel assignment running event2evsel in builtin-inject.
https://lore.kernel.org/lkml/20260319232334.287517-1-irogers@google.com/
v1: https://lore.kernel.org/lkml/20260209174032.4142096-1-irogers@google.com/
Ian Rogers (32):
perf tool: Remove evsel from tool APIs that pass the sample
perf kvm: Don't pass evsel with sample
perf evsel: Refactor evsel tracepoint sample accessors perf_sample
perf trace: Don't pass evsel with sample
perf callchain: Don't pass evsel and sample
perf lock: Only pass sample to handlers
perf hist: Remove evsel parameter from inc samples functions
perf db-export: Remove evsel from struct export_sample
perf hist: Remove evsel from struct hist_entry_iter
perf report: Directly use sample->evsel to avoid computing from
sample->id
perf annotate: Don't pass evsel to add_sample
perf inject: Don't pass evsel with sample
perf kmem: Don't pass evsel with sample
perf kwork: Don't pass evsel with sample
perf sched: Don't pass evsel with sample
perf timechart: Don't pass evsel with sample
perf trace: Don't pass evsel with sample
perf evlist: Try to avoid computing evsel from sample
perf script: Don't pass evsel with sample
perf s390-sample-raw: Don't pass evsel or its PMU with sample
perf evsel: Don't pass evsel with sample
perf lock: Constify trace_lock_handler variables
perf lock: Avoid segv if event is missing a callchain
perf timechart: Fix memory leaks
perf kmem: Fix memory leaks on error path and when skipping
perf synthetic-events: Bound check when synthesizing mmap2 and
build_id events
perf kmem: Add bounds checks to tracepoint read values
perf sched: Bounds check CPU in sched switch events
perf timechart: Bounds check CPU
perf evsel: Add bounds checking to trace point raw data accessors
perf kwork: Fix address sanitizer issues
perf kwork: Fix memory management of kwork_work
tools/perf/builtin-annotate.c | 28 +-
tools/perf/builtin-c2c.c | 6 +-
tools/perf/builtin-diff.c | 5 +-
tools/perf/builtin-inject.c | 75 +++---
tools/perf/builtin-kmem.c | 95 ++++---
tools/perf/builtin-kvm.c | 22 +-
tools/perf/builtin-kwork.c | 249 +++++++++++-------
tools/perf/builtin-lock.c | 128 +++++----
tools/perf/builtin-mem.c | 1 -
tools/perf/builtin-record.c | 3 +-
tools/perf/builtin-report.c | 38 ++-
tools/perf/builtin-sched.c | 198 +++++++-------
tools/perf/builtin-script.c | 22 +-
tools/perf/builtin-timechart.c | 164 +++++++-----
tools/perf/builtin-top.c | 19 +-
tools/perf/builtin-trace.c | 121 +++++----
tools/perf/tests/hists_cumulate.c | 1 -
tools/perf/tests/hists_filter.c | 1 -
tools/perf/tests/hists_output.c | 1 -
tools/perf/tests/mmap-basic.c | 4 +-
tools/perf/tests/openat-syscall-tp-fields.c | 2 +-
tools/perf/tests/switch-tracking.c | 9 +-
tools/perf/util/annotate.c | 19 +-
tools/perf/util/annotate.h | 6 +-
tools/perf/util/bpf_kwork.c | 22 +-
tools/perf/util/build-id.c | 3 +-
tools/perf/util/build-id.h | 7 +-
tools/perf/util/callchain.c | 8 +-
tools/perf/util/callchain.h | 6 +-
tools/perf/util/data-convert-bt.c | 2 +-
tools/perf/util/data-convert-json.c | 5 +-
tools/perf/util/db-export.c | 13 +-
tools/perf/util/db-export.h | 3 +-
tools/perf/util/evsel.c | 137 +++++++---
tools/perf/util/evsel.h | 12 +-
tools/perf/util/hist.c | 26 +-
tools/perf/util/hist.h | 3 +-
tools/perf/util/intel-pt.c | 2 +-
tools/perf/util/intel-tpebs.c | 3 +-
tools/perf/util/jitdump.c | 2 +-
.../perf/util/kvm-stat-arch/kvm-stat-arm64.c | 19 +-
.../util/kvm-stat-arch/kvm-stat-loongarch.c | 17 +-
.../util/kvm-stat-arch/kvm-stat-powerpc.c | 17 +-
.../perf/util/kvm-stat-arch/kvm-stat-riscv.c | 17 +-
tools/perf/util/kvm-stat-arch/kvm-stat-s390.c | 20 +-
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c | 70 ++---
tools/perf/util/kvm-stat.c | 19 +-
tools/perf/util/kvm-stat.h | 18 +-
tools/perf/util/kwork.h | 11 +-
tools/perf/util/machine.c | 14 +-
tools/perf/util/machine.h | 3 -
tools/perf/util/s390-sample-raw.c | 31 ++-
.../util/scripting-engines/trace-event-perl.c | 23 +-
.../scripting-engines/trace-event-python.c | 47 ++--
tools/perf/util/session.c | 38 +--
tools/perf/util/synthetic-events.c | 49 ++--
tools/perf/util/synthetic-events.h | 2 -
tools/perf/util/tool.c | 4 +-
tools/perf/util/tool.h | 4 +-
tools/perf/util/trace-event-scripting.c | 5 +-
tools/perf/util/trace-event.h | 3 -
61 files changed, 991 insertions(+), 911 deletions(-)
--
2.54.0.746.g67dd491aae-goog
On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed > up. Since the perf_sample now carries its own resolved evsel pointer, > passing evsel separately is redundant and error-prone (allowing > parameter divergence bugs). > > This series cleans up the redundant evsel parameter across all perf > tool subcommands and APIs, ensuring that tools uniformly retrieve > event attributes directly from the sample itself. This simplifies > function signatures and improves API consistency. > > Additionally, this series incorporates subsequent memory safety > improvements, robust bounds checking, and memory leak corrections > prompted by address sanitizers and Sashiko code reviews. > > The original combined RFC patch: > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/ > was split up per reviewer requests. > > v14: > - Incorporate Acked-by tags from Namhyung Kim. > - Re-polish and expand commit descriptions to provide thorough explanations > of the changes and their rationale. Thanks, tentatively applying it to perf-tools-next, for v7.2. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
On Wed, May 20, 2026 at 04:15:30PM -0300, Arnaldo Carvalho de Melo wrote: > On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed > > up. Since the perf_sample now carries its own resolved evsel pointer, > > passing evsel separately is redundant and error-prone (allowing > > parameter divergence bugs). > > > > This series cleans up the redundant evsel parameter across all perf > > tool subcommands and APIs, ensuring that tools uniformly retrieve > > event attributes directly from the sample itself. This simplifies > > function signatures and improves API consistency. > > > > Additionally, this series incorporates subsequent memory safety > > improvements, robust bounds checking, and memory leak corrections > > prompted by address sanitizers and Sashiko code reviews. > > > > The original combined RFC patch: > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/ > > was split up per reviewer requests. > > > > v14: > > - Incorporate Acked-by tags from Namhyung Kim. > > - Re-polish and expand commit descriptions to provide thorough explanations > > of the changes and their rationale. > > Thanks, tentatively applying it to perf-tools-next, for v7.2. Had to apply a minor fixup for a conflict with anoter patch series from you, the LBR one. - Arnaldo
On Wed, May 20, 2026 at 12:46 PM Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > On Wed, May 20, 2026 at 04:15:30PM -0300, Arnaldo Carvalho de Melo wrote: > > On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed > > > up. Since the perf_sample now carries its own resolved evsel pointer, > > > passing evsel separately is redundant and error-prone (allowing > > > parameter divergence bugs). > > > > > > This series cleans up the redundant evsel parameter across all perf > > > tool subcommands and APIs, ensuring that tools uniformly retrieve > > > event attributes directly from the sample itself. This simplifies > > > function signatures and improves API consistency. > > > > > > Additionally, this series incorporates subsequent memory safety > > > improvements, robust bounds checking, and memory leak corrections > > > prompted by address sanitizers and Sashiko code reviews. > > > > > > The original combined RFC patch: > > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/ > > > was split up per reviewer requests. > > > > > > v14: > > > - Incorporate Acked-by tags from Namhyung Kim. > > > - Re-polish and expand commit descriptions to provide thorough explanations > > > of the changes and their rationale. > > > > Thanks, tentatively applying it to perf-tools-next, for v7.2. > > Had to apply a minor fixup for a conflict with anoter patch series from > you, the LBR one. Sorry for that and thanks for dealing with the conflict! Any chance you could push to tmp.perf-tools-next? I have some other series that will conflict and it would be nice to rebase those changes there. Thanks, Ian > - Arnaldo
On Wed, May 20, 2026 at 01:40:48PM -0700, Ian Rogers wrote: > On Wed, May 20, 2026 at 12:46 PM Arnaldo Carvalho de Melo > <acme@kernel.org> wrote: > > > > On Wed, May 20, 2026 at 04:15:30PM -0300, Arnaldo Carvalho de Melo wrote: > > > On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed > > > > up. Since the perf_sample now carries its own resolved evsel pointer, > > > > passing evsel separately is redundant and error-prone (allowing > > > > parameter divergence bugs). > > > > > > > > This series cleans up the redundant evsel parameter across all perf > > > > tool subcommands and APIs, ensuring that tools uniformly retrieve > > > > event attributes directly from the sample itself. This simplifies > > > > function signatures and improves API consistency. > > > > > > > > Additionally, this series incorporates subsequent memory safety > > > > improvements, robust bounds checking, and memory leak corrections > > > > prompted by address sanitizers and Sashiko code reviews. > > > > > > > > The original combined RFC patch: > > > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/ > > > > was split up per reviewer requests. > > > > > > > > v14: > > > > - Incorporate Acked-by tags from Namhyung Kim. > > > > - Re-polish and expand commit descriptions to provide thorough explanations > > > > of the changes and their rationale. > > > > > > Thanks, tentatively applying it to perf-tools-next, for v7.2. > > > > Had to apply a minor fixup for a conflict with anoter patch series from > > you, the LBR one. > > Sorry for that and thanks for dealing with the conflict! Any chance > you could push to tmp.perf-tools-next? I have some other series that > will conflict and it would be nice to rebase those changes there. I just removed the last two patches, the ones for kwork, as: + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= NO_LIBELF=1 -C tools/perf O=/tmp/build/perf make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' BUILD: Doing 'make -j32' parallel build Makefile.config:647: Warning: Disabled BPF skeletons as libelf is required by bpftool Makefile.config:745: Disabling post unwind, no support found. Makefile.config:856: Missing python setuptools, the python binding won't be built, please install python3-setuptools or equivalent Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. Auto-detecting system features: ... libdw: [ on ] ... glibc: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libpython: [ on ] ... libcapstone: [ on ] ... llvm-perf: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... bpf: [ on ] ... libaio: [ on ] ... libzstd: [ on ] ... libopenssl: [ on ] ... rust: [ OFF ] CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o <SNIP> LINK /tmp/build/perf/perf /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_pop_atom': builtin-kwork.c:(.text+0x59c92): undefined reference to `work_exit' /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_push_atom.constprop.0': builtin-kwork.c:(.text+0x5aba8): undefined reference to `work_exit' /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `cmd_kwork': (.text+0x5bb4b): undefined reference to `work_exit' /usr/bin/ld: (.text+0x5bbae): undefined reference to `work_exit' /usr/bin/ld: (.text+0x5c3b2): undefined reference to `work_exit' collect2: error: ld returned 1 exit status make[2]: *** [Makefile.perf:586: /tmp/build/perf/perf] Error 1 make[1]: *** [Makefile.perf:289: sub-make] Error 2 make: *** [Makefile:76: all] Error 2 make: Leaving directory '/git/perf-7.1.0-rc2/tools/perf' + exit 1 toolsbuilder@five:~$ I'm doing some more tests, just a moment and I'll push what I have to tmp.perf-tools-next. - Arnaldo
On Wed, May 20, 2026 at 05:49:57PM -0300, Arnaldo Carvalho de Melo wrote:
> On Wed, May 20, 2026 at 01:40:48PM -0700, Ian Rogers wrote:
> > On Wed, May 20, 2026 at 12:46 PM Arnaldo Carvalho de Melo
> > <acme@kernel.org> wrote:
> > >
> > > On Wed, May 20, 2026 at 04:15:30PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed
> > > > > up. Since the perf_sample now carries its own resolved evsel pointer,
> > > > > passing evsel separately is redundant and error-prone (allowing
> > > > > parameter divergence bugs).
> > > > >
> > > > > This series cleans up the redundant evsel parameter across all perf
> > > > > tool subcommands and APIs, ensuring that tools uniformly retrieve
> > > > > event attributes directly from the sample itself. This simplifies
> > > > > function signatures and improves API consistency.
> > > > >
> > > > > Additionally, this series incorporates subsequent memory safety
> > > > > improvements, robust bounds checking, and memory leak corrections
> > > > > prompted by address sanitizers and Sashiko code reviews.
> > > > >
> > > > > The original combined RFC patch:
> > > > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/
> > > > > was split up per reviewer requests.
> > > > >
> > > > > v14:
> > > > > - Incorporate Acked-by tags from Namhyung Kim.
> > > > > - Re-polish and expand commit descriptions to provide thorough explanations
> > > > > of the changes and their rationale.
> > > >
> > > > Thanks, tentatively applying it to perf-tools-next, for v7.2.
> > >
> > > Had to apply a minor fixup for a conflict with anoter patch series from
> > > you, the LBR one.
> >
> > Sorry for that and thanks for dealing with the conflict! Any chance
> > you could push to tmp.perf-tools-next? I have some other series that
> > will conflict and it would be nice to rebase those changes there.
>
> I just removed the last two patches, the ones for kwork, as:
>
> + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= NO_LIBELF=1 -C tools/perf O=/tmp/build/perf
> make: Entering directory '/git/perf-7.1.0-rc2/tools/perf'
> BUILD: Doing 'make -j32' parallel build
> Makefile.config:647: Warning: Disabled BPF skeletons as libelf is required by bpftool
> Makefile.config:745: Disabling post unwind, no support found.
> Makefile.config:856: Missing python setuptools, the python binding won't be built, please install python3-setuptools or equivalent
> Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
> Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev
> Makefile.config:1135: Rust is not found. Test workloads with rust are disabled.
>
> Auto-detecting system features:
> ... libdw: [ on ]
> ... glibc: [ on ]
> ... libelf: [ on ]
> ... libnuma: [ on ]
> ... numa_num_possible_cpus: [ on ]
> ... libpython: [ on ]
> ... libcapstone: [ on ]
> ... llvm-perf: [ on ]
> ... zlib: [ on ]
> ... lzma: [ on ]
> ... bpf: [ on ]
> ... libaio: [ on ]
> ... libzstd: [ on ]
> ... libopenssl: [ on ]
> ... rust: [ OFF ]
>
> CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o
> <SNIP>
> LINK /tmp/build/perf/perf
> /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_pop_atom':
> builtin-kwork.c:(.text+0x59c92): undefined reference to `work_exit'
> /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_push_atom.constprop.0':
> builtin-kwork.c:(.text+0x5aba8): undefined reference to `work_exit'
> /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `cmd_kwork':
> (.text+0x5bb4b): undefined reference to `work_exit'
> /usr/bin/ld: (.text+0x5bbae): undefined reference to `work_exit'
> /usr/bin/ld: (.text+0x5c3b2): undefined reference to `work_exit'
> collect2: error: ld returned 1 exit status
> make[2]: *** [Makefile.perf:586: /tmp/build/perf/perf] Error 1
> make[1]: *** [Makefile.perf:289: sub-make] Error 2
> make: *** [Makefile:76: all] Error 2
> make: Leaving directory '/git/perf-7.1.0-rc2/tools/perf'
> + exit 1
> toolsbuilder@five:~$
>
>
> I'm doing some more tests, just a moment and I'll push what I have to
> tmp.perf-tools-next.
Also:
toolsbuilder@five:~$ cat dm.log/almalinux\:8
<SNIP>
OLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugs.almalinux.org/ --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC)
+ make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= -C tools/perf O=/tmp/build/perf
make: Entering directory '/git/perf-7.1.0-rc2/tools/perf'
BUILD: Doing 'make -j32' parallel build
Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
Makefile.config:1061: No libcapstone found, disables disasm engine support for 'perf script', please install libcapstone-dev/capstone-devel
Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev
Makefile.config:1135: Rust is not found. Test workloads with rust are disabled.
Auto-detecting system features:
... libdw: [ on ]
... glibc: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libpython: [ on ]
... libcapstone: [ OFF ]
... llvm-perf: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... bpf: [ on ]
... libaio: [ on ]
... libzstd: [ on ]
... libopenssl: [ on ]
... rust: [ OFF ]
CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o
CC /tmp/build/perf/dlfilters/dlfilter-test-api-v2.o
<SNIP>
COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/cache.json
COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/counter.json
COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/floating-point.json
COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/frontend.json
COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/memory.json
COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/other.json
COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/pipeline.json
COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/virtual-memory.json
GEN /tmp/build/perf/pmu-events/test-empty-pmu-events.c
Traceback (most recent call last):
File "pmu-events/jevents.py", line 1524, in <module>
main()
File "pmu-events/jevents.py", line 1487, in main
with concurrent.futures.ProcessPoolExecutor(initializer=_init_worker, initargs=(_arch_std_events,)) as executor:
TypeError: __init__() got an unexpected keyword argument 'initializer'
make[3]: *** [pmu-events/Build:176: /tmp/build/perf/pmu-events/test-empty-pmu-events.c] Error 1
make[3]: *** Deleting file '/tmp/build/perf/pmu-events/test-empty-pmu-events.c'
make[2]: *** [Makefile.perf:554: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
make[2]: *** Waiting for unfinished jobs....
On Wed, May 20, 2026 at 1:51 PM Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > On Wed, May 20, 2026 at 05:49:57PM -0300, Arnaldo Carvalho de Melo wrote: > > On Wed, May 20, 2026 at 01:40:48PM -0700, Ian Rogers wrote: > > > On Wed, May 20, 2026 at 12:46 PM Arnaldo Carvalho de Melo > > > <acme@kernel.org> wrote: > > > > > > > > On Wed, May 20, 2026 at 04:15:30PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed > > > > > > up. Since the perf_sample now carries its own resolved evsel pointer, > > > > > > passing evsel separately is redundant and error-prone (allowing > > > > > > parameter divergence bugs). > > > > > > > > > > > > This series cleans up the redundant evsel parameter across all perf > > > > > > tool subcommands and APIs, ensuring that tools uniformly retrieve > > > > > > event attributes directly from the sample itself. This simplifies > > > > > > function signatures and improves API consistency. > > > > > > > > > > > > Additionally, this series incorporates subsequent memory safety > > > > > > improvements, robust bounds checking, and memory leak corrections > > > > > > prompted by address sanitizers and Sashiko code reviews. > > > > > > > > > > > > The original combined RFC patch: > > > > > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/ > > > > > > was split up per reviewer requests. > > > > > > > > > > > > v14: > > > > > > - Incorporate Acked-by tags from Namhyung Kim. > > > > > > - Re-polish and expand commit descriptions to provide thorough explanations > > > > > > of the changes and their rationale. > > > > > > > > > > Thanks, tentatively applying it to perf-tools-next, for v7.2. > > > > > > > > Had to apply a minor fixup for a conflict with anoter patch series from > > > > you, the LBR one. > > > > > > Sorry for that and thanks for dealing with the conflict! Any chance > > > you could push to tmp.perf-tools-next? I have some other series that > > > will conflict and it would be nice to rebase those changes there. > > > > I just removed the last two patches, the ones for kwork, as: > > > > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= NO_LIBELF=1 -C tools/perf O=/tmp/build/perf > > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' > > BUILD: Doing 'make -j32' parallel build > > Makefile.config:647: Warning: Disabled BPF skeletons as libelf is required by bpftool > > Makefile.config:745: Disabling post unwind, no support found. > > Makefile.config:856: Missing python setuptools, the python binding won't be built, please install python3-setuptools or equivalent > > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev > > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev > > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. > > > > Auto-detecting system features: > > ... libdw: [ on ] > > ... glibc: [ on ] > > ... libelf: [ on ] > > ... libnuma: [ on ] > > ... numa_num_possible_cpus: [ on ] > > ... libpython: [ on ] > > ... libcapstone: [ on ] > > ... llvm-perf: [ on ] > > ... zlib: [ on ] > > ... lzma: [ on ] > > ... bpf: [ on ] > > ... libaio: [ on ] > > ... libzstd: [ on ] > > ... libopenssl: [ on ] > > ... rust: [ OFF ] > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o > > <SNIP> > > LINK /tmp/build/perf/perf > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_pop_atom': > > builtin-kwork.c:(.text+0x59c92): undefined reference to `work_exit' > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_push_atom.constprop.0': > > builtin-kwork.c:(.text+0x5aba8): undefined reference to `work_exit' > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `cmd_kwork': > > (.text+0x5bb4b): undefined reference to `work_exit' > > /usr/bin/ld: (.text+0x5bbae): undefined reference to `work_exit' > > /usr/bin/ld: (.text+0x5c3b2): undefined reference to `work_exit' > > collect2: error: ld returned 1 exit status > > make[2]: *** [Makefile.perf:586: /tmp/build/perf/perf] Error 1 > > make[1]: *** [Makefile.perf:289: sub-make] Error 2 > > make: *** [Makefile:76: all] Error 2 > > make: Leaving directory '/git/perf-7.1.0-rc2/tools/perf' > > + exit 1 > > toolsbuilder@five:~$ > > > > > > I'm doing some more tests, just a moment and I'll push what I have to > > tmp.perf-tools-next. > > Also: > > toolsbuilder@five:~$ cat dm.log/almalinux\:8 > <SNIP> > OLLECT_GCC=gcc > COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper > OFFLOAD_TARGET_NAMES=nvptx-none > OFFLOAD_TARGET_DEFAULT=1 > Target: x86_64-redhat-linux > Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugs.almalinux.org/ --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux > Thread model: posix > gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= -C tools/perf O=/tmp/build/perf > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' > BUILD: Doing 'make -j32' parallel build > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev > Makefile.config:1061: No libcapstone found, disables disasm engine support for 'perf script', please install libcapstone-dev/capstone-devel > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. > > Auto-detecting system features: > ... libdw: [ on ] > ... glibc: [ on ] > ... libelf: [ on ] > ... libnuma: [ on ] > ... numa_num_possible_cpus: [ on ] > ... libpython: [ on ] > ... libcapstone: [ OFF ] > ... llvm-perf: [ on ] > ... zlib: [ on ] > ... lzma: [ on ] > ... bpf: [ on ] > ... libaio: [ on ] > ... libzstd: [ on ] > ... libopenssl: [ on ] > ... rust: [ OFF ] > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v2.o > <SNIP> > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/cache.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/counter.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/floating-point.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/frontend.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/memory.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/other.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/pipeline.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/virtual-memory.json > GEN /tmp/build/perf/pmu-events/test-empty-pmu-events.c > Traceback (most recent call last): > File "pmu-events/jevents.py", line 1524, in <module> > main() > File "pmu-events/jevents.py", line 1487, in main > with concurrent.futures.ProcessPoolExecutor(initializer=_init_worker, initargs=(_arch_std_events,)) as executor: > TypeError: __init__() got an unexpected keyword argument 'initializer' The `initializer` and `initargs` parameters were added to `concurrent.futures.ProcessPoolExecutor`.futures.ProcessPoolExecutor in Python 3.7. Python 3.7 is past its end of life and the kernel build specified that Python 3.9 is the minimum supported: https://docs.kernel.org/process/changes.html A fix for this is to disable jevents for older Python versions, but detecting this will incur a build-time cost. Thanks, Ian > make[3]: *** [pmu-events/Build:176: /tmp/build/perf/pmu-events/test-empty-pmu-events.c] Error 1 > make[3]: *** Deleting file '/tmp/build/perf/pmu-events/test-empty-pmu-events.c' > make[2]: *** [Makefile.perf:554: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2 > make[2]: *** Waiting for unfinished jobs.... >
On Wed, May 20, 2026 at 05:51:36PM -0300, Arnaldo Carvalho de Melo wrote: > On Wed, May 20, 2026 at 05:49:57PM -0300, Arnaldo Carvalho de Melo wrote: > > On Wed, May 20, 2026 at 01:40:48PM -0700, Ian Rogers wrote: > > > On Wed, May 20, 2026 at 12:46 PM Arnaldo Carvalho de Melo > > > <acme@kernel.org> wrote: > > > > > > > > On Wed, May 20, 2026 at 04:15:30PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed > > > > > > up. Since the perf_sample now carries its own resolved evsel pointer, > > > > > > passing evsel separately is redundant and error-prone (allowing > > > > > > parameter divergence bugs). > > > > > > > > > > > > This series cleans up the redundant evsel parameter across all perf > > > > > > tool subcommands and APIs, ensuring that tools uniformly retrieve > > > > > > event attributes directly from the sample itself. This simplifies > > > > > > function signatures and improves API consistency. > > > > > > > > > > > > Additionally, this series incorporates subsequent memory safety > > > > > > improvements, robust bounds checking, and memory leak corrections > > > > > > prompted by address sanitizers and Sashiko code reviews. > > > > > > > > > > > > The original combined RFC patch: > > > > > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/ > > > > > > was split up per reviewer requests. > > > > > > > > > > > > v14: > > > > > > - Incorporate Acked-by tags from Namhyung Kim. > > > > > > - Re-polish and expand commit descriptions to provide thorough explanations > > > > > > of the changes and their rationale. > > > > > > > > > > Thanks, tentatively applying it to perf-tools-next, for v7.2. > > > > > > > > Had to apply a minor fixup for a conflict with anoter patch series from > > > > you, the LBR one. > > > > > > Sorry for that and thanks for dealing with the conflict! Any chance > > > you could push to tmp.perf-tools-next? I have some other series that > > > will conflict and it would be nice to rebase those changes there. > > > > I just removed the last two patches, the ones for kwork, as: > > > > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= NO_LIBELF=1 -C tools/perf O=/tmp/build/perf > > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' > > BUILD: Doing 'make -j32' parallel build > > Makefile.config:647: Warning: Disabled BPF skeletons as libelf is required by bpftool > > Makefile.config:745: Disabling post unwind, no support found. > > Makefile.config:856: Missing python setuptools, the python binding won't be built, please install python3-setuptools or equivalent > > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev > > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev > > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. > > > > Auto-detecting system features: > > ... libdw: [ on ] > > ... glibc: [ on ] > > ... libelf: [ on ] > > ... libnuma: [ on ] > > ... numa_num_possible_cpus: [ on ] > > ... libpython: [ on ] > > ... libcapstone: [ on ] > > ... llvm-perf: [ on ] > > ... zlib: [ on ] > > ... lzma: [ on ] > > ... bpf: [ on ] > > ... libaio: [ on ] > > ... libzstd: [ on ] > > ... libopenssl: [ on ] > > ... rust: [ OFF ] > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o > > <SNIP> > > LINK /tmp/build/perf/perf > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_pop_atom': > > builtin-kwork.c:(.text+0x59c92): undefined reference to `work_exit' > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_push_atom.constprop.0': > > builtin-kwork.c:(.text+0x5aba8): undefined reference to `work_exit' > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `cmd_kwork': > > (.text+0x5bb4b): undefined reference to `work_exit' > > /usr/bin/ld: (.text+0x5bbae): undefined reference to `work_exit' > > /usr/bin/ld: (.text+0x5c3b2): undefined reference to `work_exit' > > collect2: error: ld returned 1 exit status > > make[2]: *** [Makefile.perf:586: /tmp/build/perf/perf] Error 1 > > make[1]: *** [Makefile.perf:289: sub-make] Error 2 > > make: *** [Makefile:76: all] Error 2 > > make: Leaving directory '/git/perf-7.1.0-rc2/tools/perf' > > + exit 1 > > toolsbuilder@five:~$ > > > > > > I'm doing some more tests, just a moment and I'll push what I have to > > tmp.perf-tools-next. > > Also: > > toolsbuilder@five:~$ cat dm.log/almalinux\:8 > <SNIP> > OLLECT_GCC=gcc > COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper > OFFLOAD_TARGET_NAMES=nvptx-none > OFFLOAD_TARGET_DEFAULT=1 > Target: x86_64-redhat-linux > Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugs.almalinux.org/ --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux > Thread model: posix > gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= -C tools/perf O=/tmp/build/perf > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' > BUILD: Doing 'make -j32' parallel build > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev > Makefile.config:1061: No libcapstone found, disables disasm engine support for 'perf script', please install libcapstone-dev/capstone-devel > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. > > Auto-detecting system features: > ... libdw: [ on ] > ... glibc: [ on ] > ... libelf: [ on ] > ... libnuma: [ on ] > ... numa_num_possible_cpus: [ on ] > ... libpython: [ on ] > ... libcapstone: [ OFF ] > ... llvm-perf: [ on ] > ... zlib: [ on ] > ... lzma: [ on ] > ... bpf: [ on ] > ... libaio: [ on ] > ... libzstd: [ on ] > ... libopenssl: [ on ] > ... rust: [ OFF ] > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v2.o > <SNIP> > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/cache.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/counter.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/floating-point.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/frontend.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/memory.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/other.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/pipeline.json > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/virtual-memory.json > GEN /tmp/build/perf/pmu-events/test-empty-pmu-events.c > Traceback (most recent call last): > File "pmu-events/jevents.py", line 1524, in <module> > main() > File "pmu-events/jevents.py", line 1487, in main > with concurrent.futures.ProcessPoolExecutor(initializer=_init_worker, initargs=(_arch_std_events,)) as executor: > TypeError: __init__() got an unexpected keyword argument 'initializer' > make[3]: *** [pmu-events/Build:176: /tmp/build/perf/pmu-events/test-empty-pmu-events.c] Error 1 > make[3]: *** Deleting file '/tmp/build/perf/pmu-events/test-empty-pmu-events.c' > make[2]: *** [Makefile.perf:554: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2 > make[2]: *** Waiting for unfinished jobs.... But: toolsbuilder@five:~$ export BUILD_TARBALL=http://192.168.86.5/perf/perf-7.1.0-rc2.tar.xz toolsbuilder@five:~$ time dm 1 8.77 almalinux:8 : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) 2 84.96 almalinux:9 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-3.el9) flex 2.6.4 3: 103.23 almalinux:9-i386 : Ok gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3) , clang version 17.0.6 (AlmaLinux OS Foundation 17.0.6-5.el9) flex 2.6.4 4 90.91 almalinux:10 : Ok gcc (GCC) 14.3.1 20250617 (Red Hat 14.3.1-2) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-1.el10.alma.1) flex 2.6.4 5 118.21 alpine:3.16 : Ok gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219 , Alpine clang version 13.0.1 flex 2.6.4 ...
On Wed, May 20, 2026 at 1:55 PM Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > On Wed, May 20, 2026 at 05:51:36PM -0300, Arnaldo Carvalho de Melo wrote: > > On Wed, May 20, 2026 at 05:49:57PM -0300, Arnaldo Carvalho de Melo wrote: > > > On Wed, May 20, 2026 at 01:40:48PM -0700, Ian Rogers wrote: > > > > On Wed, May 20, 2026 at 12:46 PM Arnaldo Carvalho de Melo > > > > <acme@kernel.org> wrote: > > > > > > > > > > On Wed, May 20, 2026 at 04:15:30PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > > On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed > > > > > > > up. Since the perf_sample now carries its own resolved evsel pointer, > > > > > > > passing evsel separately is redundant and error-prone (allowing > > > > > > > parameter divergence bugs). > > > > > > > > > > > > > > This series cleans up the redundant evsel parameter across all perf > > > > > > > tool subcommands and APIs, ensuring that tools uniformly retrieve > > > > > > > event attributes directly from the sample itself. This simplifies > > > > > > > function signatures and improves API consistency. > > > > > > > > > > > > > > Additionally, this series incorporates subsequent memory safety > > > > > > > improvements, robust bounds checking, and memory leak corrections > > > > > > > prompted by address sanitizers and Sashiko code reviews. > > > > > > > > > > > > > > The original combined RFC patch: > > > > > > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/ > > > > > > > was split up per reviewer requests. > > > > > > > > > > > > > > v14: > > > > > > > - Incorporate Acked-by tags from Namhyung Kim. > > > > > > > - Re-polish and expand commit descriptions to provide thorough explanations > > > > > > > of the changes and their rationale. > > > > > > > > > > > > Thanks, tentatively applying it to perf-tools-next, for v7.2. > > > > > > > > > > Had to apply a minor fixup for a conflict with anoter patch series from > > > > > you, the LBR one. > > > > > > > > Sorry for that and thanks for dealing with the conflict! Any chance > > > > you could push to tmp.perf-tools-next? I have some other series that > > > > will conflict and it would be nice to rebase those changes there. > > > > > > I just removed the last two patches, the ones for kwork, as: > > > > > > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= NO_LIBELF=1 -C tools/perf O=/tmp/build/perf > > > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' > > > BUILD: Doing 'make -j32' parallel build > > > Makefile.config:647: Warning: Disabled BPF skeletons as libelf is required by bpftool > > > Makefile.config:745: Disabling post unwind, no support found. > > > Makefile.config:856: Missing python setuptools, the python binding won't be built, please install python3-setuptools or equivalent > > > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev > > > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev > > > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. > > > > > > Auto-detecting system features: > > > ... libdw: [ on ] > > > ... glibc: [ on ] > > > ... libelf: [ on ] > > > ... libnuma: [ on ] > > > ... numa_num_possible_cpus: [ on ] > > > ... libpython: [ on ] > > > ... libcapstone: [ on ] > > > ... llvm-perf: [ on ] > > > ... zlib: [ on ] > > > ... lzma: [ on ] > > > ... bpf: [ on ] > > > ... libaio: [ on ] > > > ... libzstd: [ on ] > > > ... libopenssl: [ on ] > > > ... rust: [ OFF ] > > > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o > > > <SNIP> > > > LINK /tmp/build/perf/perf > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_pop_atom': > > > builtin-kwork.c:(.text+0x59c92): undefined reference to `work_exit' > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_push_atom.constprop.0': > > > builtin-kwork.c:(.text+0x5aba8): undefined reference to `work_exit' > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `cmd_kwork': > > > (.text+0x5bb4b): undefined reference to `work_exit' > > > /usr/bin/ld: (.text+0x5bbae): undefined reference to `work_exit' > > > /usr/bin/ld: (.text+0x5c3b2): undefined reference to `work_exit' > > > collect2: error: ld returned 1 exit status > > > make[2]: *** [Makefile.perf:586: /tmp/build/perf/perf] Error 1 > > > make[1]: *** [Makefile.perf:289: sub-make] Error 2 > > > make: *** [Makefile:76: all] Error 2 > > > make: Leaving directory '/git/perf-7.1.0-rc2/tools/perf' > > > + exit 1 > > > toolsbuilder@five:~$ > > > > > > > > > I'm doing some more tests, just a moment and I'll push what I have to > > > tmp.perf-tools-next. > > > > Also: > > > > toolsbuilder@five:~$ cat dm.log/almalinux\:8 > > <SNIP> > > OLLECT_GCC=gcc > > COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper > > OFFLOAD_TARGET_NAMES=nvptx-none > > OFFLOAD_TARGET_DEFAULT=1 > > Target: x86_64-redhat-linux > > Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugs.almalinux.org/ --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux > > Thread model: posix > > gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= -C tools/perf O=/tmp/build/perf > > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' > > BUILD: Doing 'make -j32' parallel build > > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev > > Makefile.config:1061: No libcapstone found, disables disasm engine support for 'perf script', please install libcapstone-dev/capstone-devel > > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev > > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. > > > > Auto-detecting system features: > > ... libdw: [ on ] > > ... glibc: [ on ] > > ... libelf: [ on ] > > ... libnuma: [ on ] > > ... numa_num_possible_cpus: [ on ] > > ... libpython: [ on ] > > ... libcapstone: [ OFF ] > > ... llvm-perf: [ on ] > > ... zlib: [ on ] > > ... lzma: [ on ] > > ... bpf: [ on ] > > ... libaio: [ on ] > > ... libzstd: [ on ] > > ... libopenssl: [ on ] > > ... rust: [ OFF ] > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v2.o > > <SNIP> > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/cache.json > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/counter.json > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/floating-point.json > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/frontend.json > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/memory.json > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/other.json > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/pipeline.json > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/virtual-memory.json > > GEN /tmp/build/perf/pmu-events/test-empty-pmu-events.c > > Traceback (most recent call last): > > File "pmu-events/jevents.py", line 1524, in <module> > > main() > > File "pmu-events/jevents.py", line 1487, in main > > with concurrent.futures.ProcessPoolExecutor(initializer=_init_worker, initargs=(_arch_std_events,)) as executor: > > TypeError: __init__() got an unexpected keyword argument 'initializer' > > make[3]: *** [pmu-events/Build:176: /tmp/build/perf/pmu-events/test-empty-pmu-events.c] Error 1 > > make[3]: *** Deleting file '/tmp/build/perf/pmu-events/test-empty-pmu-events.c' > > make[2]: *** [Makefile.perf:554: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2 > > make[2]: *** Waiting for unfinished jobs.... > > But: > > toolsbuilder@five:~$ export BUILD_TARBALL=http://192.168.86.5/perf/perf-7.1.0-rc2.tar.xz > toolsbuilder@five:~$ time dm > 1 8.77 almalinux:8 : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > 2 84.96 almalinux:9 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-3.el9) flex 2.6.4 > 3: 103.23 almalinux:9-i386 : Ok gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3) , clang version 17.0.6 (AlmaLinux OS Foundation 17.0.6-5.el9) flex 2.6.4 > 4 90.91 almalinux:10 : Ok gcc (GCC) 14.3.1 20250617 (Red Hat 14.3.1-2) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-1.el10.alma.1) flex 2.6.4 > 5 118.21 alpine:3.16 : Ok gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219 , Alpine clang version 13.0.1 flex 2.6.4 > ... You can drop the parallelize jevent.py changes and I'll follow up. Sorry for the breakage. Thanks, Ian
On Wed, May 20, 2026 at 02:01:03PM -0700, Ian Rogers wrote:
> On Wed, May 20, 2026 at 1:55 PM Arnaldo Carvalho de Melo
> <acme@kernel.org> wrote:
> >
> > On Wed, May 20, 2026 at 05:51:36PM -0300, Arnaldo Carvalho de Melo wrote:
> > > On Wed, May 20, 2026 at 05:49:57PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > On Wed, May 20, 2026 at 01:40:48PM -0700, Ian Rogers wrote:
> > > > > On Wed, May 20, 2026 at 12:46 PM Arnaldo Carvalho de Melo
> > > > > <acme@kernel.org> wrote:
> > > > > >
> > > > > > On Wed, May 20, 2026 at 04:15:30PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > > > > On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed
> > > > > > > > up. Since the perf_sample now carries its own resolved evsel pointer,
> > > > > > > > passing evsel separately is redundant and error-prone (allowing
> > > > > > > > parameter divergence bugs).
> > > > > > > >
> > > > > > > > This series cleans up the redundant evsel parameter across all perf
> > > > > > > > tool subcommands and APIs, ensuring that tools uniformly retrieve
> > > > > > > > event attributes directly from the sample itself. This simplifies
> > > > > > > > function signatures and improves API consistency.
> > > > > > > >
> > > > > > > > Additionally, this series incorporates subsequent memory safety
> > > > > > > > improvements, robust bounds checking, and memory leak corrections
> > > > > > > > prompted by address sanitizers and Sashiko code reviews.
> > > > > > > >
> > > > > > > > The original combined RFC patch:
> > > > > > > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/
> > > > > > > > was split up per reviewer requests.
> > > > > > > >
> > > > > > > > v14:
> > > > > > > > - Incorporate Acked-by tags from Namhyung Kim.
> > > > > > > > - Re-polish and expand commit descriptions to provide thorough explanations
> > > > > > > > of the changes and their rationale.
> > > > > > >
> > > > > > > Thanks, tentatively applying it to perf-tools-next, for v7.2.
> > > > > >
> > > > > > Had to apply a minor fixup for a conflict with anoter patch series from
> > > > > > you, the LBR one.
> > > > >
> > > > > Sorry for that and thanks for dealing with the conflict! Any chance
> > > > > you could push to tmp.perf-tools-next? I have some other series that
> > > > > will conflict and it would be nice to rebase those changes there.
> > > >
> > > > I just removed the last two patches, the ones for kwork, as:
> > > >
> > > > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= NO_LIBELF=1 -C tools/perf O=/tmp/build/perf
> > > > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf'
> > > > BUILD: Doing 'make -j32' parallel build
> > > > Makefile.config:647: Warning: Disabled BPF skeletons as libelf is required by bpftool
> > > > Makefile.config:745: Disabling post unwind, no support found.
> > > > Makefile.config:856: Missing python setuptools, the python binding won't be built, please install python3-setuptools or equivalent
> > > > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
> > > > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev
> > > > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled.
> > > >
> > > > Auto-detecting system features:
> > > > ... libdw: [ on ]
> > > > ... glibc: [ on ]
> > > > ... libelf: [ on ]
> > > > ... libnuma: [ on ]
> > > > ... numa_num_possible_cpus: [ on ]
> > > > ... libpython: [ on ]
> > > > ... libcapstone: [ on ]
> > > > ... llvm-perf: [ on ]
> > > > ... zlib: [ on ]
> > > > ... lzma: [ on ]
> > > > ... bpf: [ on ]
> > > > ... libaio: [ on ]
> > > > ... libzstd: [ on ]
> > > > ... libopenssl: [ on ]
> > > > ... rust: [ OFF ]
> > > >
> > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o
> > > > <SNIP>
> > > > LINK /tmp/build/perf/perf
> > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_pop_atom':
> > > > builtin-kwork.c:(.text+0x59c92): undefined reference to `work_exit'
> > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_push_atom.constprop.0':
> > > > builtin-kwork.c:(.text+0x5aba8): undefined reference to `work_exit'
> > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `cmd_kwork':
> > > > (.text+0x5bb4b): undefined reference to `work_exit'
> > > > /usr/bin/ld: (.text+0x5bbae): undefined reference to `work_exit'
> > > > /usr/bin/ld: (.text+0x5c3b2): undefined reference to `work_exit'
> > > > collect2: error: ld returned 1 exit status
> > > > make[2]: *** [Makefile.perf:586: /tmp/build/perf/perf] Error 1
> > > > make[1]: *** [Makefile.perf:289: sub-make] Error 2
> > > > make: *** [Makefile:76: all] Error 2
> > > > make: Leaving directory '/git/perf-7.1.0-rc2/tools/perf'
> > > > + exit 1
> > > > toolsbuilder@five:~$
> > > >
> > > >
> > > > I'm doing some more tests, just a moment and I'll push what I have to
> > > > tmp.perf-tools-next.
> > >
> > > Also:
> > >
> > > toolsbuilder@five:~$ cat dm.log/almalinux\:8
> > > <SNIP>
> > > OLLECT_GCC=gcc
> > > COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
> > > OFFLOAD_TARGET_NAMES=nvptx-none
> > > OFFLOAD_TARGET_DEFAULT=1
> > > Target: x86_64-redhat-linux
> > > Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugs.almalinux.org/ --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
> > > Thread model: posix
> > > gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC)
> > > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= -C tools/perf O=/tmp/build/perf
> > > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf'
> > > BUILD: Doing 'make -j32' parallel build
> > > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
> > > Makefile.config:1061: No libcapstone found, disables disasm engine support for 'perf script', please install libcapstone-dev/capstone-devel
> > > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev
> > > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled.
> > >
> > > Auto-detecting system features:
> > > ... libdw: [ on ]
> > > ... glibc: [ on ]
> > > ... libelf: [ on ]
> > > ... libnuma: [ on ]
> > > ... numa_num_possible_cpus: [ on ]
> > > ... libpython: [ on ]
> > > ... libcapstone: [ OFF ]
> > > ... llvm-perf: [ on ]
> > > ... zlib: [ on ]
> > > ... lzma: [ on ]
> > > ... bpf: [ on ]
> > > ... libaio: [ on ]
> > > ... libzstd: [ on ]
> > > ... libopenssl: [ on ]
> > > ... rust: [ OFF ]
> > >
> > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o
> > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v2.o
> > > <SNIP>
> > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/cache.json
> > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/counter.json
> > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/floating-point.json
> > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/frontend.json
> > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/memory.json
> > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/other.json
> > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/pipeline.json
> > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/virtual-memory.json
> > > GEN /tmp/build/perf/pmu-events/test-empty-pmu-events.c
> > > Traceback (most recent call last):
> > > File "pmu-events/jevents.py", line 1524, in <module>
> > > main()
> > > File "pmu-events/jevents.py", line 1487, in main
> > > with concurrent.futures.ProcessPoolExecutor(initializer=_init_worker, initargs=(_arch_std_events,)) as executor:
> > > TypeError: __init__() got an unexpected keyword argument 'initializer'
> > > make[3]: *** [pmu-events/Build:176: /tmp/build/perf/pmu-events/test-empty-pmu-events.c] Error 1
> > > make[3]: *** Deleting file '/tmp/build/perf/pmu-events/test-empty-pmu-events.c'
> > > make[2]: *** [Makefile.perf:554: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> > > make[2]: *** Waiting for unfinished jobs....
> >
> > But:
> >
> > toolsbuilder@five:~$ export BUILD_TARBALL=http://192.168.86.5/perf/perf-7.1.0-rc2.tar.xz
> > toolsbuilder@five:~$ time dm
> > 1 8.77 almalinux:8 : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC)
> > 2 84.96 almalinux:9 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-3.el9) flex 2.6.4
> > 3: 103.23 almalinux:9-i386 : Ok gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3) , clang version 17.0.6 (AlmaLinux OS Foundation 17.0.6-5.el9) flex 2.6.4
> > 4 90.91 almalinux:10 : Ok gcc (GCC) 14.3.1 20250617 (Red Hat 14.3.1-2) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-1.el10.alma.1) flex 2.6.4
> > 5 118.21 alpine:3.16 : Ok gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219 , Alpine clang version 13.0.1 flex 2.6.4
> > ...
>
> You can drop the parallelize jevent.py changes and I'll follow up.
> Sorry for the breakage.
It was just that almalinux:8 so far, its an old system, so I'm keeping
it to see what other systems fail, if any.
So far:
toolsbuilder@five:~$ export BUILD_TARBALL=http://192.168.86.5/perf/perf-7.1.0-rc2.tar.xz
toolsbuilder@five:~$ time dm
1 8.77 almalinux:8 : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC)
2 84.96 almalinux:9 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-3.el9) flex 2.6.4
3: almalinux:9-i386WARNING: image platform (linux/386) does not match the expected platform (linux/amd64)
WARNING: image platform (linux/386) does not match the expected platform (linux/amd64)
103.23 almalinux:9-i386 : Ok gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3) , clang version 17.0.6 (AlmaLinux OS Foundation 17.0.6-5.el9) flex 2.6.4
4 90.91 almalinux:10 : Ok gcc (GCC) 14.3.1 20250617 (Red Hat 14.3.1-2) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-1.el10.alma.1) flex 2.6.4
5 118.21 alpine:3.16 : Ok gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219 , Alpine clang version 13.0.1 flex 2.6.4
6 106.13 alpine:3.17 : Ok gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924 , Alpine clang version 15.0.7 flex 2.6.4
7 102.80 alpine:3.18 : Ok gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924 , Alpine clang version 16.0.6 flex 2.6.4
8 114.48 alpine:3.19 : Ok gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014 , Alpine clang version 17.0.5 flex 2.6.4
9 109.53 alpine:3.20 : Ok gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309 , Alpine clang version 17.0.6 flex 2.6.4
10 116.20 alpine:3.22 : Ok gcc (Alpine 14.2.0) 14.2.0 , Alpine clang version 20.1.8 flex 2.6.4
11 109.83 alpine:3.23 : Ok gcc (Alpine 15.2.0) 15.2.0 , Alpine clang version 21.1.2 flex 2.6.4
12 119.23 alpine:edge : Ok gcc (Alpine 14.2.0) 14.2.0 , Alpine clang version 19.1.4 flex 2.6.4
13 93.22 amazonlinux:2023 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5) , clang version 15.0.7 (AWS 15.0.7-3.amzn2023.0.4) flex 2.6.4
14 93.40 amazonlinux:devel : Ok gcc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4) , clang version 15.0.6 (Amazon Linux 15.0.6-3.amzn2023.0.2) flex 2.6.4
15 102.98 archlinux:base : Ok gcc (GCC) 15.2.1 20250813 , clang version 20.1.8 flex 2.6.4
16 9.58 centos:stream : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-21) (GCC)
17: clearlinux:latest
COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/virtual-memory.json
GEN /tmp/build/perf/pmu-events/test-empty-pmu-events.c
Traceback (most recent call last):
File "pmu-events/jevents.py", line 1524, in <module>
main()
File "pmu-events/jevents.py", line 1487, in main
with concurrent.futures.ProcessPoolExecutor(initializer=_init_worker, initargs=(_arch_std_events,)) as executor:
TypeError: __init__() got an unexpected keyword argument 'initializer'
make[3]: *** [pmu-events/Build:176: /tmp/build/perf/pmu-events/test-empty-pmu-events.c] Error 1
make[3]: *** Deleting file '/tmp/build/perf/pmu-events/test-empty-pmu-events.c'
make[2]: *** [Makefile.perf:554: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
make[2]: *** Waiting for unfinished jobs....
Auto-detecting system features:
... clang-bpf-co-re: [ on ]
... llvm: [ on ]
... libcap: [ on ]
... libbfd: [ on ]
MKDIR /tmp/build/perf/util/bpf_skel/.tmp/bootstrap/libbpf/include/bpf
centos:stream is the bleeding edge, so I'll drop that as you suggested,
ok.
- Arnaldo
On Wed, May 20, 2026 at 06:13:33PM -0300, Arnaldo Carvalho de Melo wrote: > On Wed, May 20, 2026 at 02:01:03PM -0700, Ian Rogers wrote: > > On Wed, May 20, 2026 at 1:55 PM Arnaldo Carvalho de Melo > > <acme@kernel.org> wrote: > > > > > > On Wed, May 20, 2026 at 05:51:36PM -0300, Arnaldo Carvalho de Melo wrote: > > > > On Wed, May 20, 2026 at 05:49:57PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > On Wed, May 20, 2026 at 01:40:48PM -0700, Ian Rogers wrote: > > > > > > On Wed, May 20, 2026 at 12:46 PM Arnaldo Carvalho de Melo > > > > > > <acme@kernel.org> wrote: > > > > > > > > > > > > > > On Wed, May 20, 2026 at 04:15:30PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > > > > On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed > > > > > > > > > up. Since the perf_sample now carries its own resolved evsel pointer, > > > > > > > > > passing evsel separately is redundant and error-prone (allowing > > > > > > > > > parameter divergence bugs). > > > > > > > > > > > > > > > > > > This series cleans up the redundant evsel parameter across all perf > > > > > > > > > tool subcommands and APIs, ensuring that tools uniformly retrieve > > > > > > > > > event attributes directly from the sample itself. This simplifies > > > > > > > > > function signatures and improves API consistency. > > > > > > > > > > > > > > > > > > Additionally, this series incorporates subsequent memory safety > > > > > > > > > improvements, robust bounds checking, and memory leak corrections > > > > > > > > > prompted by address sanitizers and Sashiko code reviews. > > > > > > > > > > > > > > > > > > The original combined RFC patch: > > > > > > > > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/ > > > > > > > > > was split up per reviewer requests. > > > > > > > > > > > > > > > > > > v14: > > > > > > > > > - Incorporate Acked-by tags from Namhyung Kim. > > > > > > > > > - Re-polish and expand commit descriptions to provide thorough explanations > > > > > > > > > of the changes and their rationale. > > > > > > > > > > > > > > > > Thanks, tentatively applying it to perf-tools-next, for v7.2. > > > > > > > > > > > > > > Had to apply a minor fixup for a conflict with anoter patch series from > > > > > > > you, the LBR one. > > > > > > > > > > > > Sorry for that and thanks for dealing with the conflict! Any chance > > > > > > you could push to tmp.perf-tools-next? I have some other series that > > > > > > will conflict and it would be nice to rebase those changes there. > > > > > > > > > > I just removed the last two patches, the ones for kwork, as: > > > > > > > > > > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= NO_LIBELF=1 -C tools/perf O=/tmp/build/perf > > > > > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' > > > > > BUILD: Doing 'make -j32' parallel build > > > > > Makefile.config:647: Warning: Disabled BPF skeletons as libelf is required by bpftool > > > > > Makefile.config:745: Disabling post unwind, no support found. > > > > > Makefile.config:856: Missing python setuptools, the python binding won't be built, please install python3-setuptools or equivalent > > > > > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev > > > > > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev > > > > > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. > > > > > > > > > > Auto-detecting system features: > > > > > ... libdw: [ on ] > > > > > ... glibc: [ on ] > > > > > ... libelf: [ on ] > > > > > ... libnuma: [ on ] > > > > > ... numa_num_possible_cpus: [ on ] > > > > > ... libpython: [ on ] > > > > > ... libcapstone: [ on ] > > > > > ... llvm-perf: [ on ] > > > > > ... zlib: [ on ] > > > > > ... lzma: [ on ] > > > > > ... bpf: [ on ] > > > > > ... libaio: [ on ] > > > > > ... libzstd: [ on ] > > > > > ... libopenssl: [ on ] > > > > > ... rust: [ OFF ] > > > > > > > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o > > > > > <SNIP> > > > > > LINK /tmp/build/perf/perf > > > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_pop_atom': > > > > > builtin-kwork.c:(.text+0x59c92): undefined reference to `work_exit' > > > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_push_atom.constprop.0': > > > > > builtin-kwork.c:(.text+0x5aba8): undefined reference to `work_exit' > > > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `cmd_kwork': > > > > > (.text+0x5bb4b): undefined reference to `work_exit' > > > > > /usr/bin/ld: (.text+0x5bbae): undefined reference to `work_exit' > > > > > /usr/bin/ld: (.text+0x5c3b2): undefined reference to `work_exit' > > > > > collect2: error: ld returned 1 exit status > > > > > make[2]: *** [Makefile.perf:586: /tmp/build/perf/perf] Error 1 > > > > > make[1]: *** [Makefile.perf:289: sub-make] Error 2 > > > > > make: *** [Makefile:76: all] Error 2 > > > > > make: Leaving directory '/git/perf-7.1.0-rc2/tools/perf' > > > > > + exit 1 > > > > > toolsbuilder@five:~$ > > > > > > > > > > > > > > > I'm doing some more tests, just a moment and I'll push what I have to > > > > > tmp.perf-tools-next. > > > > > > > > Also: > > > > > > > > toolsbuilder@five:~$ cat dm.log/almalinux\:8 > > > > <SNIP> > > > > OLLECT_GCC=gcc > > > > COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper > > > > OFFLOAD_TARGET_NAMES=nvptx-none > > > > OFFLOAD_TARGET_DEFAULT=1 > > > > Target: x86_64-redhat-linux > > > > Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugs.almalinux.org/ --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux > > > > Thread model: posix > > > > gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > > > > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= -C tools/perf O=/tmp/build/perf > > > > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' > > > > BUILD: Doing 'make -j32' parallel build > > > > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev > > > > Makefile.config:1061: No libcapstone found, disables disasm engine support for 'perf script', please install libcapstone-dev/capstone-devel > > > > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev > > > > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. > > > > > > > > Auto-detecting system features: > > > > ... libdw: [ on ] > > > > ... glibc: [ on ] > > > > ... libelf: [ on ] > > > > ... libnuma: [ on ] > > > > ... numa_num_possible_cpus: [ on ] > > > > ... libpython: [ on ] > > > > ... libcapstone: [ OFF ] > > > > ... llvm-perf: [ on ] > > > > ... zlib: [ on ] > > > > ... lzma: [ on ] > > > > ... bpf: [ on ] > > > > ... libaio: [ on ] > > > > ... libzstd: [ on ] > > > > ... libopenssl: [ on ] > > > > ... rust: [ OFF ] > > > > > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v2.o > > > > <SNIP> > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/cache.json > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/counter.json > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/floating-point.json > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/frontend.json > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/memory.json > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/other.json > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/pipeline.json > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/virtual-memory.json > > > > GEN /tmp/build/perf/pmu-events/test-empty-pmu-events.c > > > > Traceback (most recent call last): > > > > File "pmu-events/jevents.py", line 1524, in <module> > > > > main() > > > > File "pmu-events/jevents.py", line 1487, in main > > > > with concurrent.futures.ProcessPoolExecutor(initializer=_init_worker, initargs=(_arch_std_events,)) as executor: > > > > TypeError: __init__() got an unexpected keyword argument 'initializer' > > > > make[3]: *** [pmu-events/Build:176: /tmp/build/perf/pmu-events/test-empty-pmu-events.c] Error 1 > > > > make[3]: *** Deleting file '/tmp/build/perf/pmu-events/test-empty-pmu-events.c' > > > > make[2]: *** [Makefile.perf:554: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2 > > > > make[2]: *** Waiting for unfinished jobs.... > > > > > > But: > > > > > > toolsbuilder@five:~$ export BUILD_TARBALL=http://192.168.86.5/perf/perf-7.1.0-rc2.tar.xz > > > toolsbuilder@five:~$ time dm > > > 1 8.77 almalinux:8 : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > > > 2 84.96 almalinux:9 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-3.el9) flex 2.6.4 > > > 3: 103.23 almalinux:9-i386 : Ok gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3) , clang version 17.0.6 (AlmaLinux OS Foundation 17.0.6-5.el9) flex 2.6.4 > > > 4 90.91 almalinux:10 : Ok gcc (GCC) 14.3.1 20250617 (Red Hat 14.3.1-2) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-1.el10.alma.1) flex 2.6.4 > > > 5 118.21 alpine:3.16 : Ok gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219 , Alpine clang version 13.0.1 flex 2.6.4 > > > ... > > > > You can drop the parallelize jevent.py changes and I'll follow up. > > Sorry for the breakage. > > It was just that almalinux:8 so far, its an old system, so I'm keeping > it to see what other systems fail, if any. > > So far: > > toolsbuilder@five:~$ export BUILD_TARBALL=http://192.168.86.5/perf/perf-7.1.0-rc2.tar.xz > toolsbuilder@five:~$ time dm > 1 8.77 almalinux:8 : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > 2 84.96 almalinux:9 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-3.el9) flex 2.6.4 > 3: almalinux:9-i386WARNING: image platform (linux/386) does not match the expected platform (linux/amd64) > WARNING: image platform (linux/386) does not match the expected platform (linux/amd64) > 103.23 almalinux:9-i386 : Ok gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3) , clang version 17.0.6 (AlmaLinux OS Foundation 17.0.6-5.el9) flex 2.6.4 > 4 90.91 almalinux:10 : Ok gcc (GCC) 14.3.1 20250617 (Red Hat 14.3.1-2) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-1.el10.alma.1) flex 2.6.4 > 5 118.21 alpine:3.16 : Ok gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219 , Alpine clang version 13.0.1 flex 2.6.4 > 6 106.13 alpine:3.17 : Ok gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924 , Alpine clang version 15.0.7 flex 2.6.4 > 7 102.80 alpine:3.18 : Ok gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924 , Alpine clang version 16.0.6 flex 2.6.4 > 8 114.48 alpine:3.19 : Ok gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014 , Alpine clang version 17.0.5 flex 2.6.4 > 9 109.53 alpine:3.20 : Ok gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309 , Alpine clang version 17.0.6 flex 2.6.4 > 10 116.20 alpine:3.22 : Ok gcc (Alpine 14.2.0) 14.2.0 , Alpine clang version 20.1.8 flex 2.6.4 > 11 109.83 alpine:3.23 : Ok gcc (Alpine 15.2.0) 15.2.0 , Alpine clang version 21.1.2 flex 2.6.4 > 12 119.23 alpine:edge : Ok gcc (Alpine 14.2.0) 14.2.0 , Alpine clang version 19.1.4 flex 2.6.4 > 13 93.22 amazonlinux:2023 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5) , clang version 15.0.7 (AWS 15.0.7-3.amzn2023.0.4) flex 2.6.4 > 14 93.40 amazonlinux:devel : Ok gcc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4) , clang version 15.0.6 (Amazon Linux 15.0.6-3.amzn2023.0.2) flex 2.6.4 > 15 102.98 archlinux:base : Ok gcc (GCC) 15.2.1 20250813 , clang version 20.1.8 flex 2.6.4 > 16 9.58 centos:stream : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-21) (GCC) > 17: clearlinux:latest > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/virtual-memory.json > GEN /tmp/build/perf/pmu-events/test-empty-pmu-events.c > Traceback (most recent call last): > File "pmu-events/jevents.py", line 1524, in <module> > main() > File "pmu-events/jevents.py", line 1487, in main > with concurrent.futures.ProcessPoolExecutor(initializer=_init_worker, initargs=(_arch_std_events,)) as executor: > TypeError: __init__() got an unexpected keyword argument 'initializer' > make[3]: *** [pmu-events/Build:176: /tmp/build/perf/pmu-events/test-empty-pmu-events.c] Error 1 > make[3]: *** Deleting file '/tmp/build/perf/pmu-events/test-empty-pmu-events.c' > make[2]: *** [Makefile.perf:554: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2 > make[2]: *** Waiting for unfinished jobs.... > > Auto-detecting system features: > ... clang-bpf-co-re: [ on ] > ... llvm: [ on ] > ... libcap: [ on ] > ... libbfd: [ on ] > > MKDIR /tmp/build/perf/util/bpf_skel/.tmp/bootstrap/libbpf/include/bpf > > > centos:stream is the bleeding edge, so I'll drop that as you suggested, > ok. So I removed these, i.e. from the parallelize onwards: 28 O T May 18 Ian Rogers ( 43) │ ├─>[PATCH v7 14/14] perf build: Convert llvm-config shell queries to simply expanded variables 29 O T May 18 Ian Rogers ( 62) │ ├─>[PATCH v7 13/14] perf pmu-events: Convert recursive shell assignments and macros to Make built-ins 30 O T May 18 Ian Rogers ( 47) │ ├─>[PATCH v7 12/14] perf build: Prefix SCRIPTS with output directory to fix continuous rebuilds 31 O T May 18 Ian Rogers ( 97) │ ├─>[PATCH v7 11/14] perf pmu-events: Parallelize JSON and metric pre-computation in jevents.py
On Wed, May 20, 2026 at 2:15 PM Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > On Wed, May 20, 2026 at 06:13:33PM -0300, Arnaldo Carvalho de Melo wrote: > > On Wed, May 20, 2026 at 02:01:03PM -0700, Ian Rogers wrote: > > > On Wed, May 20, 2026 at 1:55 PM Arnaldo Carvalho de Melo > > > <acme@kernel.org> wrote: > > > > > > > > On Wed, May 20, 2026 at 05:51:36PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > On Wed, May 20, 2026 at 05:49:57PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > > On Wed, May 20, 2026 at 01:40:48PM -0700, Ian Rogers wrote: > > > > > > > On Wed, May 20, 2026 at 12:46 PM Arnaldo Carvalho de Melo > > > > > > > <acme@kernel.org> wrote: > > > > > > > > > > > > > > > > On Wed, May 20, 2026 at 04:15:30PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > > > > > On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed > > > > > > > > > > up. Since the perf_sample now carries its own resolved evsel pointer, > > > > > > > > > > passing evsel separately is redundant and error-prone (allowing > > > > > > > > > > parameter divergence bugs). > > > > > > > > > > > > > > > > > > > > This series cleans up the redundant evsel parameter across all perf > > > > > > > > > > tool subcommands and APIs, ensuring that tools uniformly retrieve > > > > > > > > > > event attributes directly from the sample itself. This simplifies > > > > > > > > > > function signatures and improves API consistency. > > > > > > > > > > > > > > > > > > > > Additionally, this series incorporates subsequent memory safety > > > > > > > > > > improvements, robust bounds checking, and memory leak corrections > > > > > > > > > > prompted by address sanitizers and Sashiko code reviews. > > > > > > > > > > > > > > > > > > > > The original combined RFC patch: > > > > > > > > > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/ > > > > > > > > > > was split up per reviewer requests. > > > > > > > > > > > > > > > > > > > > v14: > > > > > > > > > > - Incorporate Acked-by tags from Namhyung Kim. > > > > > > > > > > - Re-polish and expand commit descriptions to provide thorough explanations > > > > > > > > > > of the changes and their rationale. > > > > > > > > > > > > > > > > > > Thanks, tentatively applying it to perf-tools-next, for v7.2. > > > > > > > > > > > > > > > > Had to apply a minor fixup for a conflict with anoter patch series from > > > > > > > > you, the LBR one. > > > > > > > > > > > > > > Sorry for that and thanks for dealing with the conflict! Any chance > > > > > > > you could push to tmp.perf-tools-next? I have some other series that > > > > > > > will conflict and it would be nice to rebase those changes there. > > > > > > > > > > > > I just removed the last two patches, the ones for kwork, as: > > > > > > > > > > > > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= NO_LIBELF=1 -C tools/perf O=/tmp/build/perf > > > > > > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' > > > > > > BUILD: Doing 'make -j32' parallel build > > > > > > Makefile.config:647: Warning: Disabled BPF skeletons as libelf is required by bpftool > > > > > > Makefile.config:745: Disabling post unwind, no support found. > > > > > > Makefile.config:856: Missing python setuptools, the python binding won't be built, please install python3-setuptools or equivalent > > > > > > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev > > > > > > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev > > > > > > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. > > > > > > > > > > > > Auto-detecting system features: > > > > > > ... libdw: [ on ] > > > > > > ... glibc: [ on ] > > > > > > ... libelf: [ on ] > > > > > > ... libnuma: [ on ] > > > > > > ... numa_num_possible_cpus: [ on ] > > > > > > ... libpython: [ on ] > > > > > > ... libcapstone: [ on ] > > > > > > ... llvm-perf: [ on ] > > > > > > ... zlib: [ on ] > > > > > > ... lzma: [ on ] > > > > > > ... bpf: [ on ] > > > > > > ... libaio: [ on ] > > > > > > ... libzstd: [ on ] > > > > > > ... libopenssl: [ on ] > > > > > > ... rust: [ OFF ] > > > > > > > > > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o > > > > > > <SNIP> > > > > > > LINK /tmp/build/perf/perf > > > > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_pop_atom': > > > > > > builtin-kwork.c:(.text+0x59c92): undefined reference to `work_exit' > > > > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_push_atom.constprop.0': > > > > > > builtin-kwork.c:(.text+0x5aba8): undefined reference to `work_exit' > > > > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `cmd_kwork': > > > > > > (.text+0x5bb4b): undefined reference to `work_exit' > > > > > > /usr/bin/ld: (.text+0x5bbae): undefined reference to `work_exit' > > > > > > /usr/bin/ld: (.text+0x5c3b2): undefined reference to `work_exit' > > > > > > collect2: error: ld returned 1 exit status > > > > > > make[2]: *** [Makefile.perf:586: /tmp/build/perf/perf] Error 1 > > > > > > make[1]: *** [Makefile.perf:289: sub-make] Error 2 > > > > > > make: *** [Makefile:76: all] Error 2 > > > > > > make: Leaving directory '/git/perf-7.1.0-rc2/tools/perf' > > > > > > + exit 1 > > > > > > toolsbuilder@five:~$ > > > > > > > > > > > > > > > > > > I'm doing some more tests, just a moment and I'll push what I have to > > > > > > tmp.perf-tools-next. > > > > > > > > > > Also: > > > > > > > > > > toolsbuilder@five:~$ cat dm.log/almalinux\:8 > > > > > <SNIP> > > > > > OLLECT_GCC=gcc > > > > > COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper > > > > > OFFLOAD_TARGET_NAMES=nvptx-none > > > > > OFFLOAD_TARGET_DEFAULT=1 > > > > > Target: x86_64-redhat-linux > > > > > Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugs.almalinux.org/ --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux > > > > > Thread model: posix > > > > > gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > > > > > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= -C tools/perf O=/tmp/build/perf > > > > > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' > > > > > BUILD: Doing 'make -j32' parallel build > > > > > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev > > > > > Makefile.config:1061: No libcapstone found, disables disasm engine support for 'perf script', please install libcapstone-dev/capstone-devel > > > > > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev > > > > > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. > > > > > > > > > > Auto-detecting system features: > > > > > ... libdw: [ on ] > > > > > ... glibc: [ on ] > > > > > ... libelf: [ on ] > > > > > ... libnuma: [ on ] > > > > > ... numa_num_possible_cpus: [ on ] > > > > > ... libpython: [ on ] > > > > > ... libcapstone: [ OFF ] > > > > > ... llvm-perf: [ on ] > > > > > ... zlib: [ on ] > > > > > ... lzma: [ on ] > > > > > ... bpf: [ on ] > > > > > ... libaio: [ on ] > > > > > ... libzstd: [ on ] > > > > > ... libopenssl: [ on ] > > > > > ... rust: [ OFF ] > > > > > > > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o > > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v2.o > > > > > <SNIP> > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/cache.json > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/counter.json > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/floating-point.json > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/frontend.json > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/memory.json > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/other.json > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/pipeline.json > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/virtual-memory.json > > > > > GEN /tmp/build/perf/pmu-events/test-empty-pmu-events.c > > > > > Traceback (most recent call last): > > > > > File "pmu-events/jevents.py", line 1524, in <module> > > > > > main() > > > > > File "pmu-events/jevents.py", line 1487, in main > > > > > with concurrent.futures.ProcessPoolExecutor(initializer=_init_worker, initargs=(_arch_std_events,)) as executor: > > > > > TypeError: __init__() got an unexpected keyword argument 'initializer' > > > > > make[3]: *** [pmu-events/Build:176: /tmp/build/perf/pmu-events/test-empty-pmu-events.c] Error 1 > > > > > make[3]: *** Deleting file '/tmp/build/perf/pmu-events/test-empty-pmu-events.c' > > > > > make[2]: *** [Makefile.perf:554: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2 > > > > > make[2]: *** Waiting for unfinished jobs.... > > > > > > > > But: > > > > > > > > toolsbuilder@five:~$ export BUILD_TARBALL=http://192.168.86.5/perf/perf-7.1.0-rc2.tar.xz > > > > toolsbuilder@five:~$ time dm > > > > 1 8.77 almalinux:8 : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > > > > 2 84.96 almalinux:9 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-3.el9) flex 2.6.4 > > > > 3: 103.23 almalinux:9-i386 : Ok gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3) , clang version 17.0.6 (AlmaLinux OS Foundation 17.0.6-5.el9) flex 2.6.4 > > > > 4 90.91 almalinux:10 : Ok gcc (GCC) 14.3.1 20250617 (Red Hat 14.3.1-2) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-1.el10.alma.1) flex 2.6.4 > > > > 5 118.21 alpine:3.16 : Ok gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219 , Alpine clang version 13.0.1 flex 2.6.4 > > > > ... > > > > > > You can drop the parallelize jevent.py changes and I'll follow up. > > > Sorry for the breakage. > > > > It was just that almalinux:8 so far, its an old system, so I'm keeping > > it to see what other systems fail, if any. > > > > So far: > > > > toolsbuilder@five:~$ export BUILD_TARBALL=http://192.168.86.5/perf/perf-7.1.0-rc2.tar.xz > > toolsbuilder@five:~$ time dm > > 1 8.77 almalinux:8 : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > > 2 84.96 almalinux:9 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-3.el9) flex 2.6.4 > > 3: almalinux:9-i386WARNING: image platform (linux/386) does not match the expected platform (linux/amd64) > > WARNING: image platform (linux/386) does not match the expected platform (linux/amd64) > > 103.23 almalinux:9-i386 : Ok gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3) , clang version 17.0.6 (AlmaLinux OS Foundation 17.0.6-5.el9) flex 2.6.4 > > 4 90.91 almalinux:10 : Ok gcc (GCC) 14.3.1 20250617 (Red Hat 14.3.1-2) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-1.el10.alma.1) flex 2.6.4 > > 5 118.21 alpine:3.16 : Ok gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219 , Alpine clang version 13.0.1 flex 2.6.4 > > 6 106.13 alpine:3.17 : Ok gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924 , Alpine clang version 15.0.7 flex 2.6.4 > > 7 102.80 alpine:3.18 : Ok gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924 , Alpine clang version 16.0.6 flex 2.6.4 > > 8 114.48 alpine:3.19 : Ok gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014 , Alpine clang version 17.0.5 flex 2.6.4 > > 9 109.53 alpine:3.20 : Ok gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309 , Alpine clang version 17.0.6 flex 2.6.4 > > 10 116.20 alpine:3.22 : Ok gcc (Alpine 14.2.0) 14.2.0 , Alpine clang version 20.1.8 flex 2.6.4 > > 11 109.83 alpine:3.23 : Ok gcc (Alpine 15.2.0) 15.2.0 , Alpine clang version 21.1.2 flex 2.6.4 > > 12 119.23 alpine:edge : Ok gcc (Alpine 14.2.0) 14.2.0 , Alpine clang version 19.1.4 flex 2.6.4 > > 13 93.22 amazonlinux:2023 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5) , clang version 15.0.7 (AWS 15.0.7-3.amzn2023.0.4) flex 2.6.4 > > 14 93.40 amazonlinux:devel : Ok gcc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4) , clang version 15.0.6 (Amazon Linux 15.0.6-3.amzn2023.0.2) flex 2.6.4 > > 15 102.98 archlinux:base : Ok gcc (GCC) 15.2.1 20250813 , clang version 20.1.8 flex 2.6.4 > > 16 9.58 centos:stream : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-21) (GCC) > > 17: clearlinux:latest > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/virtual-memory.json > > GEN /tmp/build/perf/pmu-events/test-empty-pmu-events.c > > Traceback (most recent call last): > > File "pmu-events/jevents.py", line 1524, in <module> > > main() > > File "pmu-events/jevents.py", line 1487, in main > > with concurrent.futures.ProcessPoolExecutor(initializer=_init_worker, initargs=(_arch_std_events,)) as executor: > > TypeError: __init__() got an unexpected keyword argument 'initializer' > > make[3]: *** [pmu-events/Build:176: /tmp/build/perf/pmu-events/test-empty-pmu-events.c] Error 1 > > make[3]: *** Deleting file '/tmp/build/perf/pmu-events/test-empty-pmu-events.c' > > make[2]: *** [Makefile.perf:554: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2 > > make[2]: *** Waiting for unfinished jobs.... > > > > Auto-detecting system features: > > ... clang-bpf-co-re: [ on ] > > ... llvm: [ on ] > > ... libcap: [ on ] > > ... libbfd: [ on ] > > > > MKDIR /tmp/build/perf/util/bpf_skel/.tmp/bootstrap/libbpf/include/bpf > > > > > > centos:stream is the bleeding edge, so I'll drop that as you suggested, > > ok. Sgtm. I'm confused though, something old and something new broke? In the "Minimal requirements to compile the Kernel" (https://www.kernel.org/doc/html/latest/process/changes.html) they state Python must be version 3.9, so it'd be nice to set that as the baseline wrt APIs. We could probably automate that in the build and make the build NO_PYTHON if the version is older than 3.9. > So I removed these, i.e. from the parallelize onwards: > > 28 O T May 18 Ian Rogers ( 43) │ ├─>[PATCH v7 14/14] perf build: Convert llvm-config shell queries to simply expanded variables > 29 O T May 18 Ian Rogers ( 62) │ ├─>[PATCH v7 13/14] perf pmu-events: Convert recursive shell assignments and macros to Make built-ins > 30 O T May 18 Ian Rogers ( 47) │ ├─>[PATCH v7 12/14] perf build: Prefix SCRIPTS with output directory to fix continuous rebuilds > 31 O T May 18 Ian Rogers ( 97) │ ├─>[PATCH v7 11/14] perf pmu-events: Parallelize JSON and metric pre-computation in jevents.py > Could we keep 12, 13 and 14? They are independent changes and offer significant build performance improvements. Thanks, Ian
On Wed, May 20, 2026 at 02:18:46PM -0700, Ian Rogers wrote: > On Wed, May 20, 2026 at 2:15 PM Arnaldo Carvalho de Melo > <acme@kernel.org> wrote: > > > > On Wed, May 20, 2026 at 06:13:33PM -0300, Arnaldo Carvalho de Melo wrote: > > > On Wed, May 20, 2026 at 02:01:03PM -0700, Ian Rogers wrote: > > > > On Wed, May 20, 2026 at 1:55 PM Arnaldo Carvalho de Melo > > > > <acme@kernel.org> wrote: > > > > > > > > > > On Wed, May 20, 2026 at 05:51:36PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > > On Wed, May 20, 2026 at 05:49:57PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > > > On Wed, May 20, 2026 at 01:40:48PM -0700, Ian Rogers wrote: > > > > > > > > On Wed, May 20, 2026 at 12:46 PM Arnaldo Carvalho de Melo > > > > > > > > <acme@kernel.org> wrote: > > > > > > > > > > > > > > > > > > On Wed, May 20, 2026 at 04:15:30PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > > > > > > On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed > > > > > > > > > > > up. Since the perf_sample now carries its own resolved evsel pointer, > > > > > > > > > > > passing evsel separately is redundant and error-prone (allowing > > > > > > > > > > > parameter divergence bugs). > > > > > > > > > > > > > > > > > > > > > > This series cleans up the redundant evsel parameter across all perf > > > > > > > > > > > tool subcommands and APIs, ensuring that tools uniformly retrieve > > > > > > > > > > > event attributes directly from the sample itself. This simplifies > > > > > > > > > > > function signatures and improves API consistency. > > > > > > > > > > > > > > > > > > > > > > Additionally, this series incorporates subsequent memory safety > > > > > > > > > > > improvements, robust bounds checking, and memory leak corrections > > > > > > > > > > > prompted by address sanitizers and Sashiko code reviews. > > > > > > > > > > > > > > > > > > > > > > The original combined RFC patch: > > > > > > > > > > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/ > > > > > > > > > > > was split up per reviewer requests. > > > > > > > > > > > > > > > > > > > > > > v14: > > > > > > > > > > > - Incorporate Acked-by tags from Namhyung Kim. > > > > > > > > > > > - Re-polish and expand commit descriptions to provide thorough explanations > > > > > > > > > > > of the changes and their rationale. > > > > > > > > > > > > > > > > > > > > Thanks, tentatively applying it to perf-tools-next, for v7.2. > > > > > > > > > > > > > > > > > > Had to apply a minor fixup for a conflict with anoter patch series from > > > > > > > > > you, the LBR one. > > > > > > > > > > > > > > > > Sorry for that and thanks for dealing with the conflict! Any chance > > > > > > > > you could push to tmp.perf-tools-next? I have some other series that > > > > > > > > will conflict and it would be nice to rebase those changes there. > > > > > > > > > > > > > > I just removed the last two patches, the ones for kwork, as: > > > > > > > > > > > > > > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= NO_LIBELF=1 -C tools/perf O=/tmp/build/perf > > > > > > > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' > > > > > > > BUILD: Doing 'make -j32' parallel build > > > > > > > Makefile.config:647: Warning: Disabled BPF skeletons as libelf is required by bpftool > > > > > > > Makefile.config:745: Disabling post unwind, no support found. > > > > > > > Makefile.config:856: Missing python setuptools, the python binding won't be built, please install python3-setuptools or equivalent > > > > > > > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev > > > > > > > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev > > > > > > > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. > > > > > > > > > > > > > > Auto-detecting system features: > > > > > > > ... libdw: [ on ] > > > > > > > ... glibc: [ on ] > > > > > > > ... libelf: [ on ] > > > > > > > ... libnuma: [ on ] > > > > > > > ... numa_num_possible_cpus: [ on ] > > > > > > > ... libpython: [ on ] > > > > > > > ... libcapstone: [ on ] > > > > > > > ... llvm-perf: [ on ] > > > > > > > ... zlib: [ on ] > > > > > > > ... lzma: [ on ] > > > > > > > ... bpf: [ on ] > > > > > > > ... libaio: [ on ] > > > > > > > ... libzstd: [ on ] > > > > > > > ... libopenssl: [ on ] > > > > > > > ... rust: [ OFF ] > > > > > > > > > > > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o > > > > > > > <SNIP> > > > > > > > LINK /tmp/build/perf/perf > > > > > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_pop_atom': > > > > > > > builtin-kwork.c:(.text+0x59c92): undefined reference to `work_exit' > > > > > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `work_push_atom.constprop.0': > > > > > > > builtin-kwork.c:(.text+0x5aba8): undefined reference to `work_exit' > > > > > > > /usr/bin/ld: /tmp/build/perf/perf-in.o: in function `cmd_kwork': > > > > > > > (.text+0x5bb4b): undefined reference to `work_exit' > > > > > > > /usr/bin/ld: (.text+0x5bbae): undefined reference to `work_exit' > > > > > > > /usr/bin/ld: (.text+0x5c3b2): undefined reference to `work_exit' > > > > > > > collect2: error: ld returned 1 exit status > > > > > > > make[2]: *** [Makefile.perf:586: /tmp/build/perf/perf] Error 1 > > > > > > > make[1]: *** [Makefile.perf:289: sub-make] Error 2 > > > > > > > make: *** [Makefile:76: all] Error 2 > > > > > > > make: Leaving directory '/git/perf-7.1.0-rc2/tools/perf' > > > > > > > + exit 1 > > > > > > > toolsbuilder@five:~$ > > > > > > > > > > > > > > > > > > > > > I'm doing some more tests, just a moment and I'll push what I have to > > > > > > > tmp.perf-tools-next. > > > > > > > > > > > > Also: > > > > > > > > > > > > toolsbuilder@five:~$ cat dm.log/almalinux\:8 > > > > > > <SNIP> > > > > > > OLLECT_GCC=gcc > > > > > > COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper > > > > > > OFFLOAD_TARGET_NAMES=nvptx-none > > > > > > OFFLOAD_TARGET_DEFAULT=1 > > > > > > Target: x86_64-redhat-linux > > > > > > Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugs.almalinux.org/ --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux > > > > > > Thread model: posix > > > > > > gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > > > > > > + make ARCH= CROSS_COMPILE= EXTRA_CFLAGS= -C tools/perf O=/tmp/build/perf > > > > > > make: Entering directory '/git/perf-7.1.0-rc2/tools/perf' > > > > > > BUILD: Doing 'make -j32' parallel build > > > > > > Makefile.config:1045: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev > > > > > > Makefile.config:1061: No libcapstone found, disables disasm engine support for 'perf script', please install libcapstone-dev/capstone-devel > > > > > > Makefile.config:1110: libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev > > > > > > Makefile.config:1135: Rust is not found. Test workloads with rust are disabled. > > > > > > > > > > > > Auto-detecting system features: > > > > > > ... libdw: [ on ] > > > > > > ... glibc: [ on ] > > > > > > ... libelf: [ on ] > > > > > > ... libnuma: [ on ] > > > > > > ... numa_num_possible_cpus: [ on ] > > > > > > ... libpython: [ on ] > > > > > > ... libcapstone: [ OFF ] > > > > > > ... llvm-perf: [ on ] > > > > > > ... zlib: [ on ] > > > > > > ... lzma: [ on ] > > > > > > ... bpf: [ on ] > > > > > > ... libaio: [ on ] > > > > > > ... libzstd: [ on ] > > > > > > ... libopenssl: [ on ] > > > > > > ... rust: [ OFF ] > > > > > > > > > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v0.o > > > > > > CC /tmp/build/perf/dlfilters/dlfilter-test-api-v2.o > > > > > > <SNIP> > > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/cache.json > > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/counter.json > > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/floating-point.json > > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/frontend.json > > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/memory.json > > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/other.json > > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/pipeline.json > > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/virtual-memory.json > > > > > > GEN /tmp/build/perf/pmu-events/test-empty-pmu-events.c > > > > > > Traceback (most recent call last): > > > > > > File "pmu-events/jevents.py", line 1524, in <module> > > > > > > main() > > > > > > File "pmu-events/jevents.py", line 1487, in main > > > > > > with concurrent.futures.ProcessPoolExecutor(initializer=_init_worker, initargs=(_arch_std_events,)) as executor: > > > > > > TypeError: __init__() got an unexpected keyword argument 'initializer' > > > > > > make[3]: *** [pmu-events/Build:176: /tmp/build/perf/pmu-events/test-empty-pmu-events.c] Error 1 > > > > > > make[3]: *** Deleting file '/tmp/build/perf/pmu-events/test-empty-pmu-events.c' > > > > > > make[2]: *** [Makefile.perf:554: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2 > > > > > > make[2]: *** Waiting for unfinished jobs.... > > > > > > > > > > But: > > > > > > > > > > toolsbuilder@five:~$ export BUILD_TARBALL=http://192.168.86.5/perf/perf-7.1.0-rc2.tar.xz > > > > > toolsbuilder@five:~$ time dm > > > > > 1 8.77 almalinux:8 : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > > > > > 2 84.96 almalinux:9 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-3.el9) flex 2.6.4 > > > > > 3: 103.23 almalinux:9-i386 : Ok gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3) , clang version 17.0.6 (AlmaLinux OS Foundation 17.0.6-5.el9) flex 2.6.4 > > > > > 4 90.91 almalinux:10 : Ok gcc (GCC) 14.3.1 20250617 (Red Hat 14.3.1-2) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-1.el10.alma.1) flex 2.6.4 > > > > > 5 118.21 alpine:3.16 : Ok gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219 , Alpine clang version 13.0.1 flex 2.6.4 > > > > > ... > > > > > > > > You can drop the parallelize jevent.py changes and I'll follow up. > > > > Sorry for the breakage. > > > > > > It was just that almalinux:8 so far, its an old system, so I'm keeping > > > it to see what other systems fail, if any. > > > > > > So far: > > > > > > toolsbuilder@five:~$ export BUILD_TARBALL=http://192.168.86.5/perf/perf-7.1.0-rc2.tar.xz > > > toolsbuilder@five:~$ time dm > > > 1 8.77 almalinux:8 : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC) > > > 2 84.96 almalinux:9 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-3.el9) flex 2.6.4 > > > 3: almalinux:9-i386WARNING: image platform (linux/386) does not match the expected platform (linux/amd64) > > > WARNING: image platform (linux/386) does not match the expected platform (linux/amd64) > > > 103.23 almalinux:9-i386 : Ok gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3) , clang version 17.0.6 (AlmaLinux OS Foundation 17.0.6-5.el9) flex 2.6.4 > > > 4 90.91 almalinux:10 : Ok gcc (GCC) 14.3.1 20250617 (Red Hat 14.3.1-2) , clang version 20.1.8 (AlmaLinux OS Foundation 20.1.8-1.el10.alma.1) flex 2.6.4 > > > 5 118.21 alpine:3.16 : Ok gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219 , Alpine clang version 13.0.1 flex 2.6.4 > > > 6 106.13 alpine:3.17 : Ok gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924 , Alpine clang version 15.0.7 flex 2.6.4 > > > 7 102.80 alpine:3.18 : Ok gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924 , Alpine clang version 16.0.6 flex 2.6.4 > > > 8 114.48 alpine:3.19 : Ok gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014 , Alpine clang version 17.0.5 flex 2.6.4 > > > 9 109.53 alpine:3.20 : Ok gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309 , Alpine clang version 17.0.6 flex 2.6.4 > > > 10 116.20 alpine:3.22 : Ok gcc (Alpine 14.2.0) 14.2.0 , Alpine clang version 20.1.8 flex 2.6.4 > > > 11 109.83 alpine:3.23 : Ok gcc (Alpine 15.2.0) 15.2.0 , Alpine clang version 21.1.2 flex 2.6.4 > > > 12 119.23 alpine:edge : Ok gcc (Alpine 14.2.0) 14.2.0 , Alpine clang version 19.1.4 flex 2.6.4 > > > 13 93.22 amazonlinux:2023 : Ok gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5) , clang version 15.0.7 (AWS 15.0.7-3.amzn2023.0.4) flex 2.6.4 > > > 14 93.40 amazonlinux:devel : Ok gcc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4) , clang version 15.0.6 (Amazon Linux 15.0.6-3.amzn2023.0.2) flex 2.6.4 > > > 15 102.98 archlinux:base : Ok gcc (GCC) 15.2.1 20250813 , clang version 20.1.8 flex 2.6.4 > > > 16 9.58 centos:stream : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-21) (GCC) > > > 17: clearlinux:latest > > > > > > COPY /tmp/build/perf/ <- pmu-events/arch/x86/westmereex/virtual-memory.json > > > GEN /tmp/build/perf/pmu-events/test-empty-pmu-events.c > > > Traceback (most recent call last): > > > File "pmu-events/jevents.py", line 1524, in <module> > > > main() > > > File "pmu-events/jevents.py", line 1487, in main > > > with concurrent.futures.ProcessPoolExecutor(initializer=_init_worker, initargs=(_arch_std_events,)) as executor: > > > TypeError: __init__() got an unexpected keyword argument 'initializer' > > > make[3]: *** [pmu-events/Build:176: /tmp/build/perf/pmu-events/test-empty-pmu-events.c] Error 1 > > > make[3]: *** Deleting file '/tmp/build/perf/pmu-events/test-empty-pmu-events.c' > > > make[2]: *** [Makefile.perf:554: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2 > > > make[2]: *** Waiting for unfinished jobs.... > > > > > > Auto-detecting system features: > > > ... clang-bpf-co-re: [ on ] > > > ... llvm: [ on ] > > > ... libcap: [ on ] > > > ... libbfd: [ on ] > > > > > > MKDIR /tmp/build/perf/util/bpf_skel/.tmp/bootstrap/libbpf/include/bpf > > > > > > > > > centos:stream is the bleeding edge, so I'll drop that as you suggested, > > > ok. > > Sgtm. I'm confused though, something old and something new broke? > In the "Minimal requirements to compile the Kernel" > (https://www.kernel.org/doc/html/latest/process/changes.html) they > state Python must be version 3.9, so it'd be nice to set that as the > baseline wrt APIs. We could probably automate that in the build and > make the build NO_PYTHON if the version is older than 3.9. > > > So I removed these, i.e. from the parallelize onwards: > > > > 28 O T May 18 Ian Rogers ( 43) │ ├─>[PATCH v7 14/14] perf build: Convert llvm-config shell queries to simply expanded variables > > 29 O T May 18 Ian Rogers ( 62) │ ├─>[PATCH v7 13/14] perf pmu-events: Convert recursive shell assignments and macros to Make built-ins > > 30 O T May 18 Ian Rogers ( 47) │ ├─>[PATCH v7 12/14] perf build: Prefix SCRIPTS with output directory to fix continuous rebuilds > > 31 O T May 18 Ian Rogers ( 97) │ ├─>[PATCH v7 11/14] perf pmu-events: Parallelize JSON and metric pre-computation in jevents.py > > > > Could we keep 12, 13 and 14? They are independent changes and offer > significant build performance improvements. Lemme try cherry picking them then. I removed without checking if there were any deps. - Arnaldo
Everything is at https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git tmp.perf-tools-next I also rebased my perf.data validation (that has some extra fixes, because... Sashiko): https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-data-validation I think I addressed some of your review comments, if bored, take a look, I'll submit as soon as I get what is in tmp.perf-tools-next moved to perf-tools-next which I plan/hope to do later today, after the container build tests finish. - Arnaldo
On Wed, May 20, 2026 at 2:51 PM Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > > Everything is at > > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git tmp.perf-tools-next > > I also rebased my perf.data validation (that has some extra fixes, because... Sashiko): > > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-data-validation > > I think I addressed some of your review comments, if bored, take a look, > I'll submit as soon as I get what is in tmp.perf-tools-next moved to > perf-tools-next which I plan/hope to do later today, after the container > build tests finish. I'll look at the perf-data-validation branch. Would it be okay to post the patches to LKML so that we can get the Sashiko review on them? Thanks, Ian > - Arnaldo
On Wed, May 20, 2026 at 03:32:18PM -0700, Ian Rogers wrote: > On Wed, May 20, 2026 at 2:51 PM Arnaldo Carvalho de Melo > <acme@kernel.org> wrote: > > > > > > Everything is at > > > > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git tmp.perf-tools-next > > > > I also rebased my perf.data validation (that has some extra fixes, because... Sashiko): > > > > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-data-validation > > > > I think I addressed some of your review comments, if bored, take a look, > > I'll submit as soon as I get what is in tmp.perf-tools-next moved to > > perf-tools-next which I plan/hope to do later today, after the container > > build tests finish. > > I'll look at the perf-data-validation branch. Would it be okay to post > the patches to LKML so that we can get the Sashiko review on them? I did it, and having passed thru sashiko locally dozens of times it ended up being rather clean :-) I'm addressing some of the valid concerns raised now and will send a v2. - Arnaldo
On Wed, May 20, 2026 at 3:32 PM Ian Rogers <irogers@google.com> wrote: > > On Wed, May 20, 2026 at 2:51 PM Arnaldo Carvalho de Melo > <acme@kernel.org> wrote: > > > > > > Everything is at > > > > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git tmp.perf-tools-next > > > > I also rebased my perf.data validation (that has some extra fixes, because... Sashiko): > > > > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-data-validation > > > > I think I addressed some of your review comments, if bored, take a look, > > I'll submit as soon as I get what is in tmp.perf-tools-next moved to > > perf-tools-next which I plan/hope to do later today, after the container > > build tests finish. > > I'll look at the perf-data-validation branch. Would it be okay to post > the patches to LKML so that we can get the Sashiko review on them? In "perf session: Bound nr_cpus_avail and validate sample CPU" the perf_session__deliver_event change appears to inline evlist__parse_sample which seems unfortunate from a code reuse point-of-view. The commit message calls this out but doesn't describe the motivation for the change. Could we fix evlist__parse_sample? Thanks, Ian > Thanks, > Ian > > > - Arnaldo
On Wed, May 20, 2026 at 03:43:52PM -0700, Ian Rogers wrote:
> On Wed, May 20, 2026 at 3:32 PM Ian Rogers <irogers@google.com> wrote:
> > I'll look at the perf-data-validation branch. Would it be okay to post
> > the patches to LKML so that we can get the Sashiko review on them?
> In "perf session: Bound nr_cpus_avail and validate sample CPU" the
> perf_session__deliver_event change appears to inline
> evlist__parse_sample which seems unfortunate from a code reuse
> point-of-view. The commit message calls this out but doesn't describe
> the motivation for the change. Could we fix evlist__parse_sample?
The motivation:
18 -Also refactor the sample parsing in perf_session__deliver_event()
19 -to call evsel__parse_sample() directly (via evlist__event2evsel()
20 -for evsel lookup), with explicit guest VM SID resolution for
21 -machine_pid and vcpu fields.
18 +Inline evlist__parse_sample() into perf_session__deliver_event()
19 +so the evsel lookup needed for sample_type checking reuses the same
20 +evsel that parsed the sample, avoiding a second evlist__event2evsel()
21 +call on every event.
A follow up patch could introduce a evlist__parse_sample variation that
passes a evsel pointer address where to store the evsel used so that it
can be reused and avoid the duplicate lookup.
- Arnaldo
On Wed, May 20, 2026 at 12:15 PM Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > On Wed, May 20, 2026 at 12:05:06PM -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) because all uses of the evsel need to be fixed > > up. Since the perf_sample now carries its own resolved evsel pointer, > > passing evsel separately is redundant and error-prone (allowing > > parameter divergence bugs). > > > > This series cleans up the redundant evsel parameter across all perf > > tool subcommands and APIs, ensuring that tools uniformly retrieve > > event attributes directly from the sample itself. This simplifies > > function signatures and improves API consistency. > > > > Additionally, this series incorporates subsequent memory safety > > improvements, robust bounds checking, and memory leak corrections > > prompted by address sanitizers and Sashiko code reviews. > > > > The original combined RFC patch: > > https://lore.kernel.org/lkml/20260126071822.447368-1-irogers@google.com/ > > was split up per reviewer requests. > > > > v14: > > - Incorporate Acked-by tags from Namhyung Kim. > > - Re-polish and expand commit descriptions to provide thorough explanations > > of the changes and their rationale. > > Thanks, tentatively applying it to perf-tools-next, for v7.2. > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Thanks Arnaldo! There will be Sashiko reviews to come and the boundary checking is likely to conflict with the boundary checking you are adding in: https://lore.kernel.org/linux-perf-users/20260510033424.255812-1-acme@kernel.org/ When feedback arrives, I prefer sending additional fixes rather than issuing a v15. I don't mind if you want to drop the boundary checks I added, they were only included in the series to satisfy Sashiko and because I worried we'd forget about them. Thanks, Ian
© 2016 - 2026 Red Hat, Inc.