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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A64AEC433F5 for ; Thu, 11 Nov 2021 13:36:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C11D61354 for ; Thu, 11 Nov 2021 13:36:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233518AbhKKNje (ORCPT ); Thu, 11 Nov 2021 08:39:34 -0500 Received: from foss.arm.com ([217.140.110.172]:39866 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232203AbhKKNjb (ORCPT ); Thu, 11 Nov 2021 08:39:31 -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 0ABB1ED1; Thu, 11 Nov 2021 05:36:42 -0800 (PST) Received: from ip-10-252-15-108.eu-west-1.compute.internal (unknown [10.252.15.108]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EC75B3F70D; Thu, 11 Nov 2021 05:36:39 -0800 (PST) From: German Gomez To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: German Gomez , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , Mathieu Poirier , Leo Yan , linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/4] perf arm-spe: Track pid/tid for Arm SPE samples Date: Thu, 11 Nov 2021 13:36:21 +0000 Message-Id: <20211111133625.193568-1-german.gomez@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following patchset is an iteration on RFC [1] where pid/tid info is assigned to the Arm SPE synthesized samples. Two methods of tracking pids are considered: hardware-based (using Arm SPE CONTEXT packets), and context-switch events (from perf) as fallback. - Patch #1 enables pid tracking using RECORD_SWITCH* events from perf. - Patch #2 updates perf-record documentation and arm-spe recording so that they are consistent. - Patch #3 saves the value of SPE CONTEXT packet to the arm_spe_record struct. - Patch #4 enables hardware-based pid tracking using SPE CONTEXT packets. --- Changes since v2: - [PATCH 4/4] Set pid to '-1' in hardware-based pid&tid tracking. Changes since v1: - [PATCH 1/4] Fix authorship of commit. - [PATCH 2/4] (New patch) Updated perf-record docs to reflect the behavior of Arm SPE introduced by the previous patch. - [PATCH 3/4] update initialization of context_id field to (u64)-1. - [PATCH 4/4] Update handling of pid/tid tracking fallback following Leo Yan's suggestion. Don't consider per-thread mode on this patch. [1] https://lore.kernel.org/lkml/f877cfa6-9b25-6445-3806-ca44a4042eaf@arm.com/T/#m8a9890e929d2eab54cd51296837ece5d1a473349 German Gomez (3): perf arm-spe: Update --switch-events docs in perf-record perf arm-spe: Save context ID in record perf arm-spe: Support hardware-based PID tracing Namhyung Kim (1): perf arm-spe: Track task context switch for cpu-mode events tools/perf/Documentation/perf-record.txt | 2 +- tools/perf/arch/arm64/util/arm-spe.c | 8 +- .../util/arm-spe-decoder/arm-spe-decoder.c | 2 + .../util/arm-spe-decoder/arm-spe-decoder.h | 1 + tools/perf/util/arm-spe.c | 120 ++++++++++++++---- 5 files changed, 104 insertions(+), 29 deletions(-) -- 2.25.1 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CFF3C433EF for ; Thu, 11 Nov 2021 13:38:04 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 57A6D60E54 for ; Thu, 11 Nov 2021 13:38:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 57A6D60E54 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XqNee1myE3RiSnCb7CRz/0CvXNAWk072D6DzGsdhxVk=; b=lmSNUI1HmRtnKe K7ulW9D+khizhDyGlXu112zmj7pqCjJm2f+f7F1Fcw12lI8VLvUMl3rN5bqRcSzEja0ipJYzQzSdc RDtjtaRvTbcfn/y7icawaXFDZV4s4f6FP9RPPngxUNcXEHlXDaIZrvqlqr7x3GELHMFsurtdDoaP8 jIp5V8Hm9OwnWB2RxVFC+L7iTyLxghmbvQB20jFDM/hkMX3xC8IsrFV7GwffdF5g73P3NbQRsj/Xr YVOpO7IQdP4afk7XhU5oj8pY5L8/ik7JVBJrCTf6l+/PCHXTgRN0Kj6ECXMrkhraClSgUC5o8zLZw y9Khl4Z1h1SKS+58SRwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mlAFz-0081Bp-Vm; Thu, 11 Nov 2021 13:36:48 +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 1mlAFv-0081B2-CZ for linux-arm-kernel@lists.infradead.org; Thu, 11 Nov 2021 13:36:44 +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 0ABB1ED1; Thu, 11 Nov 2021 05:36:42 -0800 (PST) Received: from ip-10-252-15-108.eu-west-1.compute.internal (unknown [10.252.15.108]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EC75B3F70D; Thu, 11 Nov 2021 05:36:39 -0800 (PST) From: German Gomez To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: German Gomez , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , Mathieu Poirier , Leo Yan , linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/4] perf arm-spe: Track pid/tid for Arm SPE samples Date: Thu, 11 Nov 2021 13:36:21 +0000 Message-Id: <20211111133625.193568-1-german.gomez@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211111_053643_497476_448B0304 X-CRM114-Status: UNSURE ( 8.02 ) X-CRM114-Notice: Please train this message. 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 The following patchset is an iteration on RFC [1] where pid/tid info is assigned to the Arm SPE synthesized samples. Two methods of tracking pids are considered: hardware-based (using Arm SPE CONTEXT packets), and context-switch events (from perf) as fallback. - Patch #1 enables pid tracking using RECORD_SWITCH* events from perf. - Patch #2 updates perf-record documentation and arm-spe recording so that they are consistent. - Patch #3 saves the value of SPE CONTEXT packet to the arm_spe_record struct. - Patch #4 enables hardware-based pid tracking using SPE CONTEXT packets. --- Changes since v2: - [PATCH 4/4] Set pid to '-1' in hardware-based pid&tid tracking. Changes since v1: - [PATCH 1/4] Fix authorship of commit. - [PATCH 2/4] (New patch) Updated perf-record docs to reflect the behavior of Arm SPE introduced by the previous patch. - [PATCH 3/4] update initialization of context_id field to (u64)-1. - [PATCH 4/4] Update handling of pid/tid tracking fallback following Leo Yan's suggestion. Don't consider per-thread mode on this patch. [1] https://lore.kernel.org/lkml/f877cfa6-9b25-6445-3806-ca44a4042eaf@arm.com/T/#m8a9890e929d2eab54cd51296837ece5d1a473349 German Gomez (3): perf arm-spe: Update --switch-events docs in perf-record perf arm-spe: Save context ID in record perf arm-spe: Support hardware-based PID tracing Namhyung Kim (1): perf arm-spe: Track task context switch for cpu-mode events tools/perf/Documentation/perf-record.txt | 2 +- tools/perf/arch/arm64/util/arm-spe.c | 8 +- .../util/arm-spe-decoder/arm-spe-decoder.c | 2 + .../util/arm-spe-decoder/arm-spe-decoder.h | 1 + tools/perf/util/arm-spe.c | 120 ++++++++++++++---- 5 files changed, 104 insertions(+), 29 deletions(-) -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel