diff options
author | Jiri Olsa <jolsa@kernel.org> | 2018-03-07 18:50:02 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-03-08 17:30:36 +0300 |
commit | 8ef278bb9305e1269f236013718801fe06a183d1 (patch) | |
tree | a4531e511c90d0540092a23f627c724cf12f0366 /tools/perf/ui/browsers/hists.c | |
parent | 0b58a77ca8792bd7798ef3a4d865c57694ec74fc (diff) | |
download | linux-8ef278bb9305e1269f236013718801fe06a183d1.tar.xz |
perf report: Fix the output for stdio events list
Changing the output header for reporting forced groups via --groups
option on non grouped events, like:
$ perf record -e 'cycles,instructions'
$ perf report --stdio --group
Before:
# Samples: 24 of event 'anon group { cycles:u, instructions:u }'
After:
# Samples: 24 of events 'cycles:u, instructions:u'
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Fixes: ad52b8cb4886 ("perf report: Add support to display group output for non group events")
Link: http://lkml.kernel.org/r/20180307155020.32613-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/browsers/hists.c')
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index de2bde232cb3..8b4e82548f8e 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c @@ -2261,8 +2261,9 @@ static int perf_evsel_browser_title(struct hist_browser *browser, nr_samples = convert_unit(nr_samples, &unit); printed = scnprintf(bf, size, - "Samples: %lu%c of event '%s',%s%sEvent count (approx.): %" PRIu64, - nr_samples, unit, ev_name, sample_freq_str, enable_ref ? ref : " ", nr_events); + "Samples: %lu%c of event%s '%s',%s%sEvent count (approx.): %" PRIu64, + nr_samples, unit, evsel->nr_members > 1 ? "s" : "", + ev_name, sample_freq_str, enable_ref ? ref : " ", nr_events); if (hists->uid_filter_str) |