From patchwork Mon Apr 15 06:13:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13629446 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 F2A83C00A94 for ; Mon, 15 Apr 2024 06:14:12 +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=EinFCo7z2CVSNAG8GemMgHo/gLkTlpepMBSR7VfdG1c=; b=dmrPu4eO8T/HwF iyOKfEVWMvcD6ca87lbmlsNV3rh+mePelIR2PdklV0MWiOtEYRwEl75T9z82tnIAkudHfasiK8G1T 3fXnQeJMUmACeEo6AjWX53iFey5u7ZzphK8BHrJ9nWHODSbiyCwxTxFwKpAxTpAXR3ceGUNN7lVVv n5ZPTMQ2BdktLTZbjBmkttV9aCX3W31R7l5ZsZ2nyhKrwLX9ZVoa9J05dcCo8+JOaQ4EMoVP9cKV2 1kYgi3kuLWMsD8XhqDtnqLU5RoED4AN4EGKEyYzuafxKAty90uNnPIE1lFgaGNuVUFrCSFCvYhI07 YiqleGzBZ1+0Lam6TBXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwFbK-000000077ck-2b4a; Mon, 15 Apr 2024 06:13:58 +0000 Received: from mail-he1eur04on20601.outbound.protection.outlook.com ([2a01:111:f403:260f::601] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwFb4-000000077MH-0DpN for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2024 06:13:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MkOpoeskJ6X7VrhetWH9+OSJSdKoBtSnYax0zp4pbMtN25Xf6NjxsvtVxaltv5uCybPSdxlaLDHJ5dqY8nnaoKUPiyMDYlFeBhYFVKO/RThkuJwyvlkWAimdH5CU0cPo7iYxDouXJVKzeBLGN8cQ4fBogqSE164YIu86IsSm0huqU4CAaWT+BwCf+zJvDC6xVqR2J7OsqSFq7wzUepzOq5r8RpBp6pb9bVo5opy+moL90xkrZaMes5zxzrN8dGesjgr5FcGSqMKtVpFXs5NW2pW9dLSN3kiZUslCTIhDMKXEIQ5Np7fOUs61pAaTWl47Q1s3sTxSsb3qhtLky9iGAQ== 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=hBUyQjIrMYdgiJ+kX+6NtTB/cwMwzx64deIcsYIdVYU=; b=K0f4aDHl06rXjkv2goIFaI0lzvt8nFZipm2UBqkIwz/kuP3km2cWB1Ylk2AMIB0fnW5YF9LMHNkzD8dAkwjqXh8BjsJ8QnAx8H3K6WmJth50F0fK4Ci8C11YKyMNbx8YVF36/gRkNCPh+tgY/t2ZnuKchGZEd5D6jXGSGpZwzytwoaK1DWR8Qn9moIG8zVgaBL+tIlZGVNz3BN4mM43Z2lDjPQKTun1Lr6Cww9T0vArXyftc+CtYVoemIW1wdODQeEcw1V9y/f4p+VgUL+5W5rtoG8XT136+h8GPpruxcJtwItJPCYzAxclb0vCpoqQeATheA5b4YHaUNf32URw95A== 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=hBUyQjIrMYdgiJ+kX+6NtTB/cwMwzx64deIcsYIdVYU=; b=Yl4de1KfNlsy5V0C03W0hng172n6tfc5bMTNSvAN44kqJanMYuGLG54JukAo1t86E2rCcGfYcIDKQw0aK2ov5B5m318HiveDJ+wAFQvXRG4jUiaiHv3pPu2CFU+JAjPV7thEXsVfqlM9xWN7tnw+Jxlp0B5ZMNfE0GMUffGndPI= 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 PA1PR04MB10117.eurprd04.prod.outlook.com (2603:10a6:102:454::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.43; Mon, 15 Apr 2024 06:13:36 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::8d2f:ac7e:966a:2f5f]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::8d2f:ac7e:966a:2f5f%6]) with mapi id 15.20.7452.046; Mon, 15 Apr 2024 06:13:36 +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 v10 8/8] perf vendor events arm64:: Add i.MX93 DDR Performance Monitor metrics Date: Mon, 15 Apr 2024 14:13:20 +0800 Message-Id: <20240415061320.3948707-8-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240415061320.3948707-1-xu.yang_2@nxp.com> References: <20240415061320.3948707-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SG2PR02CA0034.apcprd02.prod.outlook.com (2603:1096:3:18::22) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|PA1PR04MB10117:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d74ba00-050c-4798-0b0e-08dc5d132f34 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 18BNEh352gPMNWF3Arp3GuczjkiTikGYdy9Vt0V2xr9Nj1ZgvdqlJZysRTICVWU76IN8FdTOdkGnphImbJM46RWP+D2tA3nqKTS1AErTjH3uqoIz+JSChZ1baNjQM12/N6uL81SaooMc3JuOgLFKvL2MaXE7Od0nw4QTA2szjXLdcep8G3CLwpbowl4I5uyhvjcIUj4a97v0z4W2w701CZF9X5TpWtVA9W1zSByLu7ZfJOK7KltsM9b/CMhMPFrX47Fz0TGPC64DtrhdFSwBaSZOfv1G0VhNID/S7qU0j3CnPINWf+mP0b0rOJI5+ORz3Ssy5pqKS/OPAWXfzLhUUN0GjptciGZSTE+pLpfO5W6/DbjIMzEAMPTxWocYETlo+X9PBl4CIgw1CyJ7QEOGMVZAjqsmcaz+5BoM4Bl2uLSyOKw6DimnGQyKALAjDgeVEiCZik0mKTLwKh4zLSwW8e+E4v3kAmJt2ntOWKySkmMXbN6vloKaRWbEX/24yWHCn24V9wZwLaUme2xFGKo0+p7I7Ze8qTL8Deafm5UN/prlxnMKasU8DQzjT7wb6UxZwLajhXleE6HW8KltzZSZ8ISbuxPtSYP0ZFQNA1euOIqu8MQ0H/Vz+lBELMBlLJTQhLTS2WXJBlud3+2yjsqN8QZ18DDK5Gsjqntcm29V18FVJOriMb1pOG83FZizCuRzLjCWnbP+agtovZr38lrLtYWTFX0jA7xifqb3j0DkV2A= 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)(52116005)(376005)(7416005)(1800799015)(366007)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fDu312fYh7hltzGlFwtoxjDWEPhEP6ssc/SHdhGW9wHNI6Aw/Id4vGyHu8RgA4+P3x6TEaIUvAnQ0byFRwIqTXetyqM+12bcohNeNljKn5dNfLAvHCX5RUU+uq777W2Kr8YkAV06Mdh0jO2W2+ZtBxZwhHl30xMlBrVzZ45MeTRbMpVg8lZS09x+xrLogo7RRYE52mZ58OUDzh1ra/Nc2MJ4notb3O8FBmI0fIWY3Djv6s9dkoXv5zVs0zAfrURnwjWRtW7BQ6iewY0Ylnrl+fyhM7C+l14bk4CtAizqFJ/gV6jFLERPIoeUr3O7Wj/8EN2x35q0R7k+RGcgXr5XnefARyFqlc0+s05B7IpTeYI0uKUHTwOypL8hWv6qYIAkwNQxejZP6VSTtAyzpsWTT7G5vaw62oUEjTeZGfI1l7it3Cc1zUmzmZ2q3Xiqxba67KBqg6ggQoWmz2o4crIcWfm0nZ0Zou4uv8sD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cQ/iUQimNMPjnBSnAyCvjjGe675KkHgBt1Va X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d74ba00-050c-4798-0b0e-08dc5d132f34 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2024 06:13:35.9439 (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: JQM8OxwUAK8I9IPgJ60dkbhHyDzWFM1VrGgSI5vvTR3ltTnaS5Rl63o5zCcEMh/3bSprewcxrBczIXicL1sZLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10117 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_231342_217142_5D4132B5 X-CRM114-Status: GOOD ( 12.25 ) 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. Reviewed-by: Frank Li Signed-off-by: Xu Yang --- Changes in v7: - new patch Changes in v8: - no changes Changes in v9: - add Rb tag Changes in v10: - no changes --- .../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" + } +]