[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-ncpvp4eelf8fqhuy29uv56z9@git.kernel.org>
Date: Wed, 3 Jul 2019 07:17:49 -0700
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, ak@...ux.intel.com, mingo@...nel.org,
namhyung@...nel.org, tglx@...utronix.de,
linux-kernel@...r.kernel.org, jolsa@...nel.org,
adrian.hunter@...el.com, hpa@...or.com
Subject: [tip:perf/core] perf stat: Use recently introduced skip_spaces()
Commit-ID: 810826acd122ed859e238bf1555a09b326c8fe23
Gitweb: https://git.kernel.org/tip/810826acd122ed859e238bf1555a09b326c8fe23
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Tue, 25 Jun 2019 21:28:49 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 25 Jun 2019 21:28:49 -0300
perf stat: Use recently introduced skip_spaces()
No change in behaviour.
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Link: https://lkml.kernel.org/n/tip-ncpvp4eelf8fqhuy29uv56z9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/stat-display.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
index 992e327bce85..ce993d29cca5 100644
--- a/tools/perf/util/stat-display.c
+++ b/tools/perf/util/stat-display.c
@@ -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 */
Powered by blists - more mailing lists