On Wed, Nov 13, 2019 at 08:48:52AM +0800, Jin Yao wrote:
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.
Signed-off-by: Jin Yao <yao.jin@xxxxxxxxxxxxxxx>
---
tools/perf/builtin-report.c | 9 ++++++---
tools/perf/ui/browsers/hists.c | 25 +++++++++++++++++++++++--
tools/perf/util/block-info.c | 6 ++++--
tools/perf/util/block-info.h | 3 ++-
tools/perf/util/hist.h | 7 +++++--
5 files changed, 40 insertions(+), 10 deletions(-)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 1e81985b7d56..ceebea4013ca 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -493,7 +493,9 @@ static int perf_evlist__tui_block_hists_browse(struct evlist *evlist,
evlist__for_each_entry(evlist, pos) {
ret = report__browse_block_hists(&rep->block_reports[i++].hist,
- rep->min_percent, pos);
+ rep->min_percent, pos,
+ &rep->session->header.env,
+ &rep->annotation_opts);
if (ret != 0)
return ret;
}
@@ -525,7 +527,8 @@ static int perf_evlist__tty_browse_hists(struct evlist *evlist,
if (rep->total_cycles_mode) {
report__browse_block_hists(&rep->block_reports[i++].hist,
- rep->min_percent, pos);
+ rep->min_percent, pos,
+ NULL, NULL);
continue;
}
@@ -1418,7 +1421,7 @@ int cmd_report(int argc, const char **argv)
if (sort__mode != SORT_MODE__BRANCH)
report.total_cycles_mode = false;
else
- sort_order = "sym";
+ sort_order = NULL;
hum, how is this related to this change?
jirka