From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752362AbbK2H5R (ORCPT ); Sun, 29 Nov 2015 02:57:17 -0500 Received: from terminus.zytor.com ([198.137.202.10]:39903 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752254AbbK2H5O (ORCPT ); Sun, 29 Nov 2015 02:57:14 -0500 Date: Sat, 28 Nov 2015 23:56:59 -0800 From: tip-bot for Namhyung Kim Message-ID: Cc: hpa@zytor.com, tglx@linutronix.de, a.p.zijlstra@chello.nl, mingo@kernel.org, namhyung@kernel.org, jolsa@redhat.com, dsahern@gmail.com, linux-kernel@vger.kernel.org, acme@redhat.com Reply-To: hpa@zytor.com, mingo@kernel.org, a.p.zijlstra@chello.nl, tglx@linutronix.de, dsahern@gmail.com, jolsa@redhat.com, namhyung@kernel.org, acme@redhat.com, linux-kernel@vger.kernel.org In-Reply-To: <1448645559-31167-3-git-send-email-namhyung@kernel.org> References: <1448645559-31167-3-git-send-email-namhyung@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf hists browser: Update nr entries regardless of min percent Git-Commit-ID: 039050482573e168690d365b8ea1d4f599ebbbd8 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: 039050482573e168690d365b8ea1d4f599ebbbd8 Gitweb: http://git.kernel.org/tip/039050482573e168690d365b8ea1d4f599ebbbd8 Author: Namhyung Kim AuthorDate: Sat, 28 Nov 2015 02:32:39 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 27 Nov 2015 21:53:33 -0300 perf hists browser: Update nr entries regardless of min percent When perf report on TUI was called with -S symbol filter, it should update nr entries even if min_pcnt is 0. IIRC the reason was to update nr entries after applying minimum percent threshold. But if symbol filter was given on command line (with -S option), it should use hists->nr_non_filtered_entries instead of hists->nr_entries. So this patch fixes a bug of navigating hists browser that the cursor goes beyond the number of entries when -S (or similar) option is used. Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1448645559-31167-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/ui/browsers/hists.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index a211b7b..dcdcbaf 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c @@ -2055,10 +2055,9 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, SLang_reset_tty(); SLang_init_tty(0, 0, 0); - if (min_pcnt) { + if (min_pcnt) browser->min_pcnt = min_pcnt; - hist_browser__update_nr_entries(browser); - } + hist_browser__update_nr_entries(browser); browser->pstack = pstack__new(3); if (browser->pstack == NULL)