From patchwork Tue Jan 19 02:56:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 12028533 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=-16.9 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,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 7285CC433DB for ; Tue, 19 Jan 2021 02:59:56 +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 362FC2067B for ; Tue, 19 Jan 2021 02:59:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 362FC2067B 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=YN/bU6/i9BbXt+CABzfXwFpRxcIO9C4866IxL5Eh2ns=; b=bp1WegiMGIxKxXaeHmHSagsQL yadGJDzKedt8tZKJSz+lSw5v4VR6y6NO/co7PZqUH9FwNc6ccCd4yCtqVAQ6PxiifryaADPwFTb+8 q3ZustCZisH6QpHlwpkW2gz/A9bqOye57oZXqlhVkEtNNRTqwD4zzzgp8nmfDvaRMiFAlVPJlpSgS Aamxg4VrODsRTTQYXGnKQ0Heufsj1V/y7u0X1eL0mOyscHe0w+ru4nN2tS7dKeUnpaOt8obKdqUsj uPdH9JK6M3tYLsQTVFZkUB+5N0FYUj508jEUmBLuTrPCJuZSnWkD95+cMY8ctfsnoC1ejzOrruzhF SHfxSrhbw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1hDo-0006D9-CD; Tue, 19 Jan 2021 02:58:20 +0000 Received: from mail-eopbgr20054.outbound.protection.outlook.com ([40.107.2.54] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1hDg-00069F-Q2 for linux-arm-kernel@lists.infradead.org; Tue, 19 Jan 2021 02:58:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kxEiSYVlXa6BOiPlCvyrDPm3CNdgkavt+z20eo929PBt9lGNVK2mKZSq3ThrgOd4GX6WXwFIQHqIKuW/qI8nYFIr1GgNblkZBOnEfG412dq8YlSXKGxA1RC6xMKfVmy88aERirzUDya9/eCtK4XKkiI2/sc+EY54QeIz+tbNPyGFHF6PQhWyCeP0zw+jdwUmE3ZkZwS4iCkCDkfiivz7jTP0HC5lQf+D4aHoz0j4HgIvXgb1i18yM9p6bxNMNoJ0ukDJ6XkgCPJ3LPA6R8jZ0DatUjsBpQjCh8xvmrMEIdnytcZDG8V8olVgsvZE2rIlEjHKz+C9WiGHixyhlvP3xg== 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=QqdgHv3Wn1thkJFioUq3L6g9Oote1LH+IcQOmFEdHDE=; b=OTy9sVbYxTHt3Rhhiwx5WCyhTOksTGvz3ah34x+tSMgfYGlHnUptsZBqoNHiVD70v7YJxRGRMuTgiI4e5dw6PZZVmziWBlIsFImiya4Lz9CSY9RMiolvlELpm4/6HdeE32AvGU6sxLI3t9F7TrQgi6OsmiozjQD70UaUk9Di8YORzJx0HdjQsIKlhwPJUdsNTgetzQ3Y1sBEDQHfaQEcFj2R911WmUfStS9REcBV13yBk7j8SRABFs0OMwkHX+SFzvRGoiS6TSIO0ZJaMcmnBVSgLK2oRnj85dd2JcVjVcIWN7HAmDMyV9WFsHbs4+CYYUtDd+Wpk8Wu219F5fVKuw== 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=QqdgHv3Wn1thkJFioUq3L6g9Oote1LH+IcQOmFEdHDE=; b=PxcqkXFXOpnvVL9IknQz1rQDF9afGxf0Jkyvfn1JpTbRNdcwOr05HOFjH9BRDK+NMccSzW0ngppKTOesPUiFTrqssns5okNpoBLN4Druqk/rjgCOS4j2EYiFG7/hZ1MK/FDfbb4M9eHJ61IoOkewhBeUhvS9KLn5T04dSXX3RDE= 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 DB6PR0402MB2903.eurprd04.prod.outlook.com (2603:10a6:4:9b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.14; Tue, 19 Jan 2021 02:58:08 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::b83c:2edc:17e8:2666]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::b83c:2edc:17e8:2666%4]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 02:58:08 +0000 From: Joakim Zhang To: john.garry@huawei.com, acme@kernel.org, jolsa@redhat.com Subject: [PATCH V1 1/4] perf vendor events: Add bandwidth metric for imx8mm Date: Tue, 19 Jan 2021 10:56:44 +0800 Message-Id: <20210119025647.12569-2-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210119025647.12569-1-qiangqing.zhang@nxp.com> References: <20210119025647.12569-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0231.apcprd06.prod.outlook.com (2603:1096:4:ac::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 SG2PR06CA0231.apcprd06.prod.outlook.com (2603:1096:4:ac::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 02:58:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e02b34c9-580b-4353-aab9-08d8bc260cdb X-MS-TrafficTypeDiagnostic: DB6PR0402MB2903: 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: tJYSrwqN3284Cqf+ib00JEdSrmLuIXOznfopwktfC8hJm6j40IFSu628fSV4ymorGwODFhSgNHDAhvo5ip6xMTunHDPEtjjkFov+qtVsgsQ7G3ANkW5aS8x0pZ5HCdHaUiSQCtE/cN+gHaArPKHTOFPUquS2TKQBfKYjSJCXNSrCc8i+mVgjZdgIkidvByh7tUVwLtZ98xMUdrMZBtPSj3wKnZPdFH+PZnrtpBUUDVF3qEzQL5V/H4M4qn/qsj4I4XtGVA9WElVBGpoO6pOR8ZISCMB5V+PxmkxhBKmg/QPlDAWA36twF5kxZVyjTZwPQpwKLgjhEXUHS4rWNNQwPI/3kkprU+58xrpBF5QeGL/vKa2v+5kG/ANWZjrOOQFZkb2PnGPYnLqydX2oEQin+vXcuypKPi279AC75p9ZJfMUwLib5HEBn3Ryic0suA1KMwddayXWHg+oy8zu65HhTbwTwez0mxt/iNbPiATTlFw= 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)(376002)(346002)(136003)(39860400002)(366004)(396003)(36756003)(8936002)(4326008)(6512007)(316002)(8676002)(2906002)(86362001)(66556008)(69590400011)(1076003)(6506007)(6666004)(6486002)(186003)(26005)(5660300002)(478600001)(16526019)(52116002)(83380400001)(2616005)(956004)(66946007)(66476007)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: AnPxx0p9bbCTRTum3VtQL7mfgGo20dtrQfexP7ua4hejifuR/P2T0UaafMIZUVr+A7RLhPV76PZTYbV2FSK5UEiMcmR43CBZqCkfWcCTHtt1IL/oSZPS8JpxeL9CpXpvZMnObb3jWg75HJla7siXg8oaxb+UdXtrslsZCkfj4Ou04tPDNhlEvNNy+H0sirtUtHP6l4mgD8bCnJTdVwzfaTYH06jP0lpmF0lgmXhA60ryje9VTw2iEMP6BvgvgPYKxrRyThXI/V4xIXLg8DWeR2XO5glLTbCwTlObwArHA6gF2FIB4jHdS9GZPru6ZoUYa6drwb/nU8ZAa0hxdADn/LNiK6/9/9hkoxnRkQ3AB0gOAyrDsnRIZzCsxsb7HPthH8GlHI+kTxJgL6ic6GDqsYKEjbwwht83ly1/JtwFJofgdhTXc5h/LJMuSeCMv8D5O/ltWFuw/LaDiH+x4v4dZAntEq4KyC0OaVJgkL+LLbQJYtxpFdVEXU6OWoA8kALNgJpneesm/JIjjxaVKdqYRwAbyw9d2MndoNxg2w/kVt81ShpRq6PKcH/CZjGVksMr935ykMQd36rW6zs8JdwLLpyf4SnyBxznFXVnOO7Ntf02Ijy5PFTnGRrK/+XxfXNXrHZyOvxlRZxd6SqpmwttaWcqRQgC/lVt0DjkgWH1DJzIHQA2lZfV1eTzW9ZhBegnuS+bzReQg9LyjafoTNeNUxbl0XqjJQ6CEtKePsD7ybpG/J3O57yOB0Jwwhsn+mT1H7IzHrxmoh9IxlX9sUE4xnxB26U6Y2t3ZJr1a1Pqk411dfTxPmNY1Hplbr9k/3usg6gqxpSmVT46AMiRSCzXlNtTnhjZk2sW09+T+wxyjdgDgmLfI7RDiclDlD20C0w44nmiGNUHyvDQWbuqqng90BQyRfAm3t7/u0D/U0N+uRmV2u9e6RWDv+SCkBjCuulhWVRuwjLpucHj44r6OiH1XDTqKidN2wfCR8lcqvuuwV1qTYvncE420Kwrhc8pzsf6 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e02b34c9-580b-4353-aab9-08d8bc260cdb X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 02:58:08.5159 (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: tOjzwCmDBQiEa67Fck/7dT+TIHL65uV697Ig3Fd3tPYtP9ZiEj4TtOtg5gvQ2klGJfdyCAMMAjAzGFMNxGCOfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2903 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_215812_883540_AC8ADD48 X-CRM114-Status: GOOD ( 12.22 ) 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 bandwidth metric for imx8mm. Signed-off-by: Joakim Zhang --- .../arm64/freescale/imx8mm/sys/metrics.json | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tools/perf/pmu-events/arch/arm64/freescale/imx8mm/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/freescale/imx8mm/sys/metrics.json index 8e553b67cae6..615be286ecaf 100644 --- a/tools/perf/pmu-events/arch/arm64/freescale/imx8mm/sys/metrics.json +++ b/tools/perf/pmu-events/arch/arm64/freescale/imx8mm/sys/metrics.json @@ -1,4 +1,20 @@ [ + { + "BriefDescription": "bandwidth usage for lpddr4 evk board", + "MetricName": "imx8mm_bandwidth_usage.lpddr4", + "MetricExpr": "(( imx8_ddr0@read\\-cycles@ + imx8_ddr0@write\\-cycles@ ) * 4 * 4 / duration_time) / (750 * 1000000 * 4 * 4)", + "ScaleUnit": "1e2%", + "Unit": "imx8_ddr", + "Compat": "i.MX8MM" + }, + { + "BriefDescription": "bandwidth usage for ddr4 evk board", + "MetricName": "imx8mm_bandwidth_usage.ddr4", + "MetricExpr": "(( imx8_ddr0@read\\-cycles@ + imx8_ddr0@write\\-cycles@ ) * 4 * 4 / duration_time) / (600 * 1000000 * 4 * 4)", + "ScaleUnit": "1e2%", + "Unit": "imx8_ddr", + "Compat": "i.MX8MM" + }, { "BriefDescription": "bytes all masters read from ddr based on read-cycles event", "MetricName": "imx8mm_ddr_read.all", @@ -6,7 +22,7 @@ "ScaleUnit": "9.765625e-4KB", "Unit": "imx8_ddr", "Compat": "i.MX8MM" - }, + }, { "BriefDescription": "bytes all masters write to ddr based on write-cycles event", "MetricName": "imx8mm_ddr_write.all", @@ -14,5 +30,5 @@ "ScaleUnit": "9.765625e-4KB", "Unit": "imx8_ddr", "Compat": "i.MX8MM" - } + } ]