lkml.org 
[lkml]   [2019]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1 2/2] perf report: Jump to symbol source view from total cycles view
From
Date


On 11/15/2019 9:34 PM, Jiri Olsa wrote:
> 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@linux.intel.com>
>> ---
>> 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
>

Hi Jiri,

If we set the sort_order to NULL, it will use the default branch sort
order. The percent value in new annotate view will be consistent with
the percent in annotate view which is switched from perf report.

I observed the original percent gap with previous patches and then I
decide to use the default sort order. Now the test result looks good.

Thanks
Jin Yao




\
 
 \ /
  Last update: 2019-11-17 13:12    [W:0.079 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site