Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5347679rwr; Mon, 24 Apr 2023 02:45:37 -0700 (PDT) X-Google-Smtp-Source: AKy350bRn5+IqamafS+np4S0dXJJSYhNrNknYjaoqJjqGS9toKgAPJfiYBkt9/Tuuldd2iIveL6N X-Received: by 2002:a05:6a20:244c:b0:f5:9f72:1aa9 with SMTP id t12-20020a056a20244c00b000f59f721aa9mr1325649pzc.14.1682329536705; Mon, 24 Apr 2023 02:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682329536; cv=none; d=google.com; s=arc-20160816; b=yQHvFd8oxfqED2OWnFh9IC+EozyPRDtyJ0w56ne04wgiruXXkIkL2tDW2Ry2le1Glq wcTBkr7jLs9p0suClN0zl1PJYMYvRqSDUvQYq+JZEIZQIq+OSapxifokDeOXeV/uy9vW p37csFNiDdTa6A3znoBxJThvxVz8IvaxuL3UZOxF4R6XMVzBZ3QXtsamOD9hGNWj9Grv BsUyMjU3Ma5mnI2iLR2K5s62pkgpYjhi84X/2sFQ3p7NOn/H6EwU25JGPVXF/d3e2NN7 bmeawqvSVdQMFvICmCATVmwGivsGnYdMLkSNS+PsmmHt6mdiJFWnDlyAHToxKvjxGbiF SUcw== 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=ost8SjrpJNMP7gL8+PmklWrQ8r4rNUltrfJk9kamNY0=; b=F5vAPQ2Dzg7ozsgHdo78a1RpqojNLKa7tOZsyeusS/diHGX8CqpsFB10jR02KaUrvU Sh0aL5NOfji2U2KhGj9xxJLOPQDXYmTMC2TQFFL4evRt0M3o+tLXAv37YkHIs5Ga+H4z wuBSsP9Xs/eCdu0vPP6jxj7hK0OVhCmlUHQDWv3eLWA2ZwEroQYsO5mp/1T3Gqz5xFie 0fD+h0+VoqmpFGzEVS2w0hL/+cGoR30ewvXfzpVrABQ3DkKFMaRRUjm+pewrpC/CBAhu VK2pJza5xbKHb505IldrXErMf/hBI72XRZm2c46gumawTOPaZHNsI7bO0AnaZjGcEkMV E2Fw== 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 u32-20020a634560000000b0051b6cf7306asi10804336pgk.52.2023.04.24.02.45.22; Mon, 24 Apr 2023 02:45:36 -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 S231267AbjDXJoo (ORCPT + 99 others); Mon, 24 Apr 2023 05:44:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229841AbjDXJoi (ORCPT ); Mon, 24 Apr 2023 05:44:38 -0400 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FDF730D5; Mon, 24 Apr 2023 02:44:35 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R871e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0VgsU8jf_1682329470; Received: from srmbuffer011165236051.sqa.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VgsU8jf_1682329470) by smtp.aliyun-inc.com; Mon, 24 Apr 2023 17:44:30 +0800 From: Jing Zhang To: John Garry , Ian Rogers , Will Deacon , Shuai Xue Cc: James Clark , Mike Leach , Leo Yan , Mark Rutland , Ilkka Koskinen , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, Zhuo Song , Jing Zhang Subject: [PATCH v2 2/5] perf vendor events: Add JSON metrics for CMN-700 Date: Mon, 24 Apr 2023 17:44:13 +0800 Message-Id: <1682329456-19418-3-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1682329456-19418-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1682329456-19418-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,RCVD_IN_MSPIKE_H2, 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 CMN-700. Currently just add part of CMN-700 PMU metrics which are general and compatible for any SoC. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/cmn700/sys/metrics.json | 74 ++++++++++++++++++++++ tools/perf/pmu-events/jevents.py | 1 + 2 files changed, 75 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cmn700/sys/metrics.json diff --git a/tools/perf/pmu-events/arch/arm64/arm/cmn700/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/cmn700/sys/metrics.json new file mode 100644 index 0000000..1577d86 --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/arm/cmn700/sys/metrics.json @@ -0,0 +1,74 @@ +[ + { + "MetricName": "slc_miss_rate", + "BriefDescription": "The system level cache miss rate include.", + "MetricGroup": "cmn700", + "MetricExpr": "hnf_cache_miss / hnf_slc_sf_cache_access", + "ScaleUnit": "100%", + "Unit": "arm_cmn", + "Compat": "cmn700" + }, + { + "MetricName": "hnf_message_retry_rate", + "BriefDescription": "HN-F message retry rate indicates whether a lack of credits is causing the bottlenecks.", + "MetricGroup": "cmn700", + "MetricExpr": "hnf_pocq_retry / hnf_pocq_reqs_recvd", + "ScaleUnit": "100%", + "Unit": "arm_cmn", + "Compat": "cmn700" + }, + { + "MetricName": "sf_hit_rate", + "BriefDescription": "Snoop filter hit rate can be used to measure the Snoop Filter efficiency.", + "MetricGroup": "cmn700", + "MetricExpr": "hnf_sf_hit / hnf_slc_sf_cache_access", + "ScaleUnit": "100%", + "Unit": "arm_cmn", + "Compat": "cmn700" + }, + { + "MetricName": "mc_message_retry_rate", + "BriefDescription": "The memory controller request retries rate indicates whether the memory controller is the bottleneck.", + "MetricGroup": "cmn700", + "MetricExpr": "hnf_mc_retries / hnf_mc_reqs", + "ScaleUnit": "100%", + "Unit": "arm_cmn", + "Compat": "cmn700" + }, + { + "MetricName": "rni_actual_read_bandwidth.all", + "BriefDescription": "This event measure the actual bandwidth(MB/sec) that RN-I bridge sends to the interconnect.", + "MetricGroup": "cmn700", + "MetricExpr": "rnid_rxdat_flits * 32 / 1e6 / duration_time", + "ScaleUnit": "1MB/s", + "Unit": "arm_cmn", + "Compat": "cmn700" + }, + { + "MetricName": "rni_actual_write_bandwidth.all", + "BriefDescription": "This event measures the actual write bandwidth(MB/sec) at RN-I bridges.", + "MetricGroup": "cmn700", + "MetricExpr": "rnid_txdat_flits * 32 / 1e6 / duration_time", + "ScaleUnit": "1MB/s", + "Unit": "arm_cmn", + "Compat": "cmn700" + }, + { + "MetricName": "rni_retry_rate", + "BriefDescription": "RN-I bridge retry rate indicates whether the memory controller is the bottleneck.", + "MetricGroup": "cmn700", + "MetricExpr": "rnid_txreq_flits_retried / rnid_txreq_flits_total", + "ScaleUnit": "100%", + "Unit": "arm_cmn", + "Compat": "cmn700" + }, + { + "MetricName": "sbsx_actual_write_bandwidth.all", + "BriefDescription": "sbsx actual write bandwidth(MB/sec).", + "MetricGroup": "cmn700", + "MetricExpr": "sbsx_txdat_flitv * 32 / 1e6 / duration_time", + "ScaleUnit": "1MB/s", + "Unit": "arm_cmn", + "Compat": "cmn700" + } +] diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py index 2bcd07c..7cff2c6 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -256,6 +256,7 @@ class JsonEvent: 'DFPMC': 'amd_df', 'cpu_core': 'cpu_core', 'cpu_atom': 'cpu_atom', + 'arm_cmn': 'arm_cmn', } return table[unit] if unit in table else f'uncore_{unit.lower()}' -- 1.8.3.1