perf report: Set proper sort__mode for the branch option
PATCH 1/1 perf report: Set proper sort__mode for the branch option
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.
--- tools/perf/builtin-report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-report.c +1 -1
@@ -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; }
Signature · 1 line
2.0.2
Hi Naohiro,
(CC'ing Stephane)
Quoted 7 lines
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 <[email protected]>
Thanks for fixing this!
Namhyung
Quoted 17 lines
--- tools/perf/builtin-report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/builtin-report.c +1
-1@@ -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; }
Em Wed, Aug 13, 2014 at 02:45:34PM +0900, Namhyung Kim escreveu:
Quoted 10 lines
Hi Naohiro,
(CC'ing Stephane)
Quoted 6 lines
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.
Quoted 6 lines
Quoted 1 line
Signed-off-by Naohiro Aota <[email protected]>Acked-by Namhyung Kim <[email protected]>Thanks for fixing this!
Namhyung
Thanks, applied.
- Arnaldo
tip-bot for [email protected]
merge botperf report: Set proper sort__mode for the branch option
Commit-ID: edd114e213751c3274891f692be66eb65771f278 Gitweb: http://git.kernel.org/tip/edd114e213751c3274891f692be66eb65771f278 Author: [email protected] <[email protected]> AuthorDate: Thu, 7 Aug 2014 00:04:49 +0900 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 13 Aug 2014 17:13:48 -0300
perf report: Set proper sort__mode for the branch option
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.
--- tools/perf/builtin-report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-report.c +1 -1
@@ -730,7 +730,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; }