From patchwork Tue Aug 27 16:44:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 13779809 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 11112C5472F for ; Tue, 27 Aug 2024 16:45:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type: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=ruvs6lv3gOiCF0RgrvEs3ffF3vc76vTbfQ3hh7j9P00=; b=JmTJevo5/ScVSxKTpkAb8m2Mm0 pn4XnUApLz5vSYrVDyWoPZDkeCugWh7+7YD97a3l67F6Vn45zg55curj0FTIZlaMOtYOfYaju0mut 2d/AUrA8mdbFYyb9FK5YOjVezoTl2qrTwrUizMxWgz6Elc63AEorskwVjn0YxHlO5hQkIpI8exCMM qy/mqZFUF9PIndmDPPXiv4YEdV3sw1LPGz0XN2yR2kV7dihSNO1Q9Yd+i16LrjGojHiAyTAetAHDi OqNWS0zwG5zVFh2jTd5M2pXFoCKO7RJ2ecCVYrZ6UmNP6bBC2gwTEUAOJMC3uxMbZTLtZHAj+oZe5 YTHDyv7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sizJx-0000000C7mr-4BTd; Tue, 27 Aug 2024 16:45:30 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sizJ6-0000000C7Up-2Dxg for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 16:44:38 +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 85390DA7; Tue, 27 Aug 2024 09:44:59 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 355F33F762; Tue, 27 Aug 2024 09:44:31 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Will Deacon , Mark Rutland , Suzuki K Poulose , Mike Leach , James Clark , John Garry , Namhyung Kim , Ian Rogers , Adrian Hunter , "Liang, Kan" , Jonathan Cameron , Yicong Yang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-perf-users@vger.kernel.org Cc: Leo Yan Subject: [PATCH v1 0/9] perf arm-spe: Introduce metadata version 2 Date: Tue, 27 Aug 2024 17:44:08 +0100 Message-Id: <20240827164417.3309560-1-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_094436_630154_B33384B1 X-CRM114-Status: GOOD ( 10.93 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series enhances Arm SPE metadata in the Perf file to a version 2 format. The version 2 metadata contains a global structure with fields for CPU numbers and the metadata version number. It also expands to store per-CPU metadata, which includes the CPU logical number in the kernel, MIDR, and capacity values associated with Arm SPE. This set exposes a new sysfs node, ‘lds’ (Load Data Source), which indicates if the Arm SPE supports data source packets. This flag will be used to decide if the data source packet needs to be decoded during the report phase, which will be sent out in a separate series for data source decoding refactoring. This patch series need to be applied on the top of the changes: https://lore.kernel.org/linux-perf-users/20240823113306.2310957-1-leo.yan@arm.com/T/#t Leo Yan (9): perf: arm_spe: Introduce 'lds' capacity perf auxtrace arm: Refactor error handling perf auxtrace arm: Introduce find_auxtrace_pmus_by_name() perf: arm-spe: Record multiple PMUs perf arm-spe: Extend meta data header for version 2 perf arm-spe: Calculate meta data size perf arm-spe: Save per CPU information in metadata perf arm-spe: Support metadata version 2 perf arm-spe: Dump metadata with version 2 drivers/perf/arm_spe_pmu.c | 3 + tools/perf/arch/arm/util/auxtrace.c | 191 +++++++++------------------ tools/perf/arch/arm64/util/arm-spe.c | 126 +++++++++++++++++- tools/perf/util/arm-spe.c | 119 ++++++++++++++++- tools/perf/util/arm-spe.h | 37 +++++- 5 files changed, 328 insertions(+), 148 deletions(-)