perf stat: Do not open cgroups for BPF counters

The --bpf-counters and --for-each-cgroup options use a set of shared
events among the given cgroups rather than adding events for each cgroup
respectively.  It only uses cgroup-ID to compare and calculate the
result.  So no need to open and keep FDs for cgroups in BPF mode.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
Namhyung Kim 2026-07-08 13:04:07 -07:00
commit 3f7909fa92