From patchwork Mon Apr 15 02:03:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13629378 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2061.outbound.protection.outlook.com [40.107.105.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F09C1CAAF for ; Mon, 15 Apr 2024 02:04:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713146654; cv=fail; b=qYVmlUUe4Sk7+SZJBWGXVtTD9HkhFdTdy377hJYNUMXupw0YjwXIHe18J+vibK2yaSyOrzuKdAeaICSMblr1yIwFQRcyekN0Y7GuTGAcFRa0ZBYifXtHkwOPxigY5FJRZFaqY7+p+MEqCPJKW6rVi5oPztZhWxi9RF1ll+WCdoQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713146654; c=relaxed/simple; bh=VyqFcU4JgZTBsQwXe7iH3jl76lUHr91izZ5i3vkj9cQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=qkhpkSek/oH9MMmkLwVx2nDH9riakIn9jK0XqfAzmvT3OlenHXIcVQkJ/kquIw55KXnUsEB3i/x7UVw2e1ewDvz+WuyT8nwtRTZoLM7RN//b1kszLe6Tk6/3fnuR/K/wFvxe9000sKLfpZLLb8HE8oVG6eH8SZx6NJEvTrp3CqE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=WeZ1cui6; arc=fail smtp.client-ip=40.107.105.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="WeZ1cui6" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OF/gpYtAGgRSaJqJpjr6kUfq+kEwXM2DlIqQKNCOTa+WQ05HXciyJiWASej6epabX0dUj8GGPTz0eQBmNQ7EeYhCm83uuHsPnm6bLW6/oEDH0SjZLKIKD3YjlaeoSnF4nsV2rkKVFV9Kxz6IiVlPGtZL3j/dQ/tod7QaHVb8VdTjLmBcazj/dlwQo7KkBY4PWDIPpWrBmB4Kk52p4iJcwcfP/kU4vo7zLkt7wrvhPWErZ0uillpbXINZLoiE7fr6Yhz97aESi2sDG+89xFoSvtzHrIYqoMKGYykxjibIz0xOqQkRl2GIMHcjRy5fWfHPac15bDL0n6M12k2ktYK7MQ== 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=OPLf6Nu1UbO2Q+wMwpP+lXWdOxCaeV29SJLd/wLNP7Q=; b=keDaG3+luCG014v5fLkMf2WWjae0nyOgsaPgQFtS33rH+jCRMHbT8EBM9Uz1qRuRufMLUSMjLAQqiOLEbYFgEaCLgBUDuX/8sS6T8i4RVUVirgpntnSSqjbaww808mWdFhQkpIHTcWeEtXfNhLAmjcZowky3raSqI9ZPzNrgtFmbh0lYMLYJCAijDIAvz6H+fyHZrx2T7McSAsAzGjw4ExyTMCb8+XCp0wfZc6ukqJCa5JUkSDcL8J6vuB2B5nIPsWuTqJ179aBxENTpAUXVOJCe2fC5jh8uOk5/YO8zbxvsCMuhvA6navg6XnaiGu37b8QNd1qCC/z+rlOAFXBZtw== 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=OPLf6Nu1UbO2Q+wMwpP+lXWdOxCaeV29SJLd/wLNP7Q=; b=WeZ1cui6L/UbDBC71Ci8L4M+RF6ktYA+ja/ayNwkGIwaPkgZqtwifdKtiMeoV5nT25SdZJHVAW2A9fCbE0qNofB/Vp96HaWY9HwexIsIR93ISaimBk3CrV4MfTt96mknbMf6gLoVq0qI3m57wgATdSFyS1bLQm0Ibozg7FxFIZg= 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 DB9PR04MB9233.eurprd04.prod.outlook.com (2603:10a6:10:361::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Mon, 15 Apr 2024 02:04:10 +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 02:04:10 +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 v9 8/8] perf vendor events arm64:: Add i.MX93 DDR Performance Monitor metrics Date: Mon, 15 Apr 2024 10:03:53 +0800 Message-Id: <20240415020353.3833367-8-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240415020353.3833367-1-xu.yang_2@nxp.com> References: <20240415020353.3833367-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0026.apcprd02.prod.outlook.com (2603:1096:4:195::19) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|DB9PR04MB9233:EE_ X-MS-Office365-Filtering-Correlation-Id: 8f1db827-639b-4b49-2f24-08dc5cf056f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fnHxWxe3weRxr5y0euR9gyUn5yY1f0sCAVZFNWrQ8TiNZPRFpr5LgCFTHvri/07xIo8lL3uw6ZlW0rvDg4vUKKc1crD7DxbO9qXUygtKj9SCRlG/+Zq1k5FL3k2z9cQtJ03nbofUZW3iM37DbWWxBnyrOFKvdbVB87YF262t7kbdehqCbdBqBuNjnjvn6RjaGhoYATW8GBtff9Gy9B2HhWwxOtvQh4vJ4J6khZGCx+eKYDIhBoU3MTei3nkiGITmuVxVS3FjJq4KbQ/tIzlKmGDshJd+qrZ/AoVd1VnyBY5G2uKbF6FIJjAA4dqhr8cBjqlUkG6ODNDa3xeEGQXQYA6PIY6X/ehIVmB4x2U6AV9Dt9DLAJMF8ebWbW1g/xzgTKVAGAhu6NGBRpf+UvpygDQSRgfbjxW8uDnABNO7v6hx0gBBMpnITWT+5XsdGw/pQA7XiSlkbV274xulqy+qEjttiohvf5UFuhO8FRVCJnxu5/GL6azR/e+n4V8ewtItwl0MlVX/1ZuBxjn2+E3KFdRnBqpsZRTyXfJQ+CinrYi/h0GZibQ+bOwS+OOfISImjCF1PYOgeYsLZ3v629kKfBTqjbncl0Dj1h+U2PEzB8p8/4YtpnEunyTLfAzA9ZcY+0I2nOeUbO8OdmMGEapYhS6JJ+BB2AGrdunkWxuIGmv9Ci0s4zMbcGMZk6GPEr6Bj+wu53qYi1NVs0mV9w3Zfs4s0FB8s3DLhpAQsZlck+A= 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)(1800799015)(7416005)(366007)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fqPLuMoNv8DAVZ6IorMvddu0F7X3ZFy9Rs26mDXn8oS4AL02AgTF53PzLHbfkGdn848Wv91BJ3lpzK4QLrmQvSLrUaPpQ5JPz02chd8U0QcNyLjR6Xwc0g64738UkSKPLhQwApkAHW3zJedVzncT2PdmlGnqK8Evq6p2dl6iGc6uuq36YwfnF4ZDsK3woM8+y3iVgzbWKIwQ/MxJDjII5ItIeTyn9+6yPwtPz3tBFz05/H30DQ9SGaPkVmCF1oSXkudBv+yCo7W0ktNC1wZLKSsoUSxvqZr5/98g4x1dXCazSuRtSbGe9BvPlrsWahOHCMSDpJxlq2YxuXjitKoKfI7JFuiKPkrv+6pNWm4jkN52Cl9V9lbiMMazDsi2ozo/+/n6k6lB5uBny/C5dxxE9sM1vmAWG9xogRjcaeArCj4XziAu7G69bX/HsoSrD8JnV4pqMbLs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/JWuQl8G+m9g2Jg08HNaORh2RQCzpSKEa4d3VXDzsCnd3IQb5cqF5TYNGP06fX6Itt7X X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f1db827-639b-4b49-2f24-08dc5cf056f4 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2024 02:04:10.2157 (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: 7s8HlFyhaltxCCoOPKyUYZVCbb9xnKKISgio2kTtv9JekX2H2vy/w6Udms0S32YKAoi9+KyXGGugxYQGxAH6CA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9233 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 --- .../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" + } +]