projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7bd330d
)
perf stat: Use recently introduced skip_spaces()
author
Arnaldo Carvalho de Melo
<acme@redhat.com>
Wed, 26 Jun 2019 00:28:49 +0000
(21:28 -0300)
committer
Arnaldo Carvalho de Melo
<acme@redhat.com>
Wed, 26 Jun 2019 00:28:49 +0000
(21:28 -0300)
No change in behaviour.
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link:
https://lkml.kernel.org/n/tip-ncpvp4eelf8fqhuy29uv56z9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/stat-display.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/stat-display.c
b/tools/perf/util/stat-display.c
index
992e327
..
ce993d2
100644
(file)
--- 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 */