From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e23smtp03.au.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id CB1A92C012A for ; Tue, 10 Sep 2013 13:53:48 +1000 (EST) Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 Sep 2013 13:42:12 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id D6D8B2CE8054 for ; Tue, 10 Sep 2013 13:53:43 +1000 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8A3bM0h63570018 for ; Tue, 10 Sep 2013 13:37:22 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r8A3rg9q005672 for ; Tue, 10 Sep 2013 13:53:43 +1000 Message-ID: <522E9793.7060003@linux.vnet.ibm.com> Date: Tue, 10 Sep 2013 09:22:51 +0530 From: Anshuman Khandual MIME-Version: 1.0 To: Michael Ellerman Subject: Re: [PATCH V2 0/6] perf: New conditional branch filter References: <1377836690-32710-1-git-send-email-khandual@linux.vnet.ibm.com> <1378778772.25578.1.camel@concordia> In-Reply-To: <1378778772.25578.1.camel@concordia> Content-Type: text/plain; charset=UTF-8 Cc: sukadev@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, eranian@google.com, acme@redhat.com, linuxppc-dev@ozlabs.org, Michael Neuling List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 09/10/2013 07:36 AM, Michael Ellerman wrote: > On Fri, 2013-08-30 at 09:54 +0530, Anshuman Khandual wrote: >> This patchset is the re-spin of the original branch stack sampling >> patchset which introduced new PERF_SAMPLE_BRANCH_COND filter. This patchset >> also enables SW based branch filtering support for PPC64 platforms which have >> branch stack sampling support. With this new enablement, the branch filter support >> for PPC64 platforms have been extended to include all these combinations discussed >> below with a sample test application program. > > ... > >> Mixed filters >> ------------- >> (6) perf record -e branch-misses:u -j any_call,any_ret ./cprog >> Error: >> The perf.data file has no samples! >> >> NOTE: As expected. The HW filters all the branches which are calls and SW tries to find return >> branches in that given set. Both the filters are mutually exclussive, so obviously no samples >> found in the end profile. > > The semantics of multiple filters is not clear to me. It could be an OR, > or an AND. You have implemented AND, does that match existing behaviour > on x86 for example? I believe it does match. X86 code drops the branch records (originally captured in the LBR) while applying the SW filters. Regards Anshuman From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755057Ab3IJDxv (ORCPT ); Mon, 9 Sep 2013 23:53:51 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:57341 "EHLO e23smtp04.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752850Ab3IJDxt (ORCPT ); Mon, 9 Sep 2013 23:53:49 -0400 Message-ID: <522E9793.7060003@linux.vnet.ibm.com> Date: Tue, 10 Sep 2013 09:22:51 +0530 From: Anshuman Khandual User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Michael Ellerman CC: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, eranian@google.com, acme@redhat.com, Michael Neuling , svaidy@linux.vnet.ibm.com, sukadev@linux.vnet.ibm.com Subject: Re: [PATCH V2 0/6] perf: New conditional branch filter References: <1377836690-32710-1-git-send-email-khandual@linux.vnet.ibm.com> <1378778772.25578.1.camel@concordia> In-Reply-To: <1378778772.25578.1.camel@concordia> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13091003-9264-0000-0000-0000047F3990 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/10/2013 07:36 AM, Michael Ellerman wrote: > On Fri, 2013-08-30 at 09:54 +0530, Anshuman Khandual wrote: >> This patchset is the re-spin of the original branch stack sampling >> patchset which introduced new PERF_SAMPLE_BRANCH_COND filter. This patchset >> also enables SW based branch filtering support for PPC64 platforms which have >> branch stack sampling support. With this new enablement, the branch filter support >> for PPC64 platforms have been extended to include all these combinations discussed >> below with a sample test application program. > > ... > >> Mixed filters >> ------------- >> (6) perf record -e branch-misses:u -j any_call,any_ret ./cprog >> Error: >> The perf.data file has no samples! >> >> NOTE: As expected. The HW filters all the branches which are calls and SW tries to find return >> branches in that given set. Both the filters are mutually exclussive, so obviously no samples >> found in the end profile. > > The semantics of multiple filters is not clear to me. It could be an OR, > or an AND. You have implemented AND, does that match existing behaviour > on x86 for example? I believe it does match. X86 code drops the branch records (originally captured in the LBR) while applying the SW filters. Regards Anshuman