From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755341AbbDNMr0 (ORCPT ); Tue, 14 Apr 2015 08:47:26 -0400 Received: from mail.kernel.org ([198.145.29.136]:46999 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753832AbbDNMrT (ORCPT ); Tue, 14 Apr 2015 08:47:19 -0400 Date: Tue, 14 Apr 2015 09:47:14 -0300 From: Arnaldo Carvalho de Melo To: Steve Capper Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Paul Mackerras , Ingo Molnar Subject: Re: [RFC PATCH] perf report: Don't add filtered events to histogram Message-ID: <20150414124714.GI16027@kernel.org> References: <1429013103-22718-1-git-send-email-steve.capper@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429013103-22718-1-git-send-email-steve.capper@linaro.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Apr 14, 2015 at 01:05:03PM +0100, Steve Capper escreveu: > If one filters events by a single comm in perf report via: > perf report --no-children -c program-name This seems right even without any explanation, wonder when was that this bug was added or what is that we are missing here... commit 2c86c7ca760634f09dcbd76069e5102b4de6f8f1 Author: Namhyung Kim Date: Mon Mar 17 18:18:54 2014 -0300 perf report: Merge al->filtered with hist_entry->filtered I.e. don't drop al->filtered entries, create the hist_entries and use its ->filtered bitmap, that is kept with the same semantics for its bitmap, leaving the filtering to be done at the hist_entry level, i.e. in the UIs. This will allow zooming in/out the filters. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-xeyhkepu7plw716lrtb0zlnu@git.kernel.org [ yanked this out of a previous patch ] Signed-off-by: Arnaldo Carvalho de Melo diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index c47bf586fcba..a74059f0c45f 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -231,7 +231,7 @@ static int process_sample_event(struct perf_tool *tool, return -1; } - if (al.filtered || (rep->hide_unresolved && al.sym == NULL)) + if (rep->hide_unresolved && al.sym == NULL) return 0; if (rep->cpu_list && !test_bit(sample->cpu, rep->cpu_bitmap)) -------------------------------------------------------------- So, yes, what you did was what was there in the first place, but now we need to try to have the above cset in mind before proceeding... - Arnaldo > +++ b/tools/perf/builtin-report.c > @@ -166,6 +166,9 @@ static int process_sample_event(struct perf_tool *tool, > if (al.map != NULL) > al.map->dso->hit = 1; > > + if (al.filtered) > + return 0; > + > ret = hist_entry_iter__add(&iter, &al, evsel, sample, rep->max_stack, > rep); > if (ret < 0) > -- > 2.1.0