Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp1867427rwo; Sun, 23 Jul 2023 02:23:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlHXHxyC7l1LTrU791+toaKf0xT3mejbcsxvK0quvdeL1ggV+7sgfaY8tBQtgVM8gsimNkEj X-Received: by 2002:a17:902:e80a:b0:1b9:ea60:cd82 with SMTP id u10-20020a170902e80a00b001b9ea60cd82mr7541557plg.5.1690104232414; Sun, 23 Jul 2023 02:23:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690104232; cv=none; d=google.com; s=arc-20160816; b=p4SmOntKBDKPo4JBPa6Fd6QyIRsa827TlKBq194ffrxXS73NDVPhH21hlqgUqr42ay llwyHydOegMowwxWZwVOzSmxDJSY3HxJO+b2R9W2T6ngL0ie6rwldflkRpvhge/JACtN 8plTv9XL4ywJosQBGLy0Chy5Ree8blFrJPNJrfV+u8e72K3BYni8IaphD15y2/Lb6c8d oYGqg0lBiVffA0dafJs2RinRvpnrrlissy0/qdn5IdvTIekdT//ST9NvsCrGwzPTLuDz 8+uMe1C1QfC52mmntsBZAjXfCaXzUYSfmmO6XYi1irjrDbfovKonx0mgtyU4yPp5ghtd tCxw== 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=eOu1KI7Hso2e/GDSxGFBosdiY3Bqk8zRJrvUK8bVCkE=; b=YZi3GmZYZTjNd72jlFjVaH9UlyfiMX1DA4lsH4URRhK49jECg0Bzr64sCxntFgQFp8 W8Mm69ihaqaEFmxiYqDV6+sbEv9Jl+t10Xpmi7dduN3kKtvRdl4T3fofrk2hyv+zw0w8 hI6tdC+GRpVI3vssctb2YSO7RsVaSuYkT+vsng0+2miYnANNPT917dR50XTPpEGtoS1I /Uf8YJPbr8lMZ/aGFjGQfRd30oXTYs7P4PDEfK7OhxGzInZ8nP+wRpHMVSgBNgD3em+P lF4gAeY5bct2/sAE9vhSedrObUUc6E5DXm7OX7EKD4ixQKcLRge0HZT+krz3omCSH3R1 Dr5A== 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 b9-20020a633409000000b00563938c58d1si3400625pga.270.2023.07.23.02.23.40; Sun, 23 Jul 2023 02:23:52 -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 S229959AbjGWIWr (ORCPT + 99 others); Sun, 23 Jul 2023 04:22:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229914AbjGWIWi (ORCPT ); Sun, 23 Jul 2023 04:22:38 -0400 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5428C10EC; Sun, 23 Jul 2023 01:22:32 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R751e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=20;SR=0;TI=SMTPD_---0Vnzn8WJ_1690100545; Received: from srmbuffer011165236051.sqa.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0Vnzn8WJ_1690100545) by smtp.aliyun-inc.com; Sun, 23 Jul 2023 16:22:26 +0800 From: Jing Zhang To: John Garry , Ian Rogers Cc: Will Deacon , Mark Rutland , Robin Murphy , James Clark , Mike Leach , Leo Yan , 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, linux-doc@vger.kernel.org, Zhuo Song , Jing Zhang , Shuai Xue Subject: [PATCH v4 4/4] perf vendor events: Add metrics for Arm CMN Date: Sun, 23 Jul 2023 16:21:53 +0800 Message-Id: <1690100513-61165-5-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1690100513-61165-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1690100513-61165-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_BLOCKED,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