Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3698020pxu; Mon, 30 Nov 2020 08:30:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJwS6c2kS3Xnh3H7eRDL8dWiSku8QSqWKMxq4Hs1sc2RG1zHjUh8bU6CzlYIKCJvVlfwmFk4 X-Received: by 2002:aa7:dbca:: with SMTP id v10mr22420656edt.219.1606753800729; Mon, 30 Nov 2020 08:30:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606753800; cv=none; d=google.com; s=arc-20160816; b=Q4X7cH2Y6IlgpjS2fcvNUGuE4Y+851vopc1caLoehskD6MyGcwxvrB9RZCIQ8vWMui LL+MlixbvvBVakVZ0uPmL6WRgwrbZj7re7KTufJhbzWfNZDeXVyPMxpSj4H2rDT3LKM4 m7mW/P4PP4CR8NyGj4iyiEaNA4jQTAPai0YlmjlAsJnB1mk7SxG5EIxXMAZkL/0ZQwxx 6RIJ91xnp8XhCDZCayYha6SZLS+r8IAIQ55YaowTwPvs/pX26dTtiUElAFom+/1JFXPu 9ZqHd8JLsuYmNZHFRH0CmKNzKD1DGKLUyKsug8P6mzIEq/v6+CNmy8rEAgeuinvu9gEK UbKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=yCUVscpjLjyk4oDMmCA6UzPA0E53m+1HtkoSC6y5tvU=; b=oEcW3rLzHjKdN2/zKhnniOGT3hFXTl0PtQce9fiC6hx/ANraLK9V7kv0+cu8kXKvyr 0L9XSIxhtuRdZ6iFVOc3MfcKRpxPGX24DxjiMbB1a6oFYCYgxRBJEF0Ud2bJL51FdTBA guOWAdrjLIQO2IkXfOGvIdLC/MZ4HD6f/mpITA5jRXb/JHdO3oOh8B7s2pLwRTvys+8c vtegqpN8LhFz2MCsyktQAeX8DwwjDdPfHHRaZZ7f4atfK9A/5pBPwrl5ZyRGSxLZbh+g hzxNxicn0Kzcnu5LaDShzdRIsn3Q26ugnUpMOEdw2UC0DXldBQo8GHG5PTsuG7aTFcMS fUBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r8si11532967edi.606.2020.11.30.08.29.38; Mon, 30 Nov 2020 08:30:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728611AbgK3QZ4 (ORCPT + 99 others); Mon, 30 Nov 2020 11:25:56 -0500 Received: from foss.arm.com ([217.140.110.172]:57494 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725859AbgK3QZ4 (ORCPT ); Mon, 30 Nov 2020 11:25:56 -0500 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 9E02C1042; Mon, 30 Nov 2020 08:25:10 -0800 (PST) Received: from e121896.arm.com (unknown [10.57.27.168]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 01FC33F718; Mon, 30 Nov 2020 08:25:08 -0800 (PST) From: James Clark To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Cc: James Clark , Will Deacon , Mark Rutland , Al Grant , Leo Yan , John Garry , Suzuki K Poulose Subject: [PATCH] drivers/perf: Enable PID_IN_CONTEXTIDR with SPE Date: Mon, 30 Nov 2020 18:24:54 +0200 Message-Id: <20201130162454.28255-1-james.clark@arm.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 help Enable perf support for the ARMv8.2 Statistical Profiling Extension, which provides periodic sampling of operations in -- 2.28.0