diff options
author | Namhyung Kim <[email protected]> | 2022-11-23 10:01:55 -0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2022-11-24 09:35:57 -0300 |
commit | 6d74ed369d4342bb7d4fecbc1cde6061b5bb5604 (patch) | |
tree | 50d39fde446226216558283d153a55604757de9b | |
parent | 15792642db6946890416a6d1616b03ab25c26fa7 (diff) |
perf stat: Move summary prefix printing logic in CSV output
It matches to the prefix (interval timestamp), so better to have them together.
No functional change intended.
Signed-off-by: Namhyung Kim <[email protected]>
Acked-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Athira Jajeev <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Xing Zhengjun <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/util/stat-display.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c index 46e90f0bb423..d86f2f8e020d 100644 --- a/tools/perf/util/stat-display.c +++ b/tools/perf/util/stat-display.c @@ -713,11 +713,6 @@ static void printout(struct perf_stat_config *config, struct aggr_cpu_id id, int nl = config->metric_only ? new_line_metric : new_line_std; } - if (!config->no_csv_summary && config->csv_output && - config->summary && !config->interval && !config->metric_only) { - fprintf(config->output, "%16s%s", "summary", config->csv_sep); - } - if (run == 0 || ena == 0 || counter->counts->scaled == -1) { if (config->metric_only) { pm(config, &os, NULL, "", "", 0); @@ -828,8 +823,13 @@ static void print_counter_aggrdata(struct perf_stat_config *config, ena = aggr->counts.ena; run = aggr->counts.run; - if (prefix && !metric_only) - fprintf(output, "%s", prefix); + if (!metric_only) { + if (prefix) + fprintf(output, "%s", prefix); + else if (config->summary && config->csv_output && + !config->no_csv_summary && !config->interval) + fprintf(output, "%16s%s", "summary", config->csv_sep); + } uval = val * counter->scale; |