]> Gentwo Git Trees - linux/.git/commit
perf stat: Read tool events last
authorIan Rogers <irogers@google.com>
Tue, 18 Nov 2025 21:13:24 +0000 (13:13 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 19 Nov 2025 04:32:41 +0000 (20:32 -0800)
commit51d87d977ec4efe000ac662ac924f00b9d8a23ec
tree88dfa920dceb9c089f1e7201c69a3b2767974800
parent87cc0b44fc3eba8c6909b3d36aeb8592e32b12d0
perf stat: Read tool events last

When reading a metric like memory bandwidth on multiple sockets, the
additional sockets will be on CPUS > 0. Because of the affinity
reading, the counters are read on CPU 0 along with the time, then the
later sockets are read. This can lead to the later sockets having a
bandwidth larger than is possible for the period of time. To avoid
this move the reading of tool events to occur after all other events
are read.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/builtin-stat.c