Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751725AbcKIO2S (ORCPT ); Wed, 9 Nov 2016 09:28:18 -0500 Received: from mail.kernel.org ([198.145.29.136]:59740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751317AbcKIO2R (ORCPT ); Wed, 9 Nov 2016 09:28:17 -0500 Date: Wed, 9 Nov 2016 11:28:11 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , Markus Trippelsdorf Subject: Re: [PATCH 2/4] perf hist browser: Show folded sign properly on --hierarchy Message-ID: <20161109142811.GF12125@kernel.org> References: <20161108130833.9263-1-namhyung@kernel.org> <20161108130833.9263-3-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161108130833.9263-3-namhyung@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1215 Lines: 37 Em Tue, Nov 08, 2016 at 10:08:31PM +0900, Namhyung Kim escreveu: > When horizontall scrolling is used in hierarchy mode, the folded signed > disappears at the right most column. Humm, this indeed shows the '+' folded signal after pressing ->, but it moves from the first to the third column :-\ - Arnaldo > Signed-off-by: Namhyung Kim > --- > tools/perf/ui/browsers/hists.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c > index fe5677ccbc22..7722ad311318 100644 > --- a/tools/perf/ui/browsers/hists.c > +++ b/tools/perf/ui/browsers/hists.c > @@ -1381,8 +1381,14 @@ static int hist_browser__show_hierarchy_entry(struct hist_browser *browser, > } > > perf_hpp_list__for_each_format(entry->hpp_list, fmt) { > - ui_browser__write_nstring(&browser->b, "", 2); > - width -= 2; > + if (first) { > + ui_browser__printf(&browser->b, "%c ", folded_sign); > + width -= 2; > + first = false; > + } else { > + ui_browser__write_nstring(&browser->b, "", 2); > + width -= 2; > + } > > /* > * No need to call hist_entry__snprintf_alignment() > -- > 2.10.1