diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-06-26 11:21:47 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-06-26 11:31:43 -0300 |
commit | 80e9073f1f4473639d585b89ebc9130bb47920e8 (patch) | |
tree | a68e6b34753b4caba15a38faabbb4e2c325993e1 /tools | |
parent | c1fc14cbdcc9455507e5f54109199bfea3af185f (diff) |
perf metricgroup: Use strsep()
No change in behaviour intended, trivial optimization done by avoiding
looking for spaces in 'g' right after setting it to "No_group".
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-f2siadtp3hb5o0l1w7bvd8bk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/metricgroup.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c index a0cf3cd95ced..90cd84e2a503 100644 --- a/tools/perf/util/metricgroup.c +++ b/tools/perf/util/metricgroup.c @@ -308,10 +308,9 @@ void metricgroup__print(bool metrics, bool metricgroups, char *filter, struct mep *me; char *s; + g = skip_spaces(g); if (*g == 0) g = "No_group"; - while (isspace(*g)) - g++; if (filter && !strstr(g, filter)) continue; if (raw) |