Re: [PATCH v3 1/4] perf stat: Fix duplicate output with --for-each-cgroup

From: Namhyung Kim

Date: Fri Jul 17 2026 - 13:46:47 EST


On Fri, 10 Jul 2026 17:04:16 -0700, Namhyung Kim wrote:
> Currently it produces following output with duplicate events when
> --for-each-cgroup option is used. It seems perf stat adds them when
> it handles default events but didn't copy some fields in evsel__clone().
>
> $ sudo perf stat -a --for-each-cgroup / true
>
> Performance counter stats for 'system wide':
>
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung