From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F087CC433FE for ; Tue, 8 Mar 2022 03:21:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242155AbiCHDVy (ORCPT ); Mon, 7 Mar 2022 22:21:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233800AbiCHDVw (ORCPT ); Mon, 7 Mar 2022 22:21:52 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CB277F4B; Mon, 7 Mar 2022 19:20:56 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4AD98D6E; Mon, 7 Mar 2022 19:20:56 -0800 (PST) Received: from [10.162.17.54] (a077893.blr.arm.com [10.162.17.54]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BC1BA3FA50; Mon, 7 Mar 2022 19:20:52 -0800 (PST) Message-ID: Date: Tue, 8 Mar 2022 08:50:50 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] perf: Add irq and exception return branch types Content-Language: en-US To: Arnaldo Carvalho de Melo , James Clark Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Thomas Gleixner , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org References: <1645681014-3346-1-git-send-email-anshuman.khandual@arm.com> <10aac3a9-6912-6e47-400e-5c7d8ca9dbcd@arm.com> From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/6/22 00:34, Arnaldo Carvalho de Melo wrote: > Em Mon, Feb 28, 2022 at 03:45:25PM +0000, James Clark escreveu: >> >> On 24/02/2022 05:36, Anshuman Khandual wrote: >>> This expands generic branch type classification by adding two more entries >>> there in i.e irq and exception return. Also updates the x86 implementation >>> to process X86_BR_IRET and X86_BR_IRQ records as appropriate. This changes >>> branch types reported to user space on x86 platform but it should not be a >>> problem. The possible scenarios and impacts are enumerated here. >>> >>> -------------------------------------------------------------------------- >>> | kernel | perf tool | Impact | >>> -------------------------------------------------------------------------- >>> | old | old | Works as before | >>> -------------------------------------------------------------------------- >>> | old | new | PERF_BR_UNKNOWN is processed | >>> -------------------------------------------------------------------------- >>> | new | old | PERF_BR_ERET/IRQ are blocked via old PERF_BR_MAX | >>> -------------------------------------------------------------------------- >>> | new | new | PERF_BR_ERET/IRQ are recognized | >>> -------------------------------------------------------------------------- >>> >>> When PERF_BR_ERET/IRQ are blocked via old PERF_BR_MAX (new kernel with old >>> perf tool) the user space might throw up an warning complaining about some >>> unrecognized branch types being reported, but it is expected. PERF_BR_ERET >>> and PERF_BR_IRQ branch types will be used for BRBE implementation on arm64 >>> platform. >>> >>> Cc: Peter Zijlstra >>> Cc: Ingo Molnar >>> Cc: Arnaldo Carvalho de Melo >>> Cc: Mark Rutland >>> Cc: Alexander Shishkin >>> Cc: Jiri Olsa >>> Cc: Namhyung Kim >>> Cc: Thomas Gleixner >>> Cc: Will Deacon >>> Cc: linux-arm-kernel@lists.infradead.org >>> Cc: linux-perf-users@vger.kernel.org >>> Cc: linux-kernel@vger.kernel.org >>> Signed-off-by: Anshuman Khandual >>> --- >>> This applies on v5.17-rc5 >>> >>> These two new branch types expands generic branch type classification but >>> still leaves another three entries in 'type' field for later. Please refer >>> a previous discussion [1] for some further context. >>> >>> [1] https://lore.kernel.org/all/1643348653-24367-1-git-send-email-anshuman.khandual@arm.com/ >>> >>> arch/x86/events/intel/lbr.c | 4 ++-- >>> include/uapi/linux/perf_event.h | 2 ++ > Please try to avoid lockstep development of kernel and tools/, submit > patches to the kernel maintainers for the kernel parts, and to the perf > tools maintainer in separate patches. Sure, will split this patch into two i.e kernel and user space changes. I have an updated series which has some more kernel and user space API changes. But I am wondering if there should be just a single patch updating user space API for all the preceding kernel changes, or there should be one user space API patch for each corresponding kernel change ? > > It is important that changes to the API are flagged, for instance via > tools/perf/check-headers.sh so that opportunity is given for the various > people involved in perf (u/k) development to see what is going on. Will run the diff after the series has been applied to demonstrate all the API changes and update that in the cover letter. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 168AEC433F5 for ; Tue, 8 Mar 2022 03:22:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5pN3FIgCufC5Ace7BmO2+7tG+iqVFeaUJSflhTLNQlw=; b=nAcM6kG4i0jGFN 7e53io1MJWPl4KmWqco+w9noC5y5P0HMxzgwWIzPlsRcUg4SxihvUH1ENYa4JmjIUu2RSx+g155ba dtbwAtX/pBvZiWU6aZNw7KW6jSH734o9ZtWPqj3NXm54zA4+w4IWenhipDJPX3Nulv0QuzbyAtmTd p4IX/+5Hlgp0SV5+sHMfvBbxF1ZIAEggTCYdv+dUSERaws+adEgN5r2xR9nQxptZP6ik/gPNFgTR0 zE5/Wy+QeCG2EygQB3Ib/zr1ueziS8w1bCBYcUbfGYtBS5pRhcra4RMd+Wk/h0PD2ePxTP88PLjJy ET8lILTIU2KMOwbOsg5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRQPI-002Wki-V5; Tue, 08 Mar 2022 03:21:05 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRQPE-002Wjn-S1 for linux-arm-kernel@lists.infradead.org; Tue, 08 Mar 2022 03:21:02 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4AD98D6E; Mon, 7 Mar 2022 19:20:56 -0800 (PST) Received: from [10.162.17.54] (a077893.blr.arm.com [10.162.17.54]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BC1BA3FA50; Mon, 7 Mar 2022 19:20:52 -0800 (PST) Message-ID: Date: Tue, 8 Mar 2022 08:50:50 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] perf: Add irq and exception return branch types Content-Language: en-US To: Arnaldo Carvalho de Melo , James Clark Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Thomas Gleixner , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org References: <1645681014-3346-1-git-send-email-anshuman.khandual@arm.com> <10aac3a9-6912-6e47-400e-5c7d8ca9dbcd@arm.com> From: Anshuman Khandual In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220307_192101_061871_66BA8655 X-CRM114-Status: GOOD ( 22.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/6/22 00:34, Arnaldo Carvalho de Melo wrote: > Em Mon, Feb 28, 2022 at 03:45:25PM +0000, James Clark escreveu: >> >> On 24/02/2022 05:36, Anshuman Khandual wrote: >>> This expands generic branch type classification by adding two more entries >>> there in i.e irq and exception return. Also updates the x86 implementation >>> to process X86_BR_IRET and X86_BR_IRQ records as appropriate. This changes >>> branch types reported to user space on x86 platform but it should not be a >>> problem. The possible scenarios and impacts are enumerated here. >>> >>> -------------------------------------------------------------------------- >>> | kernel | perf tool | Impact | >>> -------------------------------------------------------------------------- >>> | old | old | Works as before | >>> -------------------------------------------------------------------------- >>> | old | new | PERF_BR_UNKNOWN is processed | >>> -------------------------------------------------------------------------- >>> | new | old | PERF_BR_ERET/IRQ are blocked via old PERF_BR_MAX | >>> -------------------------------------------------------------------------- >>> | new | new | PERF_BR_ERET/IRQ are recognized | >>> -------------------------------------------------------------------------- >>> >>> When PERF_BR_ERET/IRQ are blocked via old PERF_BR_MAX (new kernel with old >>> perf tool) the user space might throw up an warning complaining about some >>> unrecognized branch types being reported, but it is expected. PERF_BR_ERET >>> and PERF_BR_IRQ branch types will be used for BRBE implementation on arm64 >>> platform. >>> >>> Cc: Peter Zijlstra >>> Cc: Ingo Molnar >>> Cc: Arnaldo Carvalho de Melo >>> Cc: Mark Rutland >>> Cc: Alexander Shishkin >>> Cc: Jiri Olsa >>> Cc: Namhyung Kim >>> Cc: Thomas Gleixner >>> Cc: Will Deacon >>> Cc: linux-arm-kernel@lists.infradead.org >>> Cc: linux-perf-users@vger.kernel.org >>> Cc: linux-kernel@vger.kernel.org >>> Signed-off-by: Anshuman Khandual >>> --- >>> This applies on v5.17-rc5 >>> >>> These two new branch types expands generic branch type classification but >>> still leaves another three entries in 'type' field for later. Please refer >>> a previous discussion [1] for some further context. >>> >>> [1] https://lore.kernel.org/all/1643348653-24367-1-git-send-email-anshuman.khandual@arm.com/ >>> >>> arch/x86/events/intel/lbr.c | 4 ++-- >>> include/uapi/linux/perf_event.h | 2 ++ > Please try to avoid lockstep development of kernel and tools/, submit > patches to the kernel maintainers for the kernel parts, and to the perf > tools maintainer in separate patches. Sure, will split this patch into two i.e kernel and user space changes. I have an updated series which has some more kernel and user space API changes. But I am wondering if there should be just a single patch updating user space API for all the preceding kernel changes, or there should be one user space API patch for each corresponding kernel change ? > > It is important that changes to the API are flagged, for instance via > tools/perf/check-headers.sh so that opportunity is given for the various > people involved in perf (u/k) development to see what is going on. Will run the diff after the series has been applied to demonstrate all the API changes and update that in the cover letter. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel