]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf stat bperf cgroup: Increase MAX_EVENTS from 32 to 1024
authorIan Rogers <irogers@google.com>
Thu, 16 Oct 2025 15:07:18 +0000 (08:07 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Sun, 19 Oct 2025 03:35:40 +0000 (12:35 +0900)
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 <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/bpf_skel/bperf_cgroup.bpf.c

index 57cab7647a9ad76603cbaa955a1449152aacbb0e..18ab4d9b49ffbd9f7d952843b6b9b9898ade8060 100644 (file)
@@ -7,7 +7,7 @@
 #include <bpf/bpf_core_read.h>
 
 #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.