From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32B6AC7EE23 for ; Wed, 31 May 2023 02:43:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232212AbjEaCnr (ORCPT ); Tue, 30 May 2023 22:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231417AbjEaCnq (ORCPT ); Tue, 30 May 2023 22:43:46 -0400 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A03FC9; Tue, 30 May 2023 19:43:44 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0VjvZIFf_1685501018; Received: from 30.240.113.228(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0VjvZIFf_1685501018) by smtp.aliyun-inc.com; Wed, 31 May 2023 10:43:40 +0800 Message-ID: Date: Wed, 31 May 2023 10:43:36 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.1 Subject: Re: [PATCH v3 3/7] perf vendor events: Add JSON metrics for CMN Content-Language: en-US To: Jing Zhang , John Garry , Ian Rogers , Will Deacon , Robin Murphy 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 References: <1685438374-33287-1-git-send-email-renyu.zj@linux.alibaba.com> <1685438374-33287-4-git-send-email-renyu.zj@linux.alibaba.com> From: Shuai Xue In-Reply-To: <1685438374-33287-4-git-send-email-renyu.zj@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On 2023/5/30 17:19, Jing Zhang wrote: > Add JSON metrics for arm CMN. Currently just add part of CMN PMU > metrics which are general and compatible for any SoC and CMN-ANY. Is it a typo? You mean "any SoC integration with CMN-ANY" right? Thanks, Shuai > > Signed-off-by: Jing Zhang > --- > .../pmu-events/arch/arm64/arm/cmn/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/cmn/sys/metrics.json > > diff --git a/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json > new file mode 100644 > index 0000000..e70ac1a > --- /dev/null > +++ b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json > @@ -0,0 +1,74 @@ > +[ > + { > + "MetricName": "slc_miss_rate", > + "BriefDescription": "The system level cache miss rate include.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "hnf_cache_miss / hnf_slc_sf_cache_access", > + "ScaleUnit": "100%", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "hnf_message_retry_rate", > + "BriefDescription": "HN-F message retry rate indicates whether a lack of credits is causing the bottlenecks.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "hnf_pocq_retry / hnf_pocq_reqs_recvd", > + "ScaleUnit": "100%", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "sf_hit_rate", > + "BriefDescription": "Snoop filter hit rate can be used to measure the Snoop Filter efficiency.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "hnf_sf_hit / hnf_slc_sf_cache_access", > + "ScaleUnit": "100%", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "mc_message_retry_rate", > + "BriefDescription": "The memory controller request retries rate indicates whether the memory controller is the bottleneck.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "hnf_mc_retries / hnf_mc_reqs", > + "ScaleUnit": "100%", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "rni_actual_read_bandwidth.all", > + "BriefDescription": "This event measure the actual bandwidth(MB/sec) that RN-I bridge sends to the interconnect.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "rnid_rxdat_flits * 32 / 1e6 / duration_time", > + "ScaleUnit": "1MB/s", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "rni_actual_write_bandwidth.all", > + "BriefDescription": "This event measures the actual write bandwidth(MB/sec) at RN-I bridges.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "rnid_txdat_flits * 32 / 1e6 / duration_time", > + "ScaleUnit": "1MB/s", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "rni_retry_rate", > + "BriefDescription": "RN-I bridge retry rate indicates whether the memory controller is the bottleneck.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "rnid_txreq_flits_retried / rnid_txreq_flits_total", > + "ScaleUnit": "100%", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "sbsx_actual_write_bandwidth.all", > + "BriefDescription": "sbsx actual write bandwidth(MB/sec).", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "sbsx_txdat_flitv * 32 / 1e6 / duration_time", > + "ScaleUnit": "1MB/s", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + } > +] > 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()}' > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4B470C77B7A for ; Wed, 31 May 2023 02:44:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n6KV3+frSPwJyTd1hFfRv/tp0LrD73b92qWJOKBwdcE=; b=G0Jj7COIKJ57NZ mzSAXINuxcaNQ5XtEHyIX3f5AteWd3t5KAidBnadehjs90vKAPbwdf2F5owF0VMAPXyMSYrU7B/05 MkWe4lNKqH6FOLKUbp8PSeP3aWWarTh7qDDEdB2hjtYlzefdkYw5P7ZMwq0k0ombHjnjfizIGA5Y2 UTFeuSYkUHcLv4U8HgHu6Pkfle/i9Jga3kIOPTleBCuVxE2/lZhHpRS3hpAWU7ysqgvtGCSo6MA70 MH/CfI93lLF8jcpTKcLE76fwiBEvjbt7pCsL7Lr8KwGbCtCkqsaW5YBwTzGZV8JWeoDMBdmW1HSTs /rdg8GFb0EACyrLWdxdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q4BoV-00FpCl-2E; Wed, 31 May 2023 02:43:51 +0000 Received: from out30-110.freemail.mail.aliyun.com ([115.124.30.110]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q4BoS-00FpAs-0R for linux-arm-kernel@lists.infradead.org; Wed, 31 May 2023 02:43:49 +0000 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0VjvZIFf_1685501018; Received: from 30.240.113.228(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0VjvZIFf_1685501018) by smtp.aliyun-inc.com; Wed, 31 May 2023 10:43:40 +0800 Message-ID: Date: Wed, 31 May 2023 10:43:36 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.1 Subject: Re: [PATCH v3 3/7] perf vendor events: Add JSON metrics for CMN Content-Language: en-US To: Jing Zhang , John Garry , Ian Rogers , Will Deacon , Robin Murphy 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 References: <1685438374-33287-1-git-send-email-renyu.zj@linux.alibaba.com> <1685438374-33287-4-git-send-email-renyu.zj@linux.alibaba.com> From: Shuai Xue In-Reply-To: <1685438374-33287-4-git-send-email-renyu.zj@linux.alibaba.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230530_194348_379510_8394AD4B X-CRM114-Status: GOOD ( 17.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2023/5/30 17:19, Jing Zhang wrote: > Add JSON metrics for arm CMN. Currently just add part of CMN PMU > metrics which are general and compatible for any SoC and CMN-ANY. Is it a typo? You mean "any SoC integration with CMN-ANY" right? Thanks, Shuai > > Signed-off-by: Jing Zhang > --- > .../pmu-events/arch/arm64/arm/cmn/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/cmn/sys/metrics.json > > diff --git a/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json > new file mode 100644 > index 0000000..e70ac1a > --- /dev/null > +++ b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json > @@ -0,0 +1,74 @@ > +[ > + { > + "MetricName": "slc_miss_rate", > + "BriefDescription": "The system level cache miss rate include.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "hnf_cache_miss / hnf_slc_sf_cache_access", > + "ScaleUnit": "100%", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "hnf_message_retry_rate", > + "BriefDescription": "HN-F message retry rate indicates whether a lack of credits is causing the bottlenecks.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "hnf_pocq_retry / hnf_pocq_reqs_recvd", > + "ScaleUnit": "100%", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "sf_hit_rate", > + "BriefDescription": "Snoop filter hit rate can be used to measure the Snoop Filter efficiency.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "hnf_sf_hit / hnf_slc_sf_cache_access", > + "ScaleUnit": "100%", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "mc_message_retry_rate", > + "BriefDescription": "The memory controller request retries rate indicates whether the memory controller is the bottleneck.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "hnf_mc_retries / hnf_mc_reqs", > + "ScaleUnit": "100%", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "rni_actual_read_bandwidth.all", > + "BriefDescription": "This event measure the actual bandwidth(MB/sec) that RN-I bridge sends to the interconnect.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "rnid_rxdat_flits * 32 / 1e6 / duration_time", > + "ScaleUnit": "1MB/s", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "rni_actual_write_bandwidth.all", > + "BriefDescription": "This event measures the actual write bandwidth(MB/sec) at RN-I bridges.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "rnid_txdat_flits * 32 / 1e6 / duration_time", > + "ScaleUnit": "1MB/s", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "rni_retry_rate", > + "BriefDescription": "RN-I bridge retry rate indicates whether the memory controller is the bottleneck.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "rnid_txreq_flits_retried / rnid_txreq_flits_total", > + "ScaleUnit": "100%", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + }, > + { > + "MetricName": "sbsx_actual_write_bandwidth.all", > + "BriefDescription": "sbsx actual write bandwidth(MB/sec).", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "sbsx_txdat_flitv * 32 / 1e6 / duration_time", > + "ScaleUnit": "1MB/s", > + "Unit": "arm_cmn", > + "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700" > + } > +] > 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()}' > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel