From patchwork Wed Jan 27 10:57:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 12049717 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F6DEC433E0 for ; Wed, 27 Jan 2021 11:15:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D92E20729 for ; Wed, 27 Jan 2021 11:15:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D92E20729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hvRWrE1Zkcnj9973uCA5/jPksy/aTjhxKKSeKf536M8=; b=mkC8T/oZddh+FQCkSrRGxg1VF kcYxKB1hIypOkVGg2zyoAHwuWY8W3vJKWRzbj1qBGBvs8skqMfzEazW6mQvsVTb4nN1gBFXFhmv43 8gD2p58J6SjPxar3y4asWSJMDIli7zAR7mthv2MR4CU4caP7Y/8VQiOets8ME3PHc6zd1y/RFveJU dKr0Z7ppXm9m8MDR+gWfKonhayNmWe6CE2Q9jhhCEYwBPIr8i2EOfOtkaCxRN4nq5Nvpwzrb47DOS joX6Fxv/dy8/d6ccOwrDc6h89SUrGPVi5KlWxdyQroICbWR+lMTBAbJH33POe13nrnQMkN2y6RUHt 2c2Q9hqIA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4ilo-0005oU-Sp; Wed, 27 Jan 2021 11:13:56 +0000 Received: from mail-am6eur05on2074.outbound.protection.outlook.com ([40.107.22.74] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4ilm-0005mg-0t for linux-arm-kernel@lists.infradead.org; Wed, 27 Jan 2021 11:13:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hrhpcFQLdlS6YbT9funIA6VZdEBZOjzR5q660iVLmHJlw19ydoqHZxDgewbdyDxTY43K0kkPpwPBNTGqf37Js5vawsxSXf2qBMDIYKTM8J4WMLOrck7wMiQbE5TcK3NWUgy2RIJns/CsEZ8rqeztdzY4kZ7LFb6g+dHK2e17cuxThRD3Qw1+WPSx1O7QTouywWacidznnXHzqW37LoUAateLS2xR2APrq71/SXWZaznU27Iv+sRepGrNBZCiI8DrwewY9wBrnywN6yy2FutM8VQcGMU2Efdvl/gx8+l1Y1bRa3KBNTxN49jTMPW1/snF2EQw+xBIE1LDav9g5ocC/A== 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-SenderADCheck; bh=Xtj79xuZInN6B+XVYTfqBLh9adH5iY7mutTyImwfCsE=; b=UpizpVFbdOn4GajzIf1a0uWsJQuvq4nCrWhgWY71qkOSVG+T2aS4FpUXH+VugGd4EWVFUe9J0rWRINywjpi3N01pEFAEFEMcDDdDFE1wGONX6MaDTnsPudJyu7wGXmszHhv9z66BFQHZ+YIzEo8moBYo/KNmlHpYODck9k/GMEREoGoMHzAs9A1+OZuTUIi3cIFTNLAdnQUK+eswBpxYgPBX6obIQBZz/DXg5gK3xhZJBwDqtmrgA4FTsUGQoHtXDQTCGGDA6hy3ndDT1JhvfTHAQjACbEnhUhben3hvIBJbQ467rr71ukuPmtaP2FHRMu1bAU2NoxFTq7uVtuCUuA== 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=Xtj79xuZInN6B+XVYTfqBLh9adH5iY7mutTyImwfCsE=; b=BX/pLvanEkg99+za0rfQHsP7OOxnSLweavM723NUBSDdf5Ysl0d6gVxKHH8x0D5Rdyt03kaAAax0OgiXi8Cb9VcdDgRXusZ5t0hdG6ARO4wyUSgHeuBuZ+i8Nj5jsuufFci+J46wPtCnTZHIrEqR2hQfisrZOMW0NtLzoBpWRKI= Authentication-Results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DB7PR04MB4108.eurprd04.prod.outlook.com (2603:10a6:5:21::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Wed, 27 Jan 2021 10:58:46 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::9d2b:182e:ba3b:5920]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::9d2b:182e:ba3b:5920%3]) with mapi id 15.20.3805.017; Wed, 27 Jan 2021 10:58:46 +0000 From: Joakim Zhang To: john.garry@huawei.com, will@kernel.org, mathieu.poirier@linaro.org, leo.yan@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Subject: [PATCH V3 3/4] perf vendor events: Add JSON metrics for imx8mq DDR Perf Date: Wed, 27 Jan 2021 18:57:33 +0800 Message-Id: <20210127105734.12198-4-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210127105734.12198-1-qiangqing.zhang@nxp.com> References: <20210127105734.12198-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SGBP274CA0020.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::32) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SGBP274CA0020.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16 via Frontend Transport; Wed, 27 Jan 2021 10:58:40 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6591b006-b63d-4db6-affc-08d8c2b284d3 X-MS-TrafficTypeDiagnostic: DB7PR04MB4108: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1247; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dbrE3eAJo1Fs9QThn/LbIek8Vbq1NbTeRQnZgFl8coxkm1vzTQ8UT9tRYXwiVQI6CM/ZiXKeEwYeY/XcM1A6gmc/ZcB4Q6jubkdv2tffV252TQ6TQ+YGql85xhAkRFnDl28QGRbZz4jzGnXiHIAwivFT2OCPJDAuNv5Pl+XweVD1f7sMOA0FoWsS86GcOPU8EBontAb998WQXZ5OR6TNx+DDBg24vamyjx6LP6wqDuXKkI7jckb9kGhdboM8F7eMYieHc+F3F4gq/sY0D55xtMTVrVXxXTofMgRhPlKYk98r0g3aC3W7H5wS0zLDjQAdlYI67T8NLRAMz6/ooLiBxsLdf/xdJiSgmKUKQEigAH4y2vyKpYqjE3ZbY4bXzH0VG8kDnIlZETQXQ+0fdZewQxjZfqLkXq6EV0d5O/Xy404x2TDknaQgCZ6eLWKJoTNObAzzFJF/uUUU0Hcol0LfETBscWcFPllu2w1Xqc4gfSg= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(136003)(376002)(346002)(366004)(52116002)(66476007)(921005)(26005)(66946007)(66556008)(6666004)(4326008)(8936002)(8676002)(1076003)(478600001)(956004)(36756003)(2616005)(16526019)(69590400011)(6506007)(86362001)(6512007)(2906002)(316002)(6486002)(7416002)(186003)(5660300002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: nXEn/LT1rdFCWH1Y8xANVLyHwNGOVvCKJ8oSNEu1YCB2rbXos92uOk78EnfU+MeqEpkdLUNBzQosjQl7fPdi0Xdeeyx3TcWJbFDhY0FOt3Oqofojg3dPXJElZvdvwGfjesmRiQJek1cJD3y8pyGJNVUWOkUueBXFMCiOyzq8jbz2IHNO39kbl+OzeHMYWTJ3h72jKMoZPWrbHo/5kfPb79QPp2IhdM1lhFXVw8w+VYjsQ0FGfHNpoRlE99vWD5zVHlluimg1nD3NsMhuBeOJtazR4hI4qcXudaJN0zYoRLqzOB6qNP038FkabFmRg4mc5LEVQxCDjeoIhtSwn096QZOQzro7evo+kQoNX/knI2QrFI5kfl+2TXzb836msaJG52FgwC0ySfWdecLe8h0kXdo38c/M1/gU7zk2ZxXjs+wKsSXdFV6wHdoxBmoF5eLeTFjil8NVXYr79lTWNh/TJ/L0hM8H5qcvxz/0wvk0MYi688OihlnBRpd1arEjCKhy23RuUV13RBke3BbpqwVoMxp8+/dVtIpW2NPBfB86aMWjvASJQOjZVeyF+CkReoO37F2ih+nDrY0LJxE/iT+Bg9cA6jQerXZA1vYpUX6MPKgWBKLkxf06HPVXd6JBFXeO0xFrp60Bj7yvf5HaSuiOlg1xJGD9yDzTwU/EYGK/peLS0dgvCTcnLATR9jN0AIoeWeBKA4fiGS5FXs8e6fBM8ClLpMlTv6nxrMitPlWHEKkPXNE6gUilR7uhPXaoiMrtvLBREUS+uEqYZ/a+BVn6ZkZpXKdNUkPrXzZdfdtitDTn9BAwc2SoydRptUK8sP/I5chVPnidNlTUn7wwTtQ4zqlddnNexGzxrbII37I+z4yGD+vvWBhSGINcFmc4uNa1Y05lw3celW11aAcYkQoHSU2EG2fSjk+ugJlUk5mVnPThVbtuE4nkOA+gHzuiDokjNrJhhaDfj2T/LbXOs/QtXvLpw8BWbEWFH5KKNs/0GCPCzQepOoMVKp3FNMHMkGSObNayFAA6XmdsYu7C14FY+OTlibA+0jzYgrpo4mDyNDtCqb3ICg63K7/wNct2+Opd X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6591b006-b63d-4db6-affc-08d8c2b284d3 X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2021 10:58:46.2990 (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: o0afBAX5NXKO8vsvvCAQ0IpXAwq35rAta4gw+HOLfpt8Yh6cWkN7Cf+5LNVtXaGOfR4qjtwfL5iQbNr8DoCKbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210127_061354_088009_0EC5E318 X-CRM114-Status: GOOD ( 15.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kjain@linux.ibm.com, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add JSON metrics for imx8mq DDR Perf. Signed-off-by: Joakim Zhang --- .../arch/arm64/freescale/imx8mq/sys/ddrc.json | 37 +++++++++++++++++++ .../arm64/freescale/imx8mq/sys/metrics.json | 18 +++++++++ 2 files changed, 55 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/freescale/imx8mq/sys/ddrc.json create mode 100644 tools/perf/pmu-events/arch/arm64/freescale/imx8mq/sys/metrics.json diff --git a/tools/perf/pmu-events/arch/arm64/freescale/imx8mq/sys/ddrc.json b/tools/perf/pmu-events/arch/arm64/freescale/imx8mq/sys/ddrc.json new file mode 100644 index 000000000000..c8682728ddad --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/freescale/imx8mq/sys/ddrc.json @@ -0,0 +1,37 @@ +[ + { + "BriefDescription": "ddr cycles event", + "EventCode": "0x00", + "EventName": "imx8mq_ddr.cycles", + "Unit": "imx8_ddr", + "Compat": "i.MX8MQ" + }, + { + "BriefDescription": "ddr read-cycles event", + "EventCode": "0x2a", + "EventName": "imx8mq_ddr.read_cycles", + "Unit": "imx8_ddr", + "Compat": "i.MX8MQ" + }, + { + "BriefDescription": "ddr write-cycles event", + "EventCode": "0x2b", + "EventName": "imx8mq_ddr.write_cycles", + "Unit": "imx8_ddr", + "Compat": "i.MX8MQ" + }, + { + "BriefDescription": "ddr read event", + "EventCode": "0x35", + "EventName": "imx8mq_ddr.read", + "Unit": "imx8_ddr", + "Compat": "i.MX8MQ" + }, + { + "BriefDescription": "ddr write event", + "EventCode": "0x38", + "EventName": "imx8mq_ddr.write", + "Unit": "imx8_ddr", + "Compat": "i.MX8MQ" + } +] diff --git a/tools/perf/pmu-events/arch/arm64/freescale/imx8mq/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/freescale/imx8mq/sys/metrics.json new file mode 100644 index 000000000000..862c98171e0d --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/freescale/imx8mq/sys/metrics.json @@ -0,0 +1,18 @@ +[ + { + "BriefDescription": "bytes all masters read from ddr based on read-cycles event", + "MetricName": "imx8mq_ddr_read.all", + "MetricExpr": "imx8mq_ddr.read_cycles * 4 * 4", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx8_ddr", + "Compat": "i.MX8MQ" + }, + { + "BriefDescription": "bytes all masters write to ddr based on write-cycles event", + "MetricName": "imx8mq_ddr_write.all", + "MetricExpr": "imx8mq_ddr.write_cycles * 4 * 4", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx8_ddr", + "Compat": "i.MX8MQ" + } +]