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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 442A5C64E7B for ; Mon, 30 Nov 2020 16:48:05 +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 C963B2067C for ; Mon, 30 Nov 2020 16:48:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RMc0IZ9h"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ikl7B+Dn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C963B2067C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=iJDV5zOpceK8rIP+BYY6b8DzDWOpi81Dx/hOL1cqCEY=; b=RMc0IZ9hUHJmPA/CxfNI1c1MH 1wXkrZ/FofvKw/2XXMtFK2boDQKhYFKp22TvpzT2tFZ590O2afkljVgoLcgLx90RkAGSd+5WkgBg+ f/9ZFfBk0CvccE9hA3oCZKy7MsRMjmsfkuF1f2dj4ZuetmR6beOVB+x/AuQKwRcGCHPGn7z+6Uea5 ssXW3lfIFTKmZQ1UdbhStWH6rQn2ypRczkLKqIOLIaRWpfNzYTN4AnaT5bt8m2bB9lz1xazB33lJD VJIb+Is14baMGdXE6U+sTEZguOHrFmBsPWDRmcBhSm+Z46ug627dPgFT8Zz+jeg3rfyiW4ZnhwpuO sOja5bcjw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjmKK-0005Nt-BL; Mon, 30 Nov 2020 16:47:00 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjmKH-0005N6-VR for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2020 16:46:59 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4696B2067C; Mon, 30 Nov 2020 16:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606754817; bh=PBQifm6DraFNejjKgt0IKbv0mnlfO+5mof3SFPnhpQU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ikl7B+DnVwstqClfpP0q/Fquj3ruBoS1ZKuF7gfnl/X1ekHtUWtafmtU9kSJjR3by 2Qc0owC0FKifGosDMbYAooeLvRoNLfOB44jmw4uWZws5jsfr99kCN+nBi18jrnWugW zo6aDJjYasN1Iim/fQAtoYN8SOxK+WOWyY15KfHc= Date: Mon, 30 Nov 2020 16:46:51 +0000 From: Will Deacon To: James Clark Subject: Re: [PATCH] drivers/perf: Enable PID_IN_CONTEXTIDR with SPE Message-ID: <20201130164650.GA25187@willie-the-truck> References: <20201130162454.28255-1-james.clark@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201130162454.28255-1-james.clark@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201130_114658_101170_6B6AF55D X-CRM114-Status: GOOD ( 21.35 ) 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: Mark Rutland , Al Grant , Suzuki K Poulose , John Garry , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Leo Yan , 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, Nov 30, 2020 at 06:24:54PM +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. Can perf not figure out the pid some other way? (e.g. by tracing context switches and correlating that with the SPE data?). Also, how does this work with pid namespaces? > 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 > Signed-off-by: James Clark > --- > drivers/perf/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig > index 130327ff0b0e..47ede46c3d57 100644 > --- a/drivers/perf/Kconfig > +++ b/drivers/perf/Kconfig > @@ -125,6 +125,7 @@ config XGENE_PMU > config ARM_SPE_PMU > tristate "Enable support for the ARMv8.2 Statistical Profiling Extension" > depends on ARM64 > + select PID_IN_CONTEXTIDR Probably better to make PID_IN_CONTEXTIDR 'default y' if SPE is enabled, rather than selecting it directly. That way, at least people can turn it off if they don't want it. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel