Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2682803rwb; Mon, 7 Aug 2023 01:26:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEeSBClwm/u6LYc0gh/LWLZmSDfWBtDsawoXoCUPDhyKptzWU28hzD/gcdLhZTwMR+uVNTP X-Received: by 2002:a17:902:d511:b0:1b8:5ab2:49a4 with SMTP id b17-20020a170902d51100b001b85ab249a4mr8379273plg.53.1691396773045; Mon, 07 Aug 2023 01:26:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691396773; cv=none; d=google.com; s=arc-20160816; b=ZuX0/4xAk9DsWCJnwraboDt33NK+zoE9qZ4ykwgUwmfUA5E11QnPnTCcx4KNvQyBC3 VKjfMvyptd+f02YDs2LRdIjJ+4gVhPy3SS2ivf4vmHj7vEChcvuL/BYeVddkN/qtlw46 Exb7oZBNmMOCCgH/JjRs9kyYzInto/Yl6ByYopPLO6ln0Yod/jIdBkKRWLIhsOFYIAyq IPefWz1BYMN9ZggoapbCTp3wfboLBSNEwG/KZ1jlkQHAGOm8S4c9NPoWO6RpXp80B4Wu bepUHmh20/A+CdNhXCX1FDDEt2ecIW3qY+pvcKzyURDxcLtlvufJaTxfVQ5KnMPYX8DK gipw== 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=iaDeZPJjv2BweBfsJSwWbtnKi9lUY9VVnKvosaZtW8A=; fh=7pF9AUGuuVLtftwWy2EJKaooMcBit4LAHr6bHM40jlQ=; b=PAlDLmrZjvjFH3MVwl0KJNHkyCF3slmosWKPJ5PnYvU9iO4FRPoRMUV9/+lpMd7Mnq d8xqyCEXeyayUCyt8pKIIOz/aOW1C+bIMDej4DUXKonwZLA7zHnrboWfQi09BEIpQJRS OjH0i8l8/QvlcaGUdIf5N5YF9jOaBOY8NIgCOdHxn2Pj29uv/tVKABZO2XB6SmP5M10l pc7rFq+jOefBlyaXIY4XvFrRvyfvuNvHC597xHFqrdlNv1JRQ4l9yGGJy/8lCEBp7nt6 +xVL99BOm6eRRLHPTP7m1s08zbG5eSuG+TccTZubl0AnTXuYXQ2UlOpVOsKjJcuc6wIf cioA== 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 n13-20020a170902e54d00b001b3d6c68bd1si5424103plf.643.2023.08.07.01.26.01; Mon, 07 Aug 2023 01:26:13 -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 S231326AbjHGHwZ (ORCPT + 99 others); Mon, 7 Aug 2023 03:52:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231345AbjHGHvt (ORCPT ); Mon, 7 Aug 2023 03:51:49 -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 E7F7A172C; Mon, 7 Aug 2023 00:51:46 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;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=21;SR=0;TI=SMTPD_---0VpC-05s_1691394701; Received: from srmbuffer011165236051.sqa.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VpC-05s_1691394701) by smtp.aliyun-inc.com; Mon, 07 Aug 2023 15:51:41 +0800 From: Jing Zhang To: John Garry , Ian Rogers Cc: Will Deacon , James Clark , Arnaldo Carvalho de Melo , Mark Rutland , Mike Leach , Leo Yan , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , 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 v6 7/7] perf vendor events: Add JSON metrics for Arm CMN Date: Mon, 7 Aug 2023 15:51:25 +0800 Message-Id: <1691394685-61240-8-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1691394685-61240-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1691394685-61240-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, 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 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*" + } +] -- 1.8.3.1