mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
perf stat: Fix CVS output format for non-supported counters
When printing stats in CSV mode, 'perf stat' appends extra separators
when a counter is not supported:
<not supported>,,L1-dcache-store-misses,mesos/bd442f34-2b4a-47df-b966-9b281f9f56fc,0,100.00,,,,
Which causes a failure when parsing fields. The numbers of separators
should be the same for each line, no matter if the counter is or not
supported.
Signed-off-by: Ilya Pronin <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Andi Kleen <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Fixes: 92a61f6412 ("perf stat: Implement CSV metrics output")
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
4caea0574c
commit
40c21898ba
1 changed files with 1 additions and 1 deletions
|
|
@ -917,7 +917,7 @@ static void print_metric_csv(void *ctx,
|
|||
char buf[64], *vals, *ends;
|
||||
|
||||
if (unit == NULL || fmt == NULL) {
|
||||
fprintf(out, "%s%s%s%s", csv_sep, csv_sep, csv_sep, csv_sep);
|
||||
fprintf(out, "%s%s", csv_sep, csv_sep);
|
||||
return;
|
||||
}
|
||||
snprintf(buf, sizeof(buf), fmt, val);
|
||||
|
|
|
|||
Loading…
Reference in a new issue