summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2026-07-10 17:04:16 -0700
committerNamhyung Kim <namhyung@kernel.org>2026-07-16 10:35:23 -0700
commitc16af17927e0b9105f2964338f9341e0faf7edaa (patch)
tree816e948954e3fc2f6c1ee43c9dab3ade762dd09d /tools/perf/scripts/python/bin/stackcollapse-report
parent3f7909fa921e38b7aba8566b03ca5e0754a8fa8b (diff)
perf stat: Fix duplicate output with --for-each-cgroup
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': 8,440,165 duration_time / 8,439,895 duration_time / 8,440,015 duration_time / 8,440,024 duration_time / 8,440,075 duration_time / 8,440,095 duration_time / 330 context-switches / # 679.4 cs/sec cs_per_second 485.69 msec cpu-clock / # 57.5 CPUs CPUs_utilized 70 cpu-migrations / # 144.1 migrations/sec migrations_per_second 71 page-faults / # 146.2 faults/sec page_faults_per_second 12,183,711 branch-misses / # 10.9 % branch_miss_rate (5.15%) 111,981,297 branches / (5.15%) 95,844,809 branches / # 197.3 M/sec branch_frequency (35.49%) 65,611,429 cpu-cycles / # 0.1 GHz cycles_frequency (98.32%) 24,170,987 cpu-cycles / (95.12%) 18,552,509 instructions / # 0.8 instructions insn_per_cycle (95.12%) 22,405,293 cpu-cycles / (64.78%) 6,840,383 stalled-cycles-frontend / # 0.31 frontend_cycles_idle (64.78%) <not counted> cpu-cycles / <not supported> stalled-cycles-backend / # nan backend_cycles_idle <not supported> stalled-cycles-backend / # nan stalled_cycles_per_instruction <not supported> instructions / <not supported> stalled-cycles-frontend / 0.006546057 seconds time elapsed Some events weren't counted. Try disabling the NMI watchdog: echo 0 > /proc/sys/kernel/nmi_watchdog perf stat ... echo 1 > /proc/sys/kernel/nmi_watchdog But I'm worrying about opening same events multiple times. Probably due to grouping, but I'm not sure if it's beneficial in the end. Without duplication, it seems it won't cause multiplexing (assuming no other users at the same time). Fixes: a3248b5b5427d ("perf jevents: Add metric DefaultShowEvents") Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions