From patchwork Fri Mar 15 09:55:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13593223 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 80FC2C54E58 for ; Fri, 15 Mar 2024 09:57:17 +0000 (UTC) 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:References:In-Reply-To: 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: List-Owner; bh=H028SUC9NoaPeseoQ8MPtiV/OPS170DtYQfbgctumPY=; b=rC0feN/N2Rkig4 4GYTzE8cki96xBxvY2W3vLAhHEBbza+rK7q6DRI/Z3rRjL/aTnXSNVVqjFOFACeq4qjiskPdSeorV zzGnLbIxKh0HhqoJoSXhsep4gfQN5ZUKZGjls5OWl/laGjWt9o/BmhlexTSarERXq+l8RLdbUsmp4 d6B5HiE23OhJzglqxNpFWJs22dOopOZqM3OHxQZFGH5tUy4wJtNr75umeRRFYkoFxkGhU7VfTIrgJ nLk4K1D2NkYNVtO4YzDxInMECW8cwA8duYNF10ZmBKtnOdlOHWFfySWoVLkSp1tHmPJxKIpgH7hXk n3S0PJTjuNzVw15lKTGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4JA-0000000HMxK-3XYE; Fri, 15 Mar 2024 09:57:00 +0000 Received: from mail-vi1eur05on20600.outbound.protection.outlook.com ([2a01:111:f403:2613::600] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4Iu-0000000HMgK-3Khx for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2024 09:56:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=krJ6yUw7ewUF8vixYHbLe0o/8bA/3IvarojQ4iS7OB0ot9CHYhjWZHntEFWPaCPw+m1Ed9sFqhV/bOm/FuOxWN9/dDy2P70U2KckdWkiecN7/VqCgB/X9hRBZjwWJQhe9ujL6M0OLcZZPQcn/w3eBeQUs+KO8njVtAfu0fUCLZQKaVA2S+K6esw8AQsyaVnIr04fNM1WCeA5HHbPAfsMu920GlQiyS80W120oeamBOq6mL3ndJ4MF3rvqxslqgvrOov07Tnq3R60JtUh9NFq5LektKef9pcLNStlZKtc8icjAuHZ1AuV3e5SvITiji6U/7GYBNCYTwNpDaR6SOX4mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/vyDbuMctvpMPqycrjJSM65sHwairLUE/u4gLzHL5zA=; b=DSRR3xDhc8mXGR3GG5fb8EdbPLkgHP5aiOcIy3jI87iqh3YWhOyZnzxQ+Beg/JP5hUxIduvas1NE6mFJMhKMy65ahszzE6UN8u6tJsivZqjipiePtoo1uc5wIVle7ovIWzdqKamnblDmP5y8AyrmCnQk48sYDiV1pl8Ae7Rw7z1YEqVzC8ch8OP//jwZBBMMb9GEef3gX1wfpDowEfWxZguvPa0bhd48lUMcfy4aO5eusGaactOfs5Mmm5Km+K8B5ZwZ49pT4m9inujNp455hSEjhd+nZg86Ru7/t3lrbZvlP2qHHwWQh3PVvw22gHISlK53f+uRy5eg2+V/wbYiUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/vyDbuMctvpMPqycrjJSM65sHwairLUE/u4gLzHL5zA=; b=MVACsic42jNrMy3UsjhoCxOUhzPX0tFFzBSAJRKH2mgQyyh5hHQR8cQ2uyglOhrzf51OAu3CjFEkb6AsTKkx1kFQ2rH/GlyPTQpAwZ3rBllD3RjouTofMZU+2PBoEd8y1zsoI8LGSRId/R2kbHs0EYTDK1v5WlGUVGDlDDdWjdQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by AM8PR04MB7444.eurprd04.prod.outlook.com (2603:10a6:20b:1de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Fri, 15 Mar 2024 09:56:34 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7386.021; Fri, 15 Mar 2024 09:56:34 +0000 From: Xu Yang To: Frank.li@nxp.com, will@kernel.org, mark.rutland@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, john.g.garry@oracle.com, jolsa@kernel.org, namhyung@kernel.org, irogers@google.com Cc: mike.leach@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, adrian.hunter@intel.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH v7 8/8] perf vendor events arm64:: Add i.MX93 DDR Performance Monitor metrics Date: Fri, 15 Mar 2024 17:55:55 +0800 Message-Id: <20240315095555.2628684-8-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240315095555.2628684-1-xu.yang_2@nxp.com> References: <20240315095555.2628684-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0029.apcprd02.prod.outlook.com (2603:1096:4:195::6) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7444:EE_ X-MS-Office365-Filtering-Correlation-Id: 5e990d4e-185b-4481-0d4f-08dc44d632b2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jw08Qn/k8MTTF4JCIMIWwzkOhXQcwUacpcZ5v3tnWoTlIJU0AwjLTMFvu4dIkpwSQMLa6pxYCxTa3zvPAcqJ9CaCc7hCzWmzmWJn8FdfjZPm68GVjf06PjnRaqAgulINfeAK3XGSYIbtvghez1g9wDCx8/yZPLNkapMDaK/x460OgN5L1VDoxlphCnUPg/9FTLDgfisTUnxc3fuhHSB7T5ePmDhQ8IOQhB8IKCfZ8bUnD8L0Jg721VypZRiclTGJaUi7C9ZkpnzP9p95V+lFHyti8bx4VqqaBWlC4zfUlj7PtlBxHRZa3jXybXMpTseNbT16N8il7W8jt5F5dU7zBktVQJnw4STf6q8pQQ+GAQKiUH8o3M7ukDyjO1Bl49+Y22zgKr2ns5S+K/cIMHG8wFgZX0CT7/Rs05m1xzFQYz8UGLRNG1d7R+xtywI1X4XqfQb5Z6ZdtdQQwa+elNC4O0YjISbgfmIOAOp1rnUDO9VwfBx1U41jjcOFavMY443Rcl5/CxIMLyQh8PXC6Tq5rUgnRMgpxVsBxrEv6BlU6w7Ykb0X6geKsyK1uYAfpauKS7GdKE7+ldHasbSyfcIxQR1j6s4J11TWS/xr2aR28Em411FwOiPsEdb9tuUIWjqUheRxcZ/WP8g/I/QozogtYuhC9+PoTXbh/EGHEI3pv6ufOPd/3ooOUrRI/4zrxQeTWj4Q6txqt0lxTUZE4tjaSY/UTUe3TxzSdu9+g+SSXuw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(1800799015)(376005)(7416005)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: g43Q+tXVw4Ybt/ZXMquurnvNwnRHUhIU2c2Ee4UlZpaKXkc2bjz9LMZ+164aOOq7iewUDJDgu3VlTVU7U6GY7SLL0qUPVLY9QLycsxEaGMIO5woXqC1VWJzf6pV7poKq1F91VwztoI7fSg6nC/zwFwXk1nLlCefZF58g6XD6AmVMPAyyyeLPKJu8o4L8QzJn4JjYBnsRu+PRiE/Jo+PDc9tpWxsivq4Pn9lYgbR8TEBpEHesuvkOFLivvrcDPGT3QQjC+sxfok3IF5SbJlM6Iv0RSqtJLdJAHjnHdzvBepN1w1H38a1z+axpuSQosevIVOhM7/UpzId61Eo+ElX9d21/fQFnqjlW5qCSJMvuOfg+4JRlND1j+Z88bFkZVUfRC6ui0qLrY+WefQzEOnzsNowm/g1p50f8seDNXFcM7kmg9Jbe3R3dJULv2xLLVUa+uNRU9H03X8PQD0s07Gpz5A4ZK8ogngUX/ZvHN3Iy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sqV5d9z4JOe4sqty3825iczbIHWQ9ZXZlybUScHqRYk1rSay X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e990d4e-185b-4481-0d4f-08dc44d632b2 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 09:56:34.6433 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1TlgGlF6lFNdluvBtxYiFMLaRdiZJO4Dd4qh5JIKsCrhsEjlGWlre2aPN5GBYt0SvP+kZct948fcR2fttS1PWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7444 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240315_025644_965735_2C596521 X-CRM114-Status: GOOD ( 11.45 ) 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 Add JSON metrics for i.MX93 DDR Performance Monitor. Signed-off-by: Xu Yang --- Changes in v7: - new patch --- .../arch/arm64/freescale/imx93/sys/ddrc.json | 9 +++++++ .../arm64/freescale/imx93/sys/metrics.json | 26 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/ddrc.json create mode 100644 tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/metrics.json diff --git a/tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/ddrc.json b/tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/ddrc.json new file mode 100644 index 000000000000..eeeae4d49fce --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/ddrc.json @@ -0,0 +1,9 @@ +[ + { + "BriefDescription": "ddr cycles event", + "EventCode": "0x00", + "EventName": "imx93_ddr.cycles", + "Unit": "imx9_ddr", + "Compat": "imx93" + } +] diff --git a/tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/metrics.json new file mode 100644 index 000000000000..4d2454ca1259 --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/metrics.json @@ -0,0 +1,26 @@ +[ + { + "BriefDescription": "bandwidth usage for lpddr4x evk board", + "MetricName": "imx93_bandwidth_usage.lpddr4x", + "MetricExpr": "(((( imx9_ddr0@ddrc_pm_0@ ) * 2 * 8 ) + (( imx9_ddr0@ddrc_pm_3@ + imx9_ddr0@ddrc_pm_5@ + imx9_ddr0@ddrc_pm_7@ + imx9_ddr0@ddrc_pm_9@ - imx9_ddr0@ddrc_pm_2@ - imx9_ddr0@ddrc_pm_4@ - imx9_ddr0@ddrc_pm_6@ - imx9_ddr0@ddrc_pm_8@ ) * 32 )) / duration_time) / (3733 * 1000000 * 2)", + "ScaleUnit": "1e2%", + "Unit": "imx9_ddr", + "Compat": "imx93" + }, + { + "BriefDescription": "bytes all masters read from ddr", + "MetricName": "imx93_ddr_read.all", + "MetricExpr": "( imx9_ddr0@ddrc_pm_0@ ) * 2 * 8", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx93" + }, + { + "BriefDescription": "bytes all masters write to ddr", + "MetricName": "imx93_ddr_write.all", + "MetricExpr": "( imx9_ddr0@ddrc_pm_3@ + imx9_ddr0@ddrc_pm_5@ + imx9_ddr0@ddrc_pm_7@ + imx9_ddr0@ddrc_pm_9@ - imx9_ddr0@ddrc_pm_2@ - imx9_ddr0@ddrc_pm_4@ - imx9_ddr0@ddrc_pm_6@ - imx9_ddr0@ddrc_pm_8@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx93" + } +]