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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A966C433DB for ; Wed, 6 Jan 2021 10:26:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D91A2310D for ; Wed, 6 Jan 2021 10:26:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D91A2310D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Zd6cB+3vSQ5OxABaDTf3LN1tCLaNBE5oKJWazPxepzQ=; b=CSaUsje227ujQ9TG3Oocy06Is KkQhxcNJlerJ8YP99GYI0aHGTGoRp8HdXYALRimZFKMUKwC1cm+Cg9tL/ksK3+sYUxq6fMXSfkAM0 xflbyDfZiI/K/2U+N+a0lW3HQcc+OvEiNRu1U5tt83pKGyqCHFl7CGXGmuI/N5bao1S73vwEeLSLe uWn3wOelHV9VqCNmF9NV6c9WMRe2+3wBzjsHjYgmV7iLfnWUsuP20noJY3+p3+gdhMb7Eouqyi41s 7Kt18GR1HFPTs4wzcVaxEO1YThh8ERSMumAef77I5IC1nNy4HFKIZY7p8TY/EzPs1WhO4sHHZO66S IixCIH4Cg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kx5zP-000807-M3; Wed, 06 Jan 2021 10:24:27 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kx5zO-0007zT-1a for linux-arm-kernel@lists.infradead.org; Wed, 06 Jan 2021 10:24:26 +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 7C6021FB; Wed, 6 Jan 2021 02:24:20 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [10.57.36.216]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A4A273F719; Wed, 6 Jan 2021 02:24:17 -0800 (PST) Date: Wed, 6 Jan 2021 10:24:10 +0000 From: Mark Rutland To: James Clark Subject: Re: [PATCH v2] drivers/perf: Enable PID_IN_CONTEXTIDR with SPE Message-ID: <20210106102327.GA26994@C02TD0UTHF1T.local> References: <20201214084502.19954-1-james.clark@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201214084502.19954-1-james.clark@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_052426_160642_17244901 X-CRM114-Status: GOOD ( 21.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Al Grant , Mathieu Poirier , Suzuki K Poulose , Catalin Marinas , John Garry , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, leo.yan@linaro.org, will@kernel.org, linux-arm-kernel@lists.infradead.org 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 Mon, Dec 14, 2020 at 10:45:02AM +0200, James Clark wrote: > Enable PID_IN_CONTEXTIDR by default when Arm SPE is enabled. > This flag is required to get PID data in the SPE trace. Without > it the perf tool will report 0 for PID which isn't very useful, > especially when doing system wide profiling or profiling > applications that fork. > > There is a small performance overhead when enabling > PID_IN_CONTEXTIDR, but SPE itself is optional and not enabled by > default so the impact is minimised. > > Cc: Will Deacon > Cc: Mark Rutland > Cc: Al Grant > Cc: Leo Yan > Cc: John Garry > Cc: Suzuki K Poulose > Cc: Mathieu Poirier > Cc: Catalin Marinas > Signed-off-by: James Clark > --- > arch/arm64/Kconfig.debug | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug > index 265c4461031f..b030bb21a0bb 100644 > --- a/arch/arm64/Kconfig.debug > +++ b/arch/arm64/Kconfig.debug > @@ -2,6 +2,7 @@ > > config PID_IN_CONTEXTIDR > bool "Write the current PID to the CONTEXTIDR register" > + default y if ARM_SPE_PMU > help > Enabling this option causes the kernel to write the current PID to > the CONTEXTIDR register, at the expense of some additional Given that PID_IN_CONTEXTIDR doesn't take PID namespacing into account, IIUC it's kinda broken today (and arguably removing that support would be better). Can we not track the (namespaced) PID in thte main ringbuffer regardless of PID_IN_CONTEXTIDR, and leave PID_IN_CONTEXTIDR as an external debug aid only? Making this default y is ARM_SPE_PMU implies it'll be on in all distro kernels, and I think we need to think harder before doing that. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel