From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760959AbcISIFe (ORCPT ); Mon, 19 Sep 2016 04:05:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35076 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752881AbcISIF3 (ORCPT ); Mon, 19 Sep 2016 04:05:29 -0400 Date: Mon, 19 Sep 2016 10:05:25 +0200 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , Andi Kleen Subject: Re: [PATCH 6/7] perf ui/tui: Reset output width for hierarchy Message-ID: <20160919080525.GC26906@krava> References: <20160913074552.13284-1-namhyung@kernel.org> <20160913074552.13284-7-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160913074552.13284-7-namhyung@kernel.org> User-Agent: Mutt/1.7.0 (2016-08-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 19 Sep 2016 08:05:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 13, 2016 at 04:45:51PM +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. > > Fixes: 1b2dbbf41a0f ("perf hists: Use own hpp_list for hierarchy mode") > Signed-off-by: Namhyung Kim > --- > 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); > + } we could add new function hists__reset_width and use it from both std and tui code thanks, jirka