From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933945AbcJQOwp (ORCPT ); Mon, 17 Oct 2016 10:52:45 -0400 Received: from terminus.zytor.com ([198.137.202.10]:52400 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932657AbcJQOwg (ORCPT ); Mon, 17 Oct 2016 10:52:36 -0400 Date: Mon, 17 Oct 2016 07:51:59 -0700 From: tip-bot for Namhyung Kim Message-ID: Cc: andi@firstfloor.org, acme@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, markus@trippelsdorf.de, tglx@linutronix.de, jolsa@kernel.org, a.p.zijlstra@chello.nl Reply-To: tglx@linutronix.de, mingo@kernel.org, markus@trippelsdorf.de, a.p.zijlstra@chello.nl, jolsa@kernel.org, namhyung@kernel.org, acme@redhat.com, andi@firstfloor.org, linux-kernel@vger.kernel.org, hpa@zytor.com In-Reply-To: <20161007050412.3000-1-namhyung@kernel.org> References: <20161007050412.3000-1-namhyung@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf top: Fix refreshing hierarchy entries on TUI Git-Commit-ID: c611152373e84a7677cd7d496e849de4debdab66 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Commit-ID: c611152373e84a7677cd7d496e849de4debdab66 Gitweb: http://git.kernel.org/tip/c611152373e84a7677cd7d496e849de4debdab66 Author: Namhyung Kim AuthorDate: Fri, 7 Oct 2016 14:04:12 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 13 Oct 2016 11:10:14 -0300 perf top: Fix refreshing hierarchy entries on TUI Markus reported that 'perf top --hierarchy' 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-and-Tested-by: Markus Trippelsdorf Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Peter Zijlstra Fixes: f5b763feebe9 ("perf hists browser: Count number of hierarchy entries") Link: http://lkml.kernel.org/r/20161007050412.3000-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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 fb8e42c..4ffff7b 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);