perf report: Jump to symbol source view from total cycles view

This patch supports jumping from tui total cycles view to symbol source
view.

For example,

  perf record -b ./div
  perf report --total-cycles

In total cycles view, we can select one entry and press 'a' or press
ENTER key to jump to symbol source view.

This patch also sets sort_order to NULL in cmd_report() which will use
the default branch sort order. The percent value in new annotate view
will be consistent with the percent in annotate view switched from perf
report (we observed the original percent gap with previous patches).

 v2:
 ---
 Fix the 'make NO_SLANG=1' error. (set __maybe_unused to
 annotation_opts in block_hists_tui_browse()).

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@intel.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20191118140849.20714-2-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Jin Yao
2019-11-18 22:08:49 +08:00
committed by Arnaldo Carvalho de Melo
parent 5cb456af99
commit 848a5e507e
5 changed files with 40 additions and 10 deletions

View File

@@ -441,7 +441,8 @@ struct block_report *block_info__create_report(struct evlist *evlist,
}
int report__browse_block_hists(struct block_hist *bh, float min_percent,
struct evsel *evsel)
struct evsel *evsel, struct perf_env *env,
struct annotation_options *annotation_opts)
{
int ret;
@@ -454,7 +455,8 @@ int report__browse_block_hists(struct block_hist *bh, float min_percent,
return 0;
case 1:
symbol_conf.report_individual_block = true;
ret = block_hists_tui_browse(bh, evsel, min_percent);
ret = block_hists_tui_browse(bh, evsel, min_percent,
env, annotation_opts);
hists__delete_entries(&bh->block_hists);
return ret;
default: