]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf stat: Fix a segfault with --per-cluster --metric-only
authorNamhyung Kim <namhyung@kernel.org>
Fri, 28 Jun 2024 00:06:03 +0000 (17:06 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 28 Jun 2024 17:56:03 +0000 (10:56 -0700)
commitcaa463bb79a82ac5fce05a0dcf7893d94c84fc5e
tree109d3a089e0ede3711b0f6183866b06bb5c367fc
parent7afbf90ea2e238c4d049ff59dbb6c5f1a938e669
perf stat: Fix a segfault with --per-cluster --metric-only

The new --per-cluster option was added recently but it forgot to update
the aggr_header fields which are used for --metric-only option.  And it
resulted in a segfault due to NULL string in fputs().

Fixes: cbc917a1b03b ("perf stat: Support per-cluster aggregation")
Reviewed-by: Yicong Yang <yangyicong@hisilicon.com>
Tested-by: Yicong Yang <yangyicong@hisilicon.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: https://lore.kernel.org/r/20240628000604.1296808-1-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/stat-display.c