Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936463AbcJGBSF (ORCPT ); Thu, 6 Oct 2016 21:18:05 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:50955 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936298AbcJGBR4 (ORCPT ); Thu, 6 Oct 2016 21:17:56 -0400 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: namhyung@kernel.org X-Original-SENDERIP: 165.244.98.150 X-Original-MAILFROM: namhyung@kernel.org X-Original-SENDERIP: 10.177.227.17 X-Original-MAILFROM: namhyung@kernel.org Date: Fri, 7 Oct 2016 10:17:53 +0900 From: Namhyung Kim To: Markus Trippelsdorf CC: Subject: Re: Scrolling down broken with "perf top --hierarchy" Message-ID: <20161007011753.GA31113@sejong> References: <20161006163333.GC308@x4> MIME-Version: 1.0 In-Reply-To: <20161006163333.GC308@x4> User-Agent: Mutt/1.7.0 (2016-08-17) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB08/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/10/07 10:17:53, Serialize by Router on LGEKRMHUB08/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/10/07 10:17:53, Serialize complete at 2016/10/07 10:17:53 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1740 Lines: 47 Hi Markus, On Thu, Oct 06, 2016 at 06:33:33PM +0200, Markus Trippelsdorf wrote: > Scrolling down is broken when using "perf top --hierarchy". > When it starts up everything is OK and one can scroll up and down to all > entries. But as further and further new entries get added to the list, > scrolling down is blocked (at the position of the last entry that was > shown directly after startup). I think below patch will fix the problem. Please check. >From 38ef0f20e6b787fcdab265307ac679cfac6dd0ff Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Fri, 7 Oct 2016 10:09:42 +0900 Subject: [PATCH] perf top: Fix refreshing hierarchy entries on TUI Markus reported that perf top --hierarch cannot scroll down after refresh. This was because the number of entries are not updated when hierarchy is enabled. Unlike normal report view, hierarchy mode needs to keep its own entry count since it can have non-leaf entries which can expand/collapse. Reported-by: Markus Trippelsdorf Signed-off-by: Namhyung Kim --- tools/perf/ui/browsers/hists.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index fb8e42c7507a..4ffff7be9299 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c @@ -601,7 +601,8 @@ int hist_browser__run(struct hist_browser *browser, const char *help) u64 nr_entries; hbt->timer(hbt->arg); - if (hist_browser__has_filter(browser)) + if (hist_browser__has_filter(browser) || + symbol_conf.report_hierarchy) hist_browser__update_nr_entries(browser); nr_entries = hist_browser__nr_entries(browser); -- 2.9.3