aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index cdae9b2db1cc..d58e41445d0d 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -296,12 +296,15 @@ static size_t hists__fprintf_nr_sample_events(struct hists *self,
296{ 296{
297 size_t ret; 297 size_t ret;
298 char unit; 298 char unit;
299 unsigned long nr_events = self->stats.nr_events[PERF_RECORD_SAMPLE]; 299 unsigned long nr_samples = self->stats.nr_events[PERF_RECORD_SAMPLE];
300 u64 nr_events = self->stats.total_period;
300 301
301 nr_events = convert_unit(nr_events, &unit); 302 nr_samples = convert_unit(nr_samples, &unit);
302 ret = fprintf(fp, "# Events: %lu%c", nr_events, unit); 303 ret = fprintf(fp, "# Samples: %lu%c", nr_samples, unit);
303 if (evname != NULL) 304 if (evname != NULL)
304 ret += fprintf(fp, " %s", evname); 305 ret += fprintf(fp, " of event '%s'", evname);
306
307 ret += fprintf(fp, "\n# Event count (approx.): %" PRIu64, nr_events);
305 return ret + fprintf(fp, "\n#\n"); 308 return ret + fprintf(fp, "\n#\n");
306} 309}
307 310
@@ -680,14 +683,10 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
680 683
681 } 684 }
682 685
683 if (strcmp(report.input_name, "-") != 0) { 686 if (strcmp(report.input_name, "-") != 0)
684 if (report.use_gtk) 687 setup_browser(true);
685 perf_gtk_setup_browser(argc, argv, true); 688 else
686 else
687 setup_browser(true);
688 } else {
689 use_browser = 0; 689 use_browser = 0;
690 }
691 690
692 /* 691 /*
693 * Only in the newt browser we are doing integrated annotation, 692 * Only in the newt browser we are doing integrated annotation,