perf report: Jump to symbol source view from total cycles view
authorJin Yao <yao.jin@linux.intel.com>
Mon, 18 Nov 2019 14:08:49 +0000 (22:08 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 19 Nov 2019 22:37:04 +0000 (19:37 -0300)
commit848a5e507e26176902e328bd8ae4a5e9c7d2bafe
tree43126e2e1a9b55fe14421e366d743e081eedef16
parent5cb456af99f58378fe90649d6faaab25e379be06
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>
tools/perf/builtin-report.c
tools/perf/ui/browsers/hists.c
tools/perf/util/block-info.c
tools/perf/util/block-info.h
tools/perf/util/hist.h