Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf stat: Add missing separator in the CSV header

It should have a comma after 'cpus' for socket and die aggregation mode.
The output of the following command shows the issue.

$ sudo perf stat -a --per-socket -x, --metric-only -I1 true

Before:

+--- here
V
time,socket,cpusGhz,insn per cycle,branch-misses of all branches,
0.000908461,S0,8,0.950,1.65,1.21,

After:

time,socket,cpus,GHz,insn per cycle,branch-misses of all branches,
0.000683094,S0,8,0.593,2.00,0.60,

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Link: https://lore.kernel.org/r/20221112032244.1077370-12-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Namhyung Kim and committed by
Arnaldo Carvalho de Melo
7565f961 a80e0e15

+2 -2
+2 -2
tools/perf/util/stat-display.c
··· 828 828 829 829 static const char *aggr_header_csv[] = { 830 830 [AGGR_CORE] = "core,cpus,", 831 - [AGGR_DIE] = "die,cpus", 832 - [AGGR_SOCKET] = "socket,cpus", 831 + [AGGR_DIE] = "die,cpus,", 832 + [AGGR_SOCKET] = "socket,cpus,", 833 833 [AGGR_NONE] = "cpu,", 834 834 [AGGR_THREAD] = "comm-pid,", 835 835 [AGGR_NODE] = "node,",