All of lore.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>,
	Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH 1/3] perf ui/tui: Reset output width for hierarchy
Date: Tue, 20 Sep 2016 09:07:28 +0200	[thread overview]
Message-ID: <20160920070728.GA6538@krava> (raw)
In-Reply-To: <20160920053025.13989-1-namhyung@kernel.org>

On Tue, Sep 20, 2016 at 02:30:23PM +0900, Namhyung Kim wrote:
> When --hierarchy option is used, each entry has its own hpp_list to show
> the result.  But it missed to update width of each column.
> 
> Before:
> 
>   - 46.29% 48.12%        netctl-auto
>      + 31.44% 29.25%        [kernel.vmlinux]
>      + 8.52% 11.55%        libc-2.22.so
>      + 5.19% 6.91%        bash
>   + 10.75% 11.83%        wpa_cli
>   + 8.25% 2.23%        swapper
>   + 6.45% 5.40%        tr
>   + 4.81% 8.09%        awk
>   + 4.15% 2.85%        firefox
>   + 3.86% 2.53%        sh
> 
> After:
> 
>   -  46.29%  48.12%        netctl-auto
>       +  31.44%  29.25%        [kernel.vmlinux]
>       +   8.52%  11.55%        libc-2.22.so
>       +   5.19%   6.91%        bash
>   +  10.75%  11.83%        wpa_cli
>   +   8.25%   2.23%        swapper
>   +   6.45%   5.40%        tr
>   +   4.81%   8.09%        awk
>   +   4.15%   2.85%        firefox
>   +   3.86%   2.53%        sh
> 
> Fixes: 1b2dbbf41a0f ("perf hists: Use own hpp_list for hierarchy mode")
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

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

thanks,
jirka

> ---
>  tools/perf/ui/browsers/hists.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> index 35e44b1879e3..49db16334814 100644
> --- a/tools/perf/ui/browsers/hists.c
> +++ b/tools/perf/ui/browsers/hists.c
> @@ -2067,6 +2067,7 @@ void hist_browser__init(struct hist_browser *browser,
>  			struct hists *hists)
>  {
>  	struct perf_hpp_fmt *fmt;
> +	struct perf_hpp_list_node *node;
>  
>  	browser->hists			= hists;
>  	browser->b.refresh		= hist_browser__refresh;
> @@ -2079,6 +2080,11 @@ void hist_browser__init(struct hist_browser *browser,
>  		perf_hpp__reset_width(fmt, hists);
>  		++browser->b.columns;
>  	}
> +	/* hierarchy entries have their own hpp list */
> +	list_for_each_entry(node, &hists->hpp_formats, list) {
> +		perf_hpp_list__for_each_format(&node->hpp, fmt)
> +			perf_hpp__reset_width(fmt, hists);
> +	}
>  }
>  
>  struct hist_browser *hist_browser__new(struct hists *hists)
> -- 
> 2.9.3
> 

  parent reply	other threads:[~2016-09-20  7:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20  5:30 [PATCH 1/3] perf ui/tui: Reset output width for hierarchy Namhyung Kim
2016-09-20  5:30 ` [PATCH 2/3] perf hists: Factor out hists__reset_column_width() Namhyung Kim
2016-09-20  7:07   ` Jiri Olsa
2016-09-20 21:45   ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-09-20  5:30 ` [PATCH 3/3] perf report: Fix output of 'pid' sort key Namhyung Kim
2016-09-20  7:07 ` Jiri Olsa [this message]
2016-09-20 21:45 ` [tip:perf/core] perf ui/tui: Reset output width for hierarchy 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=20160920070728.GA6538@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=andi@firstfloor.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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.