Message ID | 1429013103-22718-1-git-send-email-steve.capper@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCWKR65P2UCRBDEFWSUQKGQEWLJRYWQ@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E3D3C2121F for <linaro@patches.linaro.org>; Tue, 14 Apr 2015 12:05:34 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf2005660lbb.0 for <linaro@patches.linaro.org>; Tue, 14 Apr 2015 05:05:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=e/nWdY5Cmk2OBaPAdrmWdf1w2HJmsPa9dqftJryXvBI=; b=L4iTTGGzZDTHI33QuZE2NLvA4iI4Bdpxo9ioY0UyI4fbtSxE2tAm4AhbVTnPk6HpsG Qqdv0LBD2x9/dhHT+aF26GsLcCZ9FCx6Vwqj7ckHtLBcaYr/fN50L6uBmKeepju2cmL7 qK844m2YVqG7mxWB6Iin60VLqoe2/tvZjQkMjIqA1WHLzcOoOrSaPmRadrDX7DU83U/n JsRDj12JxYyfmW8pmpFgU8XCmHN41N6jRMUVy44uk56LeA7SkVaKWP7SUOwq2ogwY2pf qJTMoZCiiCSW5smAUUod9MUvg3KMV+Lo4mpTqc9e4/aT1Go2DSpF/a/cvTHeW4HbBkD1 cNMg== X-Gm-Message-State: ALoCoQleQQQF1ZRT1pR2IvPJgQUbbzJHBEl56u3s28XqmSCmABC0t4IxxKYsaAEWUY1gQQdovEbG X-Received: by 10.180.10.136 with SMTP id i8mr2723432wib.7.1429013132905; Tue, 14 Apr 2015 05:05:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.225.134 with SMTP id rk6ls36201lac.83.gmail; Tue, 14 Apr 2015 05:05:32 -0700 (PDT) X-Received: by 10.152.42.141 with SMTP id o13mr18105693lal.33.1429013132694; Tue, 14 Apr 2015 05:05:32 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id ci12si752658lad.37.2015.04.14.05.05.32 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Apr 2015 05:05:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbbzk7 with SMTP id zk7so6392513lbb.0 for <patchwork-forward@linaro.org>; Tue, 14 Apr 2015 05:05:32 -0700 (PDT) X-Received: by 10.152.23.70 with SMTP id k6mr17614234laf.76.1429013132593; Tue, 14 Apr 2015 05:05:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp1815567lbt; Tue, 14 Apr 2015 05:05:31 -0700 (PDT) X-Received: by 10.68.78.65 with SMTP id z1mr35701187pbw.112.1429013130839; Tue, 14 Apr 2015 05:05:30 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hq5si1251983pbb.191.2015.04.14.05.05.29; Tue, 14 Apr 2015 05:05:30 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755226AbbDNMFZ (ORCPT <rfc822;ivan.khoronzhuk@linaro.org> + 27 others); Tue, 14 Apr 2015 08:05:25 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:33208 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754359AbbDNMFV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Apr 2015 08:05:21 -0400 Received: by wgin8 with SMTP id n8so9375610wgi.0 for <linux-kernel@vger.kernel.org>; Tue, 14 Apr 2015 05:05:20 -0700 (PDT) X-Received: by 10.180.211.2 with SMTP id my2mr30893756wic.78.1429013120173; Tue, 14 Apr 2015 05:05:20 -0700 (PDT) Received: from marmot.wormnet.eu (marmot.wormnet.eu. [188.246.204.87]) by mx.google.com with ESMTPSA id o6sm10900974wiz.24.2015.04.14.05.05.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Apr 2015 05:05:19 -0700 (PDT) From: Steve Capper <steve.capper@linaro.org> To: linux-kernel@vger.kernel.org Cc: Steve Capper <steve.capper@linaro.org>, Peter Zijlstra <a.p.zijlstra@chello.nl>, Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org> Subject: [RFC PATCH] perf report: Don't add filtered events to histogram Date: Tue, 14 Apr 2015 13:05:03 +0100 Message-Id: <1429013103-22718-1-git-send-email-steve.capper@linaro.org> X-Mailer: git-send-email 1.7.10.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: steve.capper@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 2f91094..3eaf46e 100644 --- a/tools/perf/builtin-report.c +++ 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)
If one filters events by a single comm in perf report via: perf report --no-children -c program-name perf will elide the comm column as only one comm is filtered in. This lack of distinction by comm can lead to events being merged in add_hist_entry that have different comm's, including events that have been filtered out and filtered in. Ultimately, this can lead to events disappearing from the report. If one instead invokes perf via: perf report --no-children -c program-name,random-made-up-name Then the comm column remains and all the expected events are present. This patch prevents filtered out events from being considered by hist_entry_iter__add. Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Steve Capper <steve.capper@linaro.org> --- Hi, This patch fixes my problem, but I don't know enough perf to confidently state that this will work everywhere (hence this being marked as an RFC). Please let me know if I've missed something and I'll be happy to re-spin/test/submit. Cheers,