All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
	Namhyung Kim <namhyung.kim@lge.com>,
	LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>,
	Andi Kleen <andi@firstfloor.org>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH] perf ui/tui: Fix a small callchain display bug
Date: Wed, 13 Aug 2014 17:06:34 -0300	[thread overview]
Message-ID: <20140813200634.GG2718@kernel.org> (raw)
In-Reply-To: <1407909761-10822-1-git-send-email-namhyung@kernel.org>

Em Wed, Aug 13, 2014 at 03:02:41PM +0900, Namhyung Kim escreveu:
> The currently when perf TUI report shows callchain, the first level
> chains have bogus '+' sign even though only the last one has children.
> 
> Since they are on a single line of the chain, toggling intermediate
> entries has no effect.  Fix it to show '+' sign at the last entry
> only.  Note that non-first level callchain entries don't have this
> problem.
> 
> Before:
> 
>   Children      Self  Command  Shared Object      Symbols
> ---------------------------------------------------------------------------

Please avoid starting a line with --- inside the changeset comment log as this
confuses scripts, that takes that as the end of the comment, like in ...
(see below)

> -   40.70%     0.00%  swapper  [kernel.kallsyms]  [k] cpuidle_wrap_enter
>    + cpuidle_wrap_enter
>    + cpuidle_enter_tk
>    + cpuidle_idle_call
>    + cpu_idle
> 
> After:
> 
>   Children      Self  Command  Shared Object      Symbols
> ---------------------------------------------------------------------------
> -   40.70%     0.00%  swapper  [kernel.kallsyms]  [k] cpuidle_wrap_enter
>      cpuidle_wrap_enter
>      cpuidle_enter_tk
>      cpuidle_idle_call
>    + cpu_idle
> 
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---

... here ^ ^ ^ ^ ^ 

:-)

Thanks for the fix, checking with 'P' after 'E' to expand everything,
before and after, to then do a:

diff -u perf.hist.0 perf.hist.1

- Arnaldo

>  tools/perf/ui/browsers/hists.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> index 045c1e16ac59..1818d1275d02 100644
> --- a/tools/perf/ui/browsers/hists.c
> +++ b/tools/perf/ui/browsers/hists.c
> @@ -228,8 +228,10 @@ static void callchain_node__init_have_children(struct callchain_node *node)
>  {
>  	struct callchain_list *chain;
>  
> -	list_for_each_entry(chain, &node->val, list)
> +	if (!list_empty(&node->val)) {
> +		chain = list_entry(node->val.prev, struct callchain_list, list);
>  		chain->ms.has_children = !RB_EMPTY_ROOT(&node->rb_root);
> +	}
>  
>  	callchain_node__init_have_children_rb_tree(node);
>  }
> -- 
> 2.0.0

  parent reply	other threads:[~2014-08-13 20:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13  6:02 [PATCH] perf ui/tui: Fix a small callchain display bug Namhyung Kim
2014-08-13  8:19 ` Ingo Molnar
2014-08-13 20:12   ` Arnaldo Carvalho de Melo
2014-08-13 20:06 ` Arnaldo Carvalho de Melo [this message]
2014-08-14  8:48 ` [tip:perf/core] perf hists browser: " 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=20140813200634.GG2718@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=andi@firstfloor.org \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.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 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.