Re: [PATCH v3] perf stat: Add/fix bperf cgroup max events workarounds
From: Namhyung Kim
Date: Mon Oct 27 2025 - 14:22:47 EST
On Sat, 25 Oct 2025 13:28:34 -0700, Ian Rogers wrote:
> Commit b8308511f6e0 bumped the max events to 1024 but this results in
> BPF verifier issues if the number of command line events is too
> large. Workaround this by:
>
> 1) moving the constants to a header file to share between BPF and perf
> C code,
> 2) testing that the maximum number of events doesn't cause BPF
> verifier issues in debug builds,
> 3) lower the max events from 1024 to 128,
> 4) in perf stat, if there are more events than the BPF counters can
> support then disable BPF counter usage.
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung