All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf diff: Fix duplicated output column
@ 2016-05-10 12:48 Namhyung Kim
  2016-05-10 13:17 ` Jiri Olsa
  2016-05-10 20:33 ` [tip:perf/core] " tip-bot for Namhyung Kim
  0 siblings, 2 replies; 6+ messages in thread
From: Namhyung Kim @ 2016-05-10 12:48 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, Peter Zijlstra, Jiri Olsa, LKML, stable # 4 . 5

The commit b97511c5bc94 ("perf tools: Add overhead/overhead_children
keys defaults via string") moved initialization of column headers but it
missed to check the sort__mode.  As 'perf diff' doesn't call
perf_hpp__init(), the setup_overhead() also should not be called.

Before:

  # Baseline    Delta  Children  Overhead  Shared Object        Symbol
  # ........  .......  ........  ........  ...................  .......................
  #
      28.48%  -28.47%    28.48%    28.48%  [kernel.vmlinux ]    [k] intel_idle
      11.51%  -11.47%    11.51%    11.51%  libxul.so            [.] 0x0000000001a360f7
       3.49%   -3.49%     3.49%     3.49%  [kernel.vmlinux]     [k] generic_exec_single
       2.91%   -2.89%     2.91%     2.91%  libdbus-1.so.3.8.11  [.] 0x000000000000cdc2
       2.86%   -2.85%     2.86%     2.86%  libxcb.so.1.1.0      [.] 0x000000000000c890
       2.44%   -2.39%     2.44%     2.44%  [kernel.vmlinux]     [k] perf_event_aux_ctx

After:

  # Baseline    Delta  Shared Object        Symbol
  # ........  .......  ...................  .......................
  #
      28.48%  -28.47%  [kernel.vmlinux]     [k] intel_idle
      11.51%  -11.47%  libxul.so            [.] 0x0000000001a360f7
       3.49%   -3.49%  [kernel.vmlinux]     [k] generic_exec_single
       2.91%   -2.89%  libdbus-1.so.3.8.11  [.] 0x000000000000cdc2
       2.86%   -2.85%  libxcb.so.1.1.0      [.] 0x000000000000c890
       2.44%   -2.39%  [kernel.vmlinux]     [k] perf_event_aux_ctx

Cc: stable <stable@vger.kernel.org>  # 4.5
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/util/sort.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 772e2e461ec3..20e69edd5006 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -2438,6 +2438,9 @@ static char *prefix_if_not_in(const char *pre, char *str)
 
 static char *setup_overhead(char *keys)
 {
+	if (sort__mode == SORT_MODE__DIFF)
+		return keys;
+
 	keys = prefix_if_not_in("overhead", keys);
 
 	if (symbol_conf.cumulate_callchain)
-- 
2.8.2

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

* Re: [PATCH] perf diff: Fix duplicated output column
  2016-05-10 12:48 [PATCH] perf diff: Fix duplicated output column Namhyung Kim
@ 2016-05-10 13:17 ` Jiri Olsa
  2016-05-10 13:38   ` Arnaldo Carvalho de Melo
  2016-05-10 20:33 ` [tip:perf/core] " tip-bot for Namhyung Kim
  1 sibling, 1 reply; 6+ messages in thread
From: Jiri Olsa @ 2016-05-10 13:17 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, Peter Zijlstra, Jiri Olsa,
	LKML, stable # 4 . 5

On Tue, May 10, 2016 at 09:48:19PM +0900, Namhyung Kim wrote:
> The commit b97511c5bc94 ("perf tools: Add overhead/overhead_children
> keys defaults via string") moved initialization of column headers but it
> missed to check the sort__mode.  As 'perf diff' doesn't call
> perf_hpp__init(), the setup_overhead() also should not be called.
> 
> Before:
> 
>   # Baseline    Delta  Children  Overhead  Shared Object        Symbol
>   # ........  .......  ........  ........  ...................  .......................
>   #
>       28.48%  -28.47%    28.48%    28.48%  [kernel.vmlinux ]    [k] intel_idle
>       11.51%  -11.47%    11.51%    11.51%  libxul.so            [.] 0x0000000001a360f7
>        3.49%   -3.49%     3.49%     3.49%  [kernel.vmlinux]     [k] generic_exec_single
>        2.91%   -2.89%     2.91%     2.91%  libdbus-1.so.3.8.11  [.] 0x000000000000cdc2
>        2.86%   -2.85%     2.86%     2.86%  libxcb.so.1.1.0      [.] 0x000000000000c890
>        2.44%   -2.39%     2.44%     2.44%  [kernel.vmlinux]     [k] perf_event_aux_ctx
> 
> After:
> 
>   # Baseline    Delta  Shared Object        Symbol
>   # ........  .......  ...................  .......................
>   #
>       28.48%  -28.47%  [kernel.vmlinux]     [k] intel_idle
>       11.51%  -11.47%  libxul.so            [.] 0x0000000001a360f7
>        3.49%   -3.49%  [kernel.vmlinux]     [k] generic_exec_single
>        2.91%   -2.89%  libdbus-1.so.3.8.11  [.] 0x000000000000cdc2
>        2.86%   -2.85%  libxcb.so.1.1.0      [.] 0x000000000000c890
>        2.44%   -2.39%  [kernel.vmlinux]     [k] perf_event_aux_ctx
> 
> Cc: stable <stable@vger.kernel.org>  # 4.5
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

> ---
>  tools/perf/util/sort.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
> index 772e2e461ec3..20e69edd5006 100644
> --- a/tools/perf/util/sort.c
> +++ b/tools/perf/util/sort.c
> @@ -2438,6 +2438,9 @@ static char *prefix_if_not_in(const char *pre, char *str)
>  
>  static char *setup_overhead(char *keys)
>  {
> +	if (sort__mode == SORT_MODE__DIFF)
> +		return keys;
> +
>  	keys = prefix_if_not_in("overhead", keys);
>  
>  	if (symbol_conf.cumulate_callchain)
> -- 
> 2.8.2
> 

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

* Re: [PATCH] perf diff: Fix duplicated output column
  2016-05-10 13:17 ` Jiri Olsa
@ 2016-05-10 13:38   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-05-10 13:38 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Namhyung Kim, Ingo Molnar, Peter Zijlstra, Jiri Olsa, LKML,
	stable # 4 . 5

Em Tue, May 10, 2016 at 03:17:12PM +0200, Jiri Olsa escreveu:
> On Tue, May 10, 2016 at 09:48:19PM +0900, Namhyung Kim wrote:
> > Cc: stable <stable@vger.kernel.org>  # 4.5
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> 
> Acked-by: Jiri Olsa <jolsa@kernel.org>

Thanks, applied to perf/urgent.

- Arnaldo

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

* [tip:perf/core] perf diff: Fix duplicated output column
  2016-05-10 12:48 [PATCH] perf diff: Fix duplicated output column Namhyung Kim
  2016-05-10 13:17 ` Jiri Olsa
@ 2016-05-10 20:33 ` tip-bot for Namhyung Kim
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot for Namhyung Kim @ 2016-05-10 20:33 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mingo, peterz, linux-kernel, jolsa, namhyung, hpa, acme, tglx

Commit-ID:  ba07ebe02077751db101ed202bb690f504248575
Gitweb:     http://git.kernel.org/tip/ba07ebe02077751db101ed202bb690f504248575
Author:     Namhyung Kim <namhyung@kernel.org>
AuthorDate: Tue, 10 May 2016 21:48:19 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 10 May 2016 10:37:05 -0300

perf diff: Fix duplicated output column

The commit b97511c5bc94 ("perf tools: Add overhead/overhead_children
keys defaults via string") moved initialization of column headers but it
missed to check the sort__mode.  As 'perf diff' doesn't call
perf_hpp__init(), the setup_overhead() also should not be called.

Before:

  # Baseline    Delta  Children  Overhead  Shared Object        Symbol
  # ........  .......  ........  ........  ...................  .......................
  #
      28.48%  -28.47%    28.48%    28.48%  [kernel.vmlinux ]    [k] intel_idle
      11.51%  -11.47%    11.51%    11.51%  libxul.so            [.] 0x0000000001a360f7
       3.49%   -3.49%     3.49%     3.49%  [kernel.vmlinux]     [k] generic_exec_single
       2.91%   -2.89%     2.91%     2.91%  libdbus-1.so.3.8.11  [.] 0x000000000000cdc2
       2.86%   -2.85%     2.86%     2.86%  libxcb.so.1.1.0      [.] 0x000000000000c890
       2.44%   -2.39%     2.44%     2.44%  [kernel.vmlinux]     [k] perf_event_aux_ctx

After:

  # Baseline    Delta  Shared Object        Symbol
  # ........  .......  ...................  .......................
  #
      28.48%  -28.47%  [kernel.vmlinux]     [k] intel_idle
      11.51%  -11.47%  libxul.so            [.] 0x0000000001a360f7
       3.49%   -3.49%  [kernel.vmlinux]     [k] generic_exec_single
       2.91%   -2.89%  libdbus-1.so.3.8.11  [.] 0x000000000000cdc2
       2.86%   -2.85%  libxcb.so.1.1.0      [.] 0x000000000000c890
       2.44%   -2.39%  [kernel.vmlinux]     [k] perf_event_aux_ctx

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org  # 4.5+
Fixes: b97511c5bc94 ("perf tools: Add overhead/overhead_children keys defaults via string")
Link: http://lkml.kernel.org/r/1462884499-6612-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/sort.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 47966a1..f5ba111 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -2445,6 +2445,9 @@ static char *prefix_if_not_in(const char *pre, char *str)
 
 static char *setup_overhead(char *keys)
 {
+	if (sort__mode == SORT_MODE__DIFF)
+		return keys;
+
 	keys = prefix_if_not_in("overhead", keys);
 
 	if (symbol_conf.cumulate_callchain)

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

* [tip:perf/core] perf diff: Fix duplicated output column
  2016-05-10 14:26 [PATCH 1/1] " Arnaldo Carvalho de Melo
  2016-05-11 12:21 ` [tip:perf/core] " tip-bot for Namhyung Kim
@ 2016-05-11 15:00 ` tip-bot for Namhyung Kim
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot for Namhyung Kim @ 2016-05-11 15:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, namhyung, peterz, jolsa, tglx, acme, torvalds

Commit-ID:  e9d848cb65d5f6f7731d12bd1b6d994bfdbcc94f
Gitweb:     http://git.kernel.org/tip/e9d848cb65d5f6f7731d12bd1b6d994bfdbcc94f
Author:     Namhyung Kim <namhyung@kernel.org>
AuthorDate: Tue, 10 May 2016 11:26:24 -0300
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 11 May 2016 16:55:32 +0200

perf diff: Fix duplicated output column

The commit b97511c5bc94 ("perf tools: Add overhead/overhead_children
keys defaults via string") moved initialization of column headers but it
missed to check the sort__mode.  As 'perf diff' doesn't call
perf_hpp__init(), the setup_overhead() also should not be called.

Before:

  # Baseline    Delta  Children  Overhead  Shared Object        Symbol
  # ........  .......  ........  ........  ...................  .......................
  #
      28.48%  -28.47%    28.48%    28.48%  [kernel.vmlinux ]    [k] intel_idle
      11.51%  -11.47%    11.51%    11.51%  libxul.so            [.] 0x0000000001a360f7
       3.49%   -3.49%     3.49%     3.49%  [kernel.vmlinux]     [k] generic_exec_single
       2.91%   -2.89%     2.91%     2.91%  libdbus-1.so.3.8.11  [.] 0x000000000000cdc2
       2.86%   -2.85%     2.86%     2.86%  libxcb.so.1.1.0      [.] 0x000000000000c890
       2.44%   -2.39%     2.44%     2.44%  [kernel.vmlinux]     [k] perf_event_aux_ctx

After:

  # Baseline    Delta  Shared Object        Symbol
  # ........  .......  ...................  .......................
  #
      28.48%  -28.47%  [kernel.vmlinux]     [k] intel_idle
      11.51%  -11.47%  libxul.so            [.] 0x0000000001a360f7
       3.49%   -3.49%  [kernel.vmlinux]     [k] generic_exec_single
       2.91%   -2.89%  libdbus-1.so.3.8.11  [.] 0x000000000000cdc2
       2.86%   -2.85%  libxcb.so.1.1.0      [.] 0x000000000000c890
       2.44%   -2.39%  [kernel.vmlinux]     [k] perf_event_aux_ctx

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: <stable@vger.kernel.org> # 4.5+
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: b97511c5bc94 ("perf tools: Add overhead/overhead_children keys defaults via string")
Link: http://lkml.kernel.org/r/1462890384-12486-2-git-send-email-acme@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 tools/perf/util/sort.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 47966a1..f5ba111 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -2445,6 +2445,9 @@ static char *prefix_if_not_in(const char *pre, char *str)
 
 static char *setup_overhead(char *keys)
 {
+	if (sort__mode == SORT_MODE__DIFF)
+		return keys;
+
 	keys = prefix_if_not_in("overhead", keys);
 
 	if (symbol_conf.cumulate_callchain)

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

* [tip:perf/core] perf diff: Fix duplicated output column
  2016-05-10 14:26 [PATCH 1/1] " Arnaldo Carvalho de Melo
@ 2016-05-11 12:21 ` tip-bot for Namhyung Kim
  2016-05-11 15:00 ` tip-bot for Namhyung Kim
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot for Namhyung Kim @ 2016-05-11 12:21 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, namhyung, tglx, linux-kernel, mingo, torvalds, peterz, jolsa, hpa

Commit-ID:  4cdcac59960c5800cef91f904c9701bed03dc4dd
Gitweb:     http://git.kernel.org/tip/4cdcac59960c5800cef91f904c9701bed03dc4dd
Author:     Namhyung Kim <namhyung@kernel.org>
AuthorDate: Tue, 10 May 2016 11:26:24 -0300
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 11 May 2016 14:15:31 +0200

perf diff: Fix duplicated output column

The commit b97511c5bc94 ("perf tools: Add overhead/overhead_children
keys defaults via string") moved initialization of column headers but it
missed to check the sort__mode.  As 'perf diff' doesn't call
perf_hpp__init(), the setup_overhead() also should not be called.

Before:

  # Baseline    Delta  Children  Overhead  Shared Object        Symbol
  # ........  .......  ........  ........  ...................  .......................
  #
      28.48%  -28.47%    28.48%    28.48%  [kernel.vmlinux ]    [k] intel_idle
      11.51%  -11.47%    11.51%    11.51%  libxul.so            [.] 0x0000000001a360f7
       3.49%   -3.49%     3.49%     3.49%  [kernel.vmlinux]     [k] generic_exec_single
       2.91%   -2.89%     2.91%     2.91%  libdbus-1.so.3.8.11  [.] 0x000000000000cdc2
       2.86%   -2.85%     2.86%     2.86%  libxcb.so.1.1.0      [.] 0x000000000000c890
       2.44%   -2.39%     2.44%     2.44%  [kernel.vmlinux]     [k] perf_event_aux_ctx

After:

  # Baseline    Delta  Shared Object        Symbol
  # ........  .......  ...................  .......................
  #
      28.48%  -28.47%  [kernel.vmlinux]     [k] intel_idle
      11.51%  -11.47%  libxul.so            [.] 0x0000000001a360f7
       3.49%   -3.49%  [kernel.vmlinux]     [k] generic_exec_single
       2.91%   -2.89%  libdbus-1.so.3.8.11  [.] 0x000000000000cdc2
       2.86%   -2.85%  libxcb.so.1.1.0      [.] 0x000000000000c890
       2.44%   -2.39%  [kernel.vmlinux]     [k] perf_event_aux_ctx

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: #@infradead.org
Cc: 4.5+@infradead.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org # 4.5+
Fixes: b97511c5bc94 ("perf tools: Add overhead/overhead_children keys defaults via string")
Link: http://lkml.kernel.org/r/1462890384-12486-2-git-send-email-acme@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 tools/perf/util/sort.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 47966a1..f5ba111 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -2445,6 +2445,9 @@ static char *prefix_if_not_in(const char *pre, char *str)
 
 static char *setup_overhead(char *keys)
 {
+	if (sort__mode == SORT_MODE__DIFF)
+		return keys;
+
 	keys = prefix_if_not_in("overhead", keys);
 
 	if (symbol_conf.cumulate_callchain)

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

end of thread, other threads:[~2016-05-11 15:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-10 12:48 [PATCH] perf diff: Fix duplicated output column Namhyung Kim
2016-05-10 13:17 ` Jiri Olsa
2016-05-10 13:38   ` Arnaldo Carvalho de Melo
2016-05-10 20:33 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-05-10 14:26 [PATCH 1/1] " Arnaldo Carvalho de Melo
2016-05-11 12:21 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-05-11 15:00 ` tip-bot for Namhyung Kim

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.