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: 13629386 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 A97E0C4345F for ; Mon, 15 Apr 2024 02:04:39 +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=TZPBNHHpeqBpmTYWBChMRIJ3RQqpYtzRcgbCAbGaJkQ=; b=RBS1MsUJjLEGV0 YhtcTP9pCeXUt29uMR3oc90Z4HqS3F7M8Sqx4UK53GwI4pxAzNAOhgqW4GyKrTmVZjm0WOIPko5bB yzYZBnejUMnEasUcCRgdWFcqA43MD/KXTpt+p2aVfsgioVnceGpiS0x/b6Nu1MCZpGSQjrzXdzLfi C80nepn3ctt83G2BQBlRpRs5iLhx6fkA1tTA/AG3uXMSX/u7RtwRb3hSCyPYDUkx1tgyp9bUvgL1g EmXiVSR+kedawDtIk66kRLmMp64Clh6AFSVlSUanvIBx3jy5yL5RL4iKaTJcgxqBg0ffbC67amp+R 0fOjGnJES4EdNsYaUjHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwBhq-00000006juU-36Ql; Mon, 15 Apr 2024 02:04:26 +0000 Received: from mail-am7eur03on20601.outbound.protection.outlook.com ([2a01:111:f403:260e::601] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwBhj-00000006jjJ-0cE1 for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2024 02:04:20 +0000 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) 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/HsoSrD8JnV4pqM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F/H/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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_190419_227892_0A303AF6 X-CRM114-Status: GOOD ( 12.05 ) 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 --- .../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" + } +]