perf stat: Use recently introduced skip_spaces()
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 810826acd122ed859e238bf1555a09b326c8fe23 Gitweb: https://git.kernel.org/tip/810826acd122ed859e238bf1555a09b326c8fe23 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Tue, 25 Jun 2019 21:28:49 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 25 Jun 2019 21:28:49 -0300
perf stat: Use recently introduced skip_spaces()
No change in behaviour.
Cc Andi Kleen <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/util/stat-display.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
tools/perf/util/stat-display.c +2 -3
@@ -1,5 +1,6 @@#include <stdio.h> #include <inttypes.h> +#include <linux/string.h> #include <linux/time64.h> #include <math.h> #include "color.h"
@@ -215,9 +216,7 @@ static void print_metric_csv(struct perf_stat_config *config __maybe_unused,while (isdigit (*ends) || *ends =='.' ) ends++; *ends =0 ; -while (isspace (*unit)) - unit++; -fprintf (out,"%s%s%s%s" , config->csv_sep, vals, config->csv_sep, unit); +fprintf (out,"%s%s%s%s" , config->csv_sep, vals, config->csv_sep,skip_spaces (unit)); }/* Filter out some columns that don't work well in metrics only mode */