All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf report: Set proper sort__mode for the branch option
@ 2014-08-06 15:04 naota
  2014-08-13  5:45 ` Namhyung Kim
  2014-08-14  8:49 ` [tip:perf/core] " tip-bot for naota@elisp.net
  0 siblings, 2 replies; 4+ messages in thread
From: naota @ 2014-08-06 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo

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>
---
 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;
 	}
-- 
2.0.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf report: Set proper sort__mode for the branch option
  2014-08-06 15:04 [PATCH] perf report: Set proper sort__mode for the branch option naota
@ 2014-08-13  5:45 ` Namhyung Kim
  2014-08-13 20:14   ` Arnaldo Carvalho de Melo
  2014-08-14  8:49 ` [tip:perf/core] " tip-bot for naota@elisp.net
  1 sibling, 1 reply; 4+ messages in thread
From: Namhyung Kim @ 2014-08-13  5:45 UTC (permalink / raw)
  To: naota
  Cc: linux-kernel, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Stephane Eranian

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;
>  	}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf report: Set proper sort__mode for the branch option
  2014-08-13  5:45 ` Namhyung Kim
@ 2014-08-13 20:14   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-08-13 20:14 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: naota, linux-kernel, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Stephane Eranian

Em Wed, Aug 13, 2014 at 02:45:34PM +0900, Namhyung Kim escreveu:
> 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

Thanks, applied.

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip:perf/core] perf report: Set proper sort__mode for the branch option
  2014-08-06 15:04 [PATCH] perf report: Set proper sort__mode for the branch option naota
  2014-08-13  5:45 ` Namhyung Kim
@ 2014-08-14  8:49 ` tip-bot for naota@elisp.net
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for naota@elisp.net @ 2014-08-14  8:49 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, paulus, mingo, hpa, mingo, a.p.zijlstra,
	naota, namhyung, tglx

Commit-ID:  edd114e213751c3274891f692be66eb65771f278
Gitweb:     http://git.kernel.org/tip/edd114e213751c3274891f692be66eb65771f278
Author:     naota@elisp.net <naota@elisp.net>
AuthorDate: Thu, 7 Aug 2014 00:04:49 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
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.

Signed-off-by: Naohiro Aota <naota@elisp.net>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/87y4v1fylq.fsf@elisp.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 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 b9e0fca..3da59a8 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -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;
 	}

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-14  8:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06 15:04 [PATCH] perf report: Set proper sort__mode for the branch option naota
2014-08-13  5:45 ` Namhyung Kim
2014-08-13 20:14   ` Arnaldo Carvalho de Melo
2014-08-14  8:49 ` [tip:perf/core] " tip-bot for naota@elisp.net

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.