lkml.org 
[lkml]   [2014]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] perf report: Set proper sort__mode for the branch option
Date
Hi Naohiro,

(CC'ing Stephane)

> When you specify "--branch-stack"("-b" for short) or
> "--no-branch-stack", "branch_mode" variable is set to 1 or 0
> respectively. However, the code is just checking if the variable is -1
> or not, ignoring "branch_mode == 1" case. Thus "perf report -b" dose not
> show its result with the branch sorted mode. This patch fix the problem.
>
> Signed-off-by: Naohiro Aota <naota@elisp.net>

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks for fixing this!
Namhyung


> ---
> tools/perf/builtin-report.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index 21d830b..94dcf2d 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -719,7 +719,7 @@ repeat:
> has_br_stack = perf_header__has_feat(&session->header,
> HEADER_BRANCH_STACK);
>
> - if (branch_mode == -1 && has_br_stack) {
> + if ((branch_mode == -1 && has_br_stack) || branch_mode == 1) {
> sort__mode = SORT_MODE__BRANCH;
> symbol_conf.cumulate_callchain = false;
> }


\
 
 \ /
  Last update: 2014-08-13 08:01    [W:0.091 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site