From: Ian Rogers Date: Thu, 16 Oct 2025 15:07:18 +0000 (-0700) Subject: perf stat bperf cgroup: Increase MAX_EVENTS from 32 to 1024 X-Git-Tag: v6.19-rc1~61^2~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8308511f6e090db769e35b958e2fb9714e5456f;p=thirdparty%2Fkernel%2Flinux.git perf stat bperf cgroup: Increase MAX_EVENTS from 32 to 1024 The MAX_EVENTS value ensured a counted loop presumably to satisfy the BPF verifier. It is possible to go past 32 events when gathering uncore events. Increase the amount to 1024 as that should provide some amount of headroom. Signed-off-by: Ian Rogers Signed-off-by: Namhyung Kim --- diff --git a/tools/perf/util/bpf_skel/bperf_cgroup.bpf.c b/tools/perf/util/bpf_skel/bperf_cgroup.bpf.c index 57cab7647a9ad..18ab4d9b49ffb 100644 --- a/tools/perf/util/bpf_skel/bperf_cgroup.bpf.c +++ b/tools/perf/util/bpf_skel/bperf_cgroup.bpf.c @@ -7,7 +7,7 @@ #include #define MAX_LEVELS 10 // max cgroup hierarchy level: arbitrary -#define MAX_EVENTS 32 // max events per cgroup: arbitrary +#define MAX_EVENTS 1024 // max events per cgroup: arbitrary // NOTE: many of map and global data will be modified before loading // from the userspace (perf tool) using the skeleton helpers.