From patchwork Sat Sep 14 21:54:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 13804557 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 1C8C3C0219E for ; Sat, 14 Sep 2024 21:56:42 +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: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=PdlmKuuSkrdphbMJ3SHKhNFg6i5lpKOcVAj0fnIFjVA=; b=IQMiRoDZwzTcDyiOmzdHQtYB7p e1/+QMJxOf82zZQ+QexxCGrMkQ3xwU0yPMs+QAZ8Wcj+A7Zbz9fa4mi/315S5qf6lFOXNXjnTKFMS Ool/KjpDyRBRT/mjYZCBF1no/TyzZm2SRsyxMuqWgxITKn84s8FH0k1PS2y3g/DO+IzzIbh24K7yg hmivfJhulKC5142XMb4x3OwhVMOouMHYzqiYmkdmarFanaM65A1h1uAy/TUYZW2tNedr8M+X56hbJ 1kENHoqpeBx8VtAOG35JHcof6DqI1llco56g9msJPQSSz32FeV0xqwaIifnv2YGNhdyRQJ9G5zjbH RdSh4IhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1spakm-00000001Hld-1U93; Sat, 14 Sep 2024 21:56:28 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1spaje-00000001HYG-3kAf for linux-arm-kernel@lists.infradead.org; Sat, 14 Sep 2024 21:55:21 +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 806CE11FB; Sat, 14 Sep 2024 14:55:44 -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 0F63E3F66E; Sat, 14 Sep 2024 14:55:12 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , James Clark , Mike Leach , Will Deacon , Namhyung Kim , Mark Rutland , Jiri Olsa , Ian Rogers , Adrian Hunter , "Liang, Kan" , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 0/5] perf arm-spe: Introduce metadata version 2 Date: Sat, 14 Sep 2024 22:54:53 +0100 Message-Id: <20240914215458.751802-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-20240914_145518_999371_F6A169F4 X-CRM114-Status: UNSURE ( 8.49 ) 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: , 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 and maintains backward compatibility for metadata v1. The version 2 metadata contains a global structure with fields for metadata header version number, header size, CPU numbers. 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 patch set has been tested the perf to decode the Arm SPE metadata v1 and v2. Changes from v1: - Dropped LDS bit exposing from Arm SPE driver (Will Deacon). - To simplify the change, this series did not include multiple AUX event support. Leo Yan (5): perf arm-spe: Define metadata header 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 tools/perf/arch/arm64/util/arm-spe.c | 106 ++++++++++++++++++- tools/perf/util/arm-spe.c | 151 +++++++++++++++++++++++++-- tools/perf/util/arm-spe.h | 38 ++++++- 3 files changed, 281 insertions(+), 14 deletions(-)