From patchwork Fri Jul 28 06:17:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 127348 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp235985vqg; Thu, 27 Jul 2023 23:37:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlFnt3GO8MFXJ08SKs4BvElDIY3Pe8ByPUOoSUwN4d+no52ade5nowcX0HatbYzcvZzjb92y X-Received: by 2002:a05:6a20:430b:b0:13a:6bca:7a84 with SMTP id h11-20020a056a20430b00b0013a6bca7a84mr1212518pzk.44.1690526242039; Thu, 27 Jul 2023 23:37:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690526242; cv=none; d=google.com; s=arc-20160816; b=opXL9TlRdQU9t3sysKoST/kCh04Zsn5aRMVXUMuvsKe7Szz3uNTH8tq44HdIogiENj peAR1XvgNIiBdIYJLawqKkpnZvkfPhg8UNoAEFQ9c5YAoK1pVUO0Wy/xAU/0jIK39h/d 7hV3Kl55zke+4t99YSq1DFAVDWJOlBMAoy5BwQPl9ow5DDIBahjDEN507KpRq/O2Kfdb b2/DTXNy22zLSN7PbhdX0G8IiiDAEDJNNnD0UNXXU4Mhbg9fcFhMM7uHNuQZBp7GB+4a 78331IW3GV/Ip5thtDQMQw4husTHUKAR2h0g9etbVEpZZOb0jfdANQ0p99022Hphxa+j fmrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=mlzMs6MBzLlBB5ebPQt3l6ewKxdlzWOxrFbM62Du/zw=; fh=6JOIFq++GFBr55qsbUomW9uDlSkbtTxkzfQq3YEDQ7Q=; b=I+Fr5j07sHbe3MEGHonDs89f+tH0AX90Ns+6k2EBSGWP50oi0T0c2c3zAzWwmPaj9T f4TQ5T+8ImO7aEF2KW3uVIHa455EEVUtMGAqzulWw2t9bUSSuxBRaaKmVILMg2MAO9IC HQD4r1Gwlp9xY5qPpX4ZJq6YJNDw5yM13mJRsJI8eNXh6jTFNhS5Mb2rNb97UQX+2WeW pxBsTnk6+VTcrZRAkcRpNmulDZA9oQenKf4y2evRfF7RoaFkLiMdmI2ma8WkawlZmsZt QKaLUD2OrkMoisR15dKqe2cxZj6ogkOmsTTiJI+XUTEQc1RD0PLrHSfX02xo2zdvFYf+ XpEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a63d449000000b005572b5c0f1fsi2548246pgj.369.2023.07.27.23.37.08; Thu, 27 Jul 2023 23:37:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233465AbjG1GRs (ORCPT + 99 others); Fri, 28 Jul 2023 02:17:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232575AbjG1GRi (ORCPT ); Fri, 28 Jul 2023 02:17:38 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF323273D; Thu, 27 Jul 2023 23:17:36 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=15;SR=0;TI=SMTPD_---0VoOxEJY_1690525052; Received: from srmbuffer011165236051.sqa.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VoOxEJY_1690525052) by smtp.aliyun-inc.com; Fri, 28 Jul 2023 14:17:33 +0800 From: Jing Zhang To: John Garry , Ian Rogers Cc: Will Deacon , Mark Rutland , Robin Murphy , Ilkka Koskinen , Namhyung Kim , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-doc@vger.kernel.org, Zhuo Song , Jing Zhang , Shuai Xue Subject: [PATCH v5 5/5] perf vendor events: Add JSON metrics for Arm CMN Date: Fri, 28 Jul 2023 14:17:20 +0800 Message-Id: <1690525040-77423-6-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1690525040-77423-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1690525040-77423-1-git-send-email-renyu.zj@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772645244871844085 X-GMAIL-MSGID: 1772645244871844085 Add JSON metrics for Arm CMN. Currently just add part of CMN PMU metrics which are general and compatible for any SoC with CMN-ANY. Signed-off-by: Jing Zhang Reviewed-by: John Garry --- .../pmu-events/arch/arm64/arm/cmn/sys/metric.json | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metric.json diff --git a/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metric.json b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metric.json new file mode 100644 index 0000000..64db534 --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metric.json @@ -0,0 +1,74 @@ +[ + { + "MetricName": "slc_miss_rate", + "BriefDescription": "The system level cache miss rate.", + "MetricGroup": "cmn", + "MetricExpr": "hnf_cache_miss / hnf_slc_sf_cache_access", + "ScaleUnit": "100%", + "Unit": "arm_cmn", + "Compat": "434*;436*;43c*;43a*" + }, + { + "MetricName": "hnf_message_retry_rate", + "BriefDescription": "HN-F message retry rate indicates whether a lack of credits is causing the bottlenecks.", + "MetricGroup": "cmn", + "MetricExpr": "hnf_pocq_retry / hnf_pocq_reqs_recvd", + "ScaleUnit": "100%", + "Unit": "arm_cmn", + "Compat": "434*;436*;43c*;43a*" + }, + { + "MetricName": "sf_hit_rate", + "BriefDescription": "Snoop filter hit rate can be used to measure the snoop filter efficiency.", + "MetricGroup": "cmn", + "MetricExpr": "hnf_sf_hit / hnf_slc_sf_cache_access", + "ScaleUnit": "100%", + "Unit": "arm_cmn", + "Compat": "434*;436*;43c*;43a*" + }, + { + "MetricName": "mc_message_retry_rate", + "BriefDescription": "The memory controller request retries rate indicates whether the memory controller is the bottleneck.", + "MetricGroup": "cmn", + "MetricExpr": "hnf_mc_retries / hnf_mc_reqs", + "ScaleUnit": "100%", + "Unit": "arm_cmn", + "Compat": "434*;436*;43c*;43a*" + }, + { + "MetricName": "rni_actual_read_bandwidth.all", + "BriefDescription": "This event measure the actual bandwidth that RN-I bridge sends to the interconnect.", + "MetricGroup": "cmn", + "MetricExpr": "rnid_rxdat_flits * 32 / 1e6 / duration_time", + "ScaleUnit": "1MB/s", + "Unit": "arm_cmn", + "Compat": "434*;436*;43c*;43a*" + }, + { + "MetricName": "rni_actual_write_bandwidth.all", + "BriefDescription": "This event measures the actual write bandwidth at RN-I bridges.", + "MetricGroup": "cmn", + "MetricExpr": "rnid_txdat_flits * 32 / 1e6 / duration_time", + "ScaleUnit": "1MB/s", + "Unit": "arm_cmn", + "Compat": "434*;436*;43c*;43a*" + }, + { + "MetricName": "rni_retry_rate", + "BriefDescription": "RN-I bridge retry rate indicates whether the memory controller is the bottleneck.", + "MetricGroup": "cmn", + "MetricExpr": "rnid_txreq_flits_retried / rnid_txreq_flits_total", + "ScaleUnit": "100%", + "Unit": "arm_cmn", + "Compat": "434*;436*;43c*;43a*" + }, + { + "MetricName": "sbsx_actual_write_bandwidth.all", + "BriefDescription": "sbsx actual write bandwidth.", + "MetricGroup": "cmn", + "MetricExpr": "sbsx_txdat_flitv * 32 / 1e6 / duration_time", + "ScaleUnit": "1MB/s", + "Unit": "arm_cmn", + "Compat": "434*;436*;43c*;43a*" + } +]