diff options
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index ca41187525ed..1e81985b7d56 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -485,6 +485,22 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report return ret + fprintf(fp, "\n#\n"); } +static int perf_evlist__tui_block_hists_browse(struct evlist *evlist, + struct report *rep) +{ + struct evsel *pos; + int i = 0, ret; + + evlist__for_each_entry(evlist, pos) { + ret = report__browse_block_hists(&rep->block_reports[i++].hist, + rep->min_percent, pos); + if (ret != 0) + return ret; + } + + return 0; +} + static int perf_evlist__tty_browse_hists(struct evlist *evlist, struct report *rep, const char *help) @@ -595,6 +611,11 @@ static int report__browse_hists(struct report *rep) switch (use_browser) { case 1: + if (rep->total_cycles_mode) { + ret = perf_evlist__tui_block_hists_browse(evlist, rep); + break; + } + ret = perf_evlist__tui_browse_hists(evlist, help, NULL, rep->min_percent, &session->header.env, @@ -1396,12 +1417,8 @@ repeat: if (report.total_cycles_mode) { if (sort__mode != SORT_MODE__BRANCH) report.total_cycles_mode = false; - else if (!report.use_stdio) { - pr_err("Error: --total-cycles can be only used together with --stdio\n"); - goto error; - } else { + else sort_order = "sym"; - } } if (strcmp(input_name, "-") != 0) |