Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp817815rwb; Thu, 27 Jul 2023 23:35:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlFVCFWXpQCiuAZKnFZwKy2J5b5j8nPs0++uS32V676YBrw7fMEHCViJ8FQSgjF1ULWCAo+4 X-Received: by 2002:a05:6830:138f:b0:6b9:62f5:ac62 with SMTP id d15-20020a056830138f00b006b962f5ac62mr1358610otq.35.1690526119626; Thu, 27 Jul 2023 23:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690526119; cv=none; d=google.com; s=arc-20160816; b=ExzOlH1F/QQpBhKxUJIRsDBEBVf2TFM+YCXPCNBHoTxi1bdQROBuFv31KA03a0bxe+ 5+t1PErIvyhOSQGoa/A6odmtbENQT9lzh5juIL+qsHcTVLJv23RouiPkmUZeB+cGOPEr aBKiAunU4DBVx1TRx5Qlie4gliumYIuaANZ6OcK1FT9dlTC2Zsqr56EuRfMzciI0osCT lOxUTMrUvTsGQxLJabeqVxAqhyXZaa0/CdGWO0Obqa39b76r+Rls26mUHkQRp0MMNbHr +haZ+Mut3rte1Kkw9Qazb55gfxNHvxdNW1UJ3xmLe9G646P44nc8J27K8UxlMypFGZZ1 3OLA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w129-20020a636287000000b005340840c0c7si2544066pgb.476.2023.07.27.23.35.06; Thu, 27 Jul 2023 23:35:19 -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 S233528AbjG1GRr (ORCPT + 99 others); Fri, 28 Jul 2023 02:17:47 -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 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 --- .../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*" + } +] -- 1.8.3.1