From patchwork Mon Jan 25 08:59:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 12043107 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.0 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=ham 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 C8C8DC433E6 for ; Mon, 25 Jan 2021 09:01:55 +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 7495E22EBF for ; Mon, 25 Jan 2021 09:01:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7495E22EBF 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=oGDrJl5SEY0qUMMrWvsrikhOfHyWHXIkCkwvEENQKtY=; b=VYfOwJNjAjK5v+cZyh2JI/z48 qcCR/RFHZMHNPtr7JFW92VpVRRsMbT7NyO8StQnmr7ji+Dc/lIWQP+kad1stmGhww8r2X0E8KutxZ H57o/RMWAGYIRONGTyFy2G7UCYUVKXef3OSqBxQXSQxVADbTIdt4/oruTf7TpNtS3xciHURNdmyAE ZD+EBDqljIBtBmwUo7LY9JaTxxE1S71Cfq40AhWowzuq353qWJoFUAPi3dzPeBnMd+1v0vnx0ycWr BjnifSVtJ18bxWzOBBNSn+789aialxLps5GdsAPyytiIj5gG53UpC3yE+YvcCjRpUy+u5dHwHCXhZ AbL5akYWw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l3xjT-0005xB-Q5; Mon, 25 Jan 2021 09:00:25 +0000 Received: from mail-eopbgr150049.outbound.protection.outlook.com ([40.107.15.49] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l3xjK-0005ud-OU for linux-arm-kernel@lists.infradead.org; Mon, 25 Jan 2021 09:00:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LJlaq/Jam+XfDFLfIw/JBhnGln5b/LfJXbm7AjG+hi+LEXLtrQbiK7xww4/xY9R1D/vuutuH5RzkO01PQqxJ5xUU3fvb9F4C16+7P2ss9+evJQNcSYDF8pCYN5DHVRahrR+c8TI4OOY8RaBLsiZPwrUrYt+UIc3ahPLfLlRMSgbb1NooIfdrwg4khdqhE7C/9XcVN1XT7pxc6eeX6EhkM9IatGQT09sGDEjIjs5i53iI+l67iKTuIWOdxBPd/SHskt5lxDtoi4HCbfcgsDetI/dei2V8rhlwJ8uHOn4ZFnGxz0g1cXAntHGJAE4DaCnfe1yqxEXHhavC1wZSoqL6pw== 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=g3F7j9sr75mtrlnzrgG/sVqRSxCLXmOLum8l1RirD3A=; b=LMPYogrLAlMvimo/RvuhLRYOcGAdHH6U4CPdFCsDe+NSk/wWInVEAGtAGGpUhYqyHFe5vKq5XiaKV2Q4wKJX4RTWE1oxnTg4j55JJsLG16RkSwUPnx9FkNgIvdQqslUJ9V1xs4SK194zwt6twaHyaQjoLipPeCF0POm/ueRlOexgjXTXNWMa1HzJewxaEbh9epUDGeg6JA6MOsUO6I+m6+lxMzv1BQ9eWgS5iyBLkV9qan5IfENyZpVbE72qtJE1NPnQJMfdF5n0xFdjJ5w94az/6QPksUDbUBCIA/fhh8ewhxha/9ktwcF9TC75yNq91TuP8hLvlz/tPdmHITNRTQ== 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=g3F7j9sr75mtrlnzrgG/sVqRSxCLXmOLum8l1RirD3A=; b=QmpPmW87OWaYOPZiwpRO0aHcb/RoQDNo32NX4KeMrJ0aGfpS7FoumLFKbvWHh0Wo2/6CU1Q9irFBgUo4MewaLYFlXhMTE5/ktg5eMBwAyN4T4pNLHzFPcmRI77T+LfBX/6+ECMp3mQfZCN+1Q4WzP14LWrd9n+yt0onmHUGLHTc= 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 DBAPR04MB7366.eurprd04.prod.outlook.com (2603:10a6:10:1a0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.12; Mon, 25 Jan 2021 09:00:13 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::9d2b:182e:ba3b:5920]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::9d2b:182e:ba3b:5920%4]) with mapi id 15.20.3784.016; Mon, 25 Jan 2021 09:00:13 +0000 From: Joakim Zhang To: john.garry@huawei.com, acme@kernel.org, jolsa@redhat.com Subject: [PATCH V2 2/4] perf vendor events: Add JSON metrics for imx8mn DDR Perf Date: Mon, 25 Jan 2021 16:59:25 +0800 Message-Id: <20210125085927.27322-3-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210125085927.27322-1-qiangqing.zhang@nxp.com> References: <20210125085927.27322-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR01CA0135.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::15) 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 SG2PR01CA0135.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11 via Frontend Transport; Mon, 25 Jan 2021 09:00:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a3c323b5-bccf-472d-fa4c-08d8c10fa0a2 X-MS-TrafficTypeDiagnostic: DBAPR04MB7366: 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: XLSjxT+Lyj6gh0rlsqVMhEtPBCBVK+Ch8QjPhQwcAFWzhvLB2HHdVVV5czXungCYbb5GqabIiPE0nSiFuL5adjRSCV8Sdxx2Em16C/RIEg4TnnJBFyVN7RR1BHFr7g/1VPQYVJLHoxbhNV/x8rOKsglrgpKw+5GL/f/l2fDIq4PSF1eaWQVfGwiigyz0kAmNqKbeifbYEFT7NBIEDeumxEOtuyRxQvo9MUJvk9LjXgg42D4DaoWM+qBNOMQnAMPMI6AnfW/beLaO9u7H543hbhryzHX2ots3N9chKm8ENvuuCe/UJifZyOkEzrJLn5tGl5PmH3nT2vuVSh56rW57TOA1hOC/kSzwsrRZmUrE5vCiGVvR0fJ8Z9MQhtf45pYRsLGTTzCNvelT9VTzqQut5yfnC9Z4OD3DsFagWRRZE3Z9HVmk8ve8SFqu3OWSXrOuM91aB212fnRCvlYh3gUkng== 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)(366004)(346002)(396003)(376002)(136003)(39860400002)(956004)(2616005)(36756003)(52116002)(86362001)(2906002)(6506007)(6666004)(6486002)(6512007)(66946007)(5660300002)(8676002)(1076003)(316002)(478600001)(16526019)(66556008)(66476007)(186003)(8936002)(26005)(69590400011)(4326008)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: j73SRz9TGCzeZbnVZbkTBrYl+d1ntbY9nCPupXmuLgkTIEHdQDxTm7n0GbCwmghg3yMWrdcBmov5OpUFpwvrfmhEhjXgNQG6wvXmzDTbDEbuKpzOjBnTjCfyWba7pyXdQ/TB75PEdPFJ3TbI2s5cHzrdOzYcSY30mFrzKhFMaqEwQ7MQ5MGa8LLAuQx0jJU4a9xSi1ynJO3GGa+DzHEaTVs2BOibJNP0AqnQN+NRvIdIgu0XiM6RMblTCAyH6weftfARJNBpiAR6SDG2MiDizbSfRzNLYlaQUsg+6ZFVRd4vFaD/ULxCUjt0QPXgkzyTsa+psABB/z2058hUevjnfmVRZuuoYCGwk/QrfYGHNI5R7XOKsmiPq5si6tVVmjoaNUvs5QXbx7kCi2bz2uGkAt9DwED55V4cAssdMydc/FjaVdhIWKZuboKyabAhakZ9CLwuh0I+SI+DCmUueiATA/m70N3eFywh62+EOtT6F3dHT05IG+I1Ro3yRkrKZaTt7Bg0yTDpBZ2w3xT00B1hHNoy7tFJxy98p7JNxgi4UV+ZuUYTZe1Nz6RgDHuhomlorzx0mNWXYF+dcPFPqNEHUT8SJgxEjjQSp5aGU73qHkuDa7+bYIm+bSYhrH/VYJAj/53cgDxkZ8KLYoE4r8FGtLM2MG//JCCqDIIop2psxgdDpZkkv3C8RWJn5tS/uRuUtCap4O+kjtFvqODhqmi70/D6dFK7JXJvNqfjXKv7rQZbnAedY+2nPYk35KAU0oVh9SaFouBIXXbTLLpEdWxEpNu8SHIydb1LL7oBm+6YSaIXWmE3MRZSYAtMQN2mZTOCOm8cklBzegps26FTEdJaHYE5qYy3ti++GYVIyV+FCWluP4ObrUhjzGnQxab7WO6herVMuLC5wcBJnrYccWsFWPWBy05norqkL/3OI0BfLejDxTGzuMiGAzFACt6FMTOnNz7SlGGzzZQ8Lb+r648WDc5jxRqxiSEW4tTw12t6Yzt7v7pM34lhYT0CdAnNaNfsSi2r647gFbwaW2I8fMnO0FBb2lDYyaern+fgkfAbkL2FmyU5z0TSethVj7N4JnPy X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3c323b5-bccf-472d-fa4c-08d8c10fa0a2 X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2021 09:00:13.8492 (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: NCjbq+dLayEtsPrjtlpBg69fbanrQjelTvye0wLNlaoa0Jf0WhzuyaBItMPeipScxncqv5c3UMML25St5jrdgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7366 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210125_040014_806041_9185BF42 X-CRM114-Status: GOOD ( 14.21 ) 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: linux-perf-users@vger.kernel.org, mark.rutland@arm.com, will@kernel.org, linux-imx@nxp.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 imx8mn DDR Perf. Signed-off-by: Joakim Zhang --- .../arch/arm64/freescale/imx8mn/sys/ddrc.json | 37 +++++++++++++++++++ .../arm64/freescale/imx8mn/sys/metrics.json | 18 +++++++++ 2 files changed, 55 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/freescale/imx8mn/sys/ddrc.json create mode 100644 tools/perf/pmu-events/arch/arm64/freescale/imx8mn/sys/metrics.json diff --git a/tools/perf/pmu-events/arch/arm64/freescale/imx8mn/sys/ddrc.json b/tools/perf/pmu-events/arch/arm64/freescale/imx8mn/sys/ddrc.json new file mode 100644 index 000000000000..8352e73d6d35 --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/freescale/imx8mn/sys/ddrc.json @@ -0,0 +1,37 @@ +[ + { + "BriefDescription": "ddr cycles event", + "EventCode": "0x00", + "EventName": "imx8mn_ddr.cycles", + "Unit": "imx8_ddr", + "Compat": "i.MX8MN" + }, + { + "BriefDescription": "ddr read-cycles event", + "EventCode": "0x2a", + "EventName": "imx8mn_ddr.read_cycles", + "Unit": "imx8_ddr", + "Compat": "i.MX8MN" + }, + { + "BriefDescription": "ddr write-cycles event", + "EventCode": "0x2b", + "EventName": "imx8mn_ddr.write_cycles", + "Unit": "imx8_ddr", + "Compat": "i.MX8MN" + }, + { + "BriefDescription": "ddr read event", + "EventCode": "0x35", + "EventName": "imx8mn_ddr.read", + "Unit": "imx8_ddr", + "Compat": "i.MX8MN" + }, + { + "BriefDescription": "ddr write event", + "EventCode": "0x38", + "EventName": "imx8mn_ddr.write", + "Unit": "imx8_ddr", + "Compat": "i.MX8MN" + } +] diff --git a/tools/perf/pmu-events/arch/arm64/freescale/imx8mn/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/freescale/imx8mn/sys/metrics.json new file mode 100644 index 000000000000..2bbba4d8ea5b --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/freescale/imx8mn/sys/metrics.json @@ -0,0 +1,18 @@ +[ + { + "BriefDescription": "bytes all masters read from ddr based on read-cycles event", + "MetricName": "imx8mn_ddr_read.all", + "MetricExpr": "imx8mn_ddr.read_cycles * 4 * 2", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx8_ddr", + "Compat": "i.MX8MN" + }, + { + "BriefDescription": "bytes all masters write to ddr based on write-cycles event", + "MetricName": "imx8mn_ddr_write.all", + "MetricExpr": "imx8mn_ddr.write_cycles * 4 * 2", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx8_ddr", + "Compat": "i.MX8MN" + } +]