Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753228AbcKHNKJ (ORCPT ); Tue, 8 Nov 2016 08:10:09 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33930 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752802AbcKHNJc (ORCPT ); Tue, 8 Nov 2016 08:09:32 -0500 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , Markus Trippelsdorf Subject: [PATCH 2/4] perf hist browser: Show folded sign properly on --hierarchy Date: Tue, 8 Nov 2016 22:08:31 +0900 Message-Id: <20161108130833.9263-3-namhyung@kernel.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161108130833.9263-1-namhyung@kernel.org> References: <20161108130833.9263-1-namhyung@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 960 Lines: 31 When horizontall scrolling is used in hierarchy mode, the folded signed disappears at the right most column. 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