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 32149C7EE23 for ; Wed, 31 May 2023 01:18:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231679AbjEaBSp (ORCPT ); Tue, 30 May 2023 21:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231656AbjEaBSp (ORCPT ); Tue, 30 May 2023 21:18:45 -0400 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6C2893 for ; Tue, 30 May 2023 18:18:43 -0700 (PDT) Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-3f81ffc9065so70321cf.1 for ; Tue, 30 May 2023 18:18:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1685495923; x=1688087923; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=t/440rAusAeUpV/6SFRM6ro/fzMxcj5z3RfTwHDSWIk=; b=ofrap42uHY1kcIMWlIrRBnPBJdHCBp7PZx/eDdkQkEOLQeHsO5n2lwBxiNLQonzYQP 6csgdVPSG9iEk+1O8AiKraYon7klPTFEXHYUbJ8KdMImWsh8ij/rrp9Cjf67GhmgqrdW 2wD5rcxfIhDM+v0v5HIdS8DiB0cnasA1OnfLtbHS9b/U90m7m/MxsdH6AHU3JEO+p8No UCQEYtJfQY2hRUd/VhLD2WuTq0qZprrIdEWla2Q+6BuvAJAAqht5LpzWmbJzBFzxymTj 7b2DfLkJM0UoavYv7e7pr3Bl6mv11jqfUpYqIqOA7IuZ4FWojxNpPa6Mlfje7BTmpARP Pzbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685495923; x=1688087923; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t/440rAusAeUpV/6SFRM6ro/fzMxcj5z3RfTwHDSWIk=; b=Pa2wN8MMsCceht3n2zdTbX3MxKt/rq0KWxr6L2Zdom/Mr19H3oZUT0hZbqeMcMyRBo ySmL55nI09WsxdV5JpJASwKP0f0r0S0ZUl9hJwgOHJCjs4vUfb1+7m5jtZlO/i/PHoj6 KJpjYz13VN9f2VwNk03PiyHKgWlNzt8IZYMeBKKbHY6kF/0uYFXXHHQP6ksdEj+Lkw9T uYpzaKzk3VJ0JleeEbmWS6XavT8j+GRbOeq9+4ZB6gg1pg9a5VOHrC0wYy5kw//AtgVJ LY2qZtaoDT1Zo6G46nxpy/EnqTmqqj3cNOwP9up9vyIgLuGwn9R7CrjMBLeDep8MqmoC HAeQ== X-Gm-Message-State: AC+VfDx+f0HXJa/bHwvDidcs/Xgg7u6HGGXP7swnSZutNi7+ja2vMRkt 7OW2AYhzejXzt5kB4epvEOIui7KNkr0Rk9OVYRpQAQ== X-Google-Smtp-Source: ACHHUZ53qL0eHvGHpgCG+aZKWKYTUXk+YE/m0LwUSL1A/Zlfrt5pD0LE2isEVsMVEmxU0ti3hK0qe45PcAMW6tulPLo= X-Received: by 2002:a05:622a:1816:b0:3f5:49b6:f18d with SMTP id t22-20020a05622a181600b003f549b6f18dmr30982qtc.11.1685495922645; Tue, 30 May 2023 18:18:42 -0700 (PDT) MIME-Version: 1.0 References: <1685438374-33287-1-git-send-email-renyu.zj@linux.alibaba.com> <1685438374-33287-4-git-send-email-renyu.zj@linux.alibaba.com> In-Reply-To: <1685438374-33287-4-git-send-email-renyu.zj@linux.alibaba.com> From: Ian Rogers Date: Tue, 30 May 2023 18:18:31 -0700 Message-ID: Subject: Re: [PATCH v3 3/7] perf vendor events: Add JSON metrics for CMN To: Jing Zhang Cc: John Garry , Will Deacon , Shuai Xue , Robin Murphy , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On Tue, May 30, 2023 at 2:19=E2=80=AFAM 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. > > 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 inc= lude.", Nit, partial sentence? > + "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 wh= ether 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.", Nit, inconsistent capitalization? > + "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 retrie= s 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 bandwi= dth(MB/sec) that RN-I bridge sends to the interconnect.", Nit, the MB/sec is in the ScaleUnit so could be dropped here. > + "MetricGroup": "arm_cmn", > + "MetricExpr": "rnid_rxdat_flits * 32 / 1e6 / duration_tim= e", > + "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.", Nit, same thing. > + "MetricGroup": "arm_cmn", > + "MetricExpr": "rnid_txdat_flits * 32 / 1e6 / duration_tim= e", > + "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 whe= ther the memory controller is the bottleneck.", > + "MetricGroup": "arm_cmn", > + "MetricExpr": "rnid_txreq_flits_retried / rnid_txreq_flit= s_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).= ", Nit, same thing. Thanks, Ian > + "MetricGroup": "arm_cmn", > + "MetricExpr": "sbsx_txdat_flitv * 32 / 1e6 / duration_tim= e", > + "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/jev= ents.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 >