public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	"stable # 4 . 5" <stable@vger.kernel.org>
Subject: Re: [PATCH] perf diff: Fix duplicated output column
Date: Tue, 10 May 2016 15:17:12 +0200	[thread overview]
Message-ID: <20160510131712.GA23071@krava> (raw)
In-Reply-To: <1462884499-6612-1-git-send-email-namhyung@kernel.org>

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
> 

  reply	other threads:[~2016-05-10 13:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 12:48 [PATCH] perf diff: Fix duplicated output column Namhyung Kim
2016-05-10 13:17 ` Jiri Olsa [this message]
2016-05-10 13:38   ` Arnaldo Carvalho de Melo
2016-05-10 20:33 ` [tip:perf/core] " tip-bot for Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160510131712.GA23071@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox