From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752007AbaDQNor (ORCPT ); Thu, 17 Apr 2014 09:44:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51139 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751116AbaDQNoq (ORCPT ); Thu, 17 Apr 2014 09:44:46 -0400 Date: Thu, 17 Apr 2014 15:10:11 +0200 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Paul Mackerras , Namhyung Kim , LKML , David Ahern , Andi Kleen Subject: Re: [PATCH 3/3] perf top/tui: Update nr_entries properly after filter is applied Message-ID: <20140417131011.GA19339@krava.brq.redhat.com> References: <1397721206-15393-1-git-send-email-namhyung@kernel.org> <1397721206-15393-4-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1397721206-15393-4-git-send-email-namhyung@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 17, 2014 at 04:53:26PM +0900, Namhyung Kim wrote: SNIP > -static void hist_browser__update_pcnt_entries(struct hist_browser *hb) > +static void hist_browser__update_nr_entries(struct hist_browser *hb) > { > u64 nr_entries = 0; > struct rb_node *nd = rb_first(&hb->hists->entries); > @@ -1355,7 +1358,7 @@ static void hist_browser__update_pcnt_entries(struct hist_browser *hb) > nr_entries++; > } > > - hb->nr_pcnt_entries = nr_entries; > + hb->nr_filtered_entries = nr_entries; > } > > static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, > @@ -1410,9 +1413,9 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, > if (browser == NULL) > return -1; > > - if (min_pcnt) { > + if (hists__has_filter(hists) || min_pcnt) { seems like this could be coupled to browser__has_filter function jirka