This is a note to let you know that I've just added the patch titled perf stat: Fix a segfault with --per-cluster --metric-only to the 6.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: perf-stat-fix-a-segfault-with-per-cluster-metric-onl.patch and it can be found in the queue-6.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit ebf4c2dd4be08839e6fa9d77f08d460b0eddb53a Author: Namhyung Kim <namhyung@xxxxxxxxxx> Date: Thu Jun 27 17:06:03 2024 -0700 perf stat: Fix a segfault with --per-cluster --metric-only [ Upstream commit caa463bb79a82ac5fce05a0dcf7893d94c84fc5e ] 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@xxxxxxxxxxxxx> Tested-by: Yicong Yang <yangyicong@xxxxxxxxxxxxx> Tested-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> Link: https://lore.kernel.org/r/20240628000604.1296808-1-namhyung@xxxxxxxxxx Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c index 91d2f7f65df74..186305fd2d0ef 100644 --- a/tools/perf/util/stat-display.c +++ b/tools/perf/util/stat-display.c @@ -38,6 +38,7 @@ static int aggr_header_lens[] = { [AGGR_CORE] = 18, [AGGR_CACHE] = 22, + [AGGR_CLUSTER] = 20, [AGGR_DIE] = 12, [AGGR_SOCKET] = 6, [AGGR_NODE] = 6, @@ -49,6 +50,7 @@ static int aggr_header_lens[] = { static const char *aggr_header_csv[] = { [AGGR_CORE] = "core,cpus,", [AGGR_CACHE] = "cache,cpus,", + [AGGR_CLUSTER] = "cluster,cpus,", [AGGR_DIE] = "die,cpus,", [AGGR_SOCKET] = "socket,cpus,", [AGGR_NONE] = "cpu,", @@ -60,6 +62,7 @@ static const char *aggr_header_csv[] = { static const char *aggr_header_std[] = { [AGGR_CORE] = "core", [AGGR_CACHE] = "cache", + [AGGR_CLUSTER] = "cluster", [AGGR_DIE] = "die", [AGGR_SOCKET] = "socket", [AGGR_NONE] = "cpu",