From patchwork Tue May 28 16:05:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13676291 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 8E5D9C25B7E for ; Tue, 28 May 2024 08:12:59 +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=506P0+xjS8Kzr6V2UMr3/pl9mSK6b5ETRjTj+0CC3dc=; b=WA+c58XYFXX8jY wR9tMkyoOok4wa67bqR+HRxYi4an8aeRerQ4h4Tt1x39BZ0tp5xFt9gEQ+wajtAsk3toZGmrj1pND gHwT9a+DfGiusmOdFiTnwRDET9BdrZLNcHRrDDNzA2bgpL/7YQEkNJkNJcAj8rOysbv115C6YpYVI 8xqki9J2pHyB/smzP3iMXzCm8M4EkU855iODRaypzZLemIxuxfkgaRZGpz3SZBcSN45lm2E4/3vDV f8ZRcfe3vYCLUr1IlXvzKGrLPxX4+C0taQN65UWJk/QuDkaQMixFLl3JROXHoGBjAcV8DtEa4Q00M 30JWV6OMkRTqf7mgOieg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBrwq-0000000HQzE-3583; Tue, 28 May 2024 08:12:44 +0000 Received: from mail-db5eur01on0631.outbound.protection.outlook.com ([2a01:111:f400:fe02::631] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBrwo-0000000HQxU-0S6r for linux-arm-kernel@lists.infradead.org; Tue, 28 May 2024 08:12:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L5qYogfos1t/JUUk/oS6A8xP0kCHVznoYEq3kUaqR+J2875mHAEmJ5sMeb1p91uhUjp5LXZ1NiCfC12nzCaSnSpYAlOsaOFzGvrvNIJb6cIFTUDaHFqLrfGlIw8ZW5AlEhdAvy9eYfLw/i1ceI+4aFzRgpYWji0FH3Kwl1MHWvLN+mm3hMGkEUmSVE5Gkm7JAzbVfmvKo6Bzq8sNrvgW7KyXxqHPJJWkPqFNWREpPc33TB1+k93+mPIOjfts5aZijN0kb4czP25YWyMe5Q3zrjzsQXxu1/wnyQ4WvpyYjvbB7trZDSIZ3KCR3kJiyCz9zMQN9FV2gS3Y02GMMPJFxA== 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=bkA+GEwrovSx4DkXR3EJPsYD27EySSEO6QB6cGDpTMo=; b=J8uAe+o7y4+VnyAkncYW5Vd2cWyHmnYJFBULnaW8J2uOtB5E/D+4L6+fT5TzkE3ajT9DnFNvVWU8IlmzsuVMj1qVqMsH1nRLkeVDdKgTwIqi6IWk2TMOm9xywwseLqEbJi5dpiykd9XVPx9r3brBLOvBVt9lJG2YMhqhCIKAXnJOdwBax/ml5mN+eqUD8f2k6v99Hd7elaj3+PgTDuAQwSepD6vOjTmuAuLZ7gIbeJ3zBVwkArB/oeeRJ2fTWm/OybeRv18hu06oX9rnMBtQ00H/dGXw/823yw8WsaPGwPolsd8c/kJ6R7nqW2fVTIwi+XZUKgOd+WJnhvII7mVOsg== 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=bkA+GEwrovSx4DkXR3EJPsYD27EySSEO6QB6cGDpTMo=; b=GezAgLnzPiKidj29WPzgwCcKsi68jtd1SZPxJSgAjgBTE4VSAFQZxe59w0DsPVN7FXB7s+Mp32cwayoymIZsDg0MRAd7fLXG5ukfLJsEYetVUKl7A0IkViOamwBq3TXrMc3O4yeY9ISz6NnbWcGCJ9PDIfuBRTdYUrfjw1Fc2cg= 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 VI1PR04MB7181.eurprd04.prod.outlook.com (2603:10a6:800:12a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30; Tue, 28 May 2024 07:58:12 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7%4]) with mapi id 15.20.7611.025; Tue, 28 May 2024 07:58:12 +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 v11 7/8] perf vendor events arm64:: Add i.MX93 DDR Performance Monitor metrics Date: Wed, 29 May 2024 00:05:22 +0800 Message-Id: <20240528160523.1695953-7-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240528160523.1695953-1-xu.yang_2@nxp.com> References: <20240528160523.1695953-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI1PR02CA0027.apcprd02.prod.outlook.com (2603:1096:4:1f4::18) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|VI1PR04MB7181:EE_ X-MS-Office365-Filtering-Correlation-Id: bc6e99dd-32ef-48c4-ff27-08dc7eebebda X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|52116005|1800799015|366007|376005|38350700005|921011; X-Microsoft-Antispam-Message-Info: KVuKaec0Ud9yMqkUZugoOD8juGE/UCc75deeUIV7JIjdN77ZgAhfVAwDvCwIGkT1J274WdeHy0fB5j/R64xNs+g8uNWcTCMTyIFS/+HEmO5WYiY9I5+pNWk3GEqSXWWPkUz8ugXQaUieRYuNo6X2sdCYxkx8jbUyWGbuFoeyAwiMfyhoABg/WJ7Yiql3QF0oja/PX9PN+zDh8aOtyTY+m+taH51Z5lCQxkTqqtLcMUvLFYN6sPSQTXDcKpnVZIL0yObW5LQsDtsbb7YLuCskq0mnoDbAhNuzNHwFZzJ4GenlmNOBJ3PSM5NGFnfRU4hemRhYqFBWC9ZkMAO1ve+OJ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:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(52116005)(1800799015)(366007)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: k2M204I4N6E8EsfExfEdSXmLx2OwDppPFjT/x6pfsEnzGuwHCq3o4pdwMgkYvotTtjXhTcotGMzWpdwmE0KpXCpvJyekG8umxZTaiqSN0dXi84pnkACpXzrVnkxwPTRe3Ldn/bNbt602u5Qktw1BzArhPqWhinW+KaVEC43WrBWDb+ayFyIh+9Ss+5OQW4mgeeC6wEhgfm7KrUmQ2IjSZUboxBLFEol5UYpmxICNH6fS6oGMdwSmGw325CshtqxGxqr+8PBFGDYSrxssVy9eQ9k1NcXZ++OnpHtBoIz9OiLqE1Al3zlul6Cf6o7FtpKeuikB4N0afmzTae9ugq4UTqwUf6e/zj2w/etnIi3I2Li2o8UYBHyCD0AyzsfLW7wWvnu5SD4FqIlcnt9aJfJmZuhWesB5+5F/Dfk6mgvLvnrMUMyfeJHSZk5JoqvtjQKfECKMV3tmvLDePTV8P1AnuuYJwfCZVVZBFRCE42aiVtYKt54HTPF4kKM4GHD8KgLMBFqnwhq0YvmirdSEaqxT4IQ6BqLhYYQQxoay5xVtyCfVDCtL8JoIk4wm+5w03Iq4sFoZUCrc+Q1ISJEzO+HXZtgmq8qYu7f7+BtmVP5r4q0EETBe+/vJ9kKc7TnSzCYEWMfZK8G9gyYs4Z6wUMWMf8bJpqjWKe4RTmEa7R7wS7dUUCFD/eNhgDc56EcV8JWmYBg22TXjb8TDv5ry+TmdYJmuIQQdDWjE0RnFJTX/NqPpfqoheS/ouWk4b2muZ3H0+5XpHknikohoyJ835yFw6eghXHwwy71mOd9W88NEerE+vPMZhI3cm/lB55OXU9TcdSwKl0JaicArccBqx0asGCUGJhMySYl0u/13iGlruElxn4fGwcdKnZ2N7IGQmWyAFHyJGj8TmYDS6yEhasmAUUpKZW5jIpA0MA5YqEZq0YMCE+yXzWzVhVs5TDbBWKFCHZeHQsvUL5f+LSVbL4T4E8aB/UT6mV9xkz/nIqvzhTz+/ZNE5rVZNdhU73qPUGLF7omusE/T8q+ecLk6ZQqbNsNMXrh9iI8h4qf3C3Psr4fElw/WuhlnUF8jb4F2mfmsgD+TPeiDhjsdCizYmTMWVJMMN/iaRKxXS9d2fNXLjFJWRmMpaxuhYi7H6N5Dvkiqt8BQmu7Eyg8LU1qEsJiQ/GrULe3BaR2ntGQGkiZ0Z4tsbNQH8B/oCGIP0viTbv2ru3JkXdKV6Fa+/y8OtyK2awGGFIi32NbAPzpj8xDahiqMsGhNsIJnuNuzI9ovI34u5jTTh+ZJjn+chRyZ+cY1MoSrPqOXGuN+3vBq2eXpNw6N0GYihjt7QoBSmFFgAQtPi1R61AtXkoD9acSBsnrVKJS7b/uYRaCaUD6LCqL0cKfxJFrOB0E6T8f8O5ISZGyunTNqu61gYuYFBDvl5vT4B3ZE7IZyY9VOpPU4avzX17XmihugmCKiQU89ad7BMjq32XVktc4UbHDVHqZkF4QGDrs93RopWkqbenJv+QJWLa01KR0WtMx58KFjrG5JaEKYVREAmqgDxzeiurX9d2gjRhg2bQsICw8IP/4Re/he2Vbu/4i5Y9VzKXUZ7coflQm8 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc6e99dd-32ef-48c4-ff27-08dc7eebebda X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2024 07:58:12.0970 (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: LOp+2rn3+A5sBEPZzvNKTR4qQxEaXez75ol/tz67RLSwm0MYa4f197MdR+gKhVmDlQYWVZOMYbklhTKsaDZdAQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7181 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240528_011242_194935_05FAD502 X-CRM114-Status: GOOD ( 13.15 ) 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 Changes in v11: - 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" + } +]