Message ID | 1672745976-2800146-3-git-send-email-renyu.zj@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4565902wrt; Tue, 3 Jan 2023 03:42:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXuUGYmQyyykUxhO+TaLr1Pvlo6+4nKyx6Ucj8KJPbaPksrYOiFrqu16I2CwTFGSUXY/qYf6 X-Received: by 2002:a17:907:a0cc:b0:78d:f454:37a6 with SMTP id hw12-20020a170907a0cc00b0078df45437a6mr38646388ejc.73.1672746173852; Tue, 03 Jan 2023 03:42:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672746173; cv=none; d=google.com; s=arc-20160816; b=VPZ9fSGFYA/8MrlVF3FiyCJrtJcQLFSrAsPSsH5ZnB70gkrbYDxuEJTZ76zzyT+PLW 1WJyWVE+Gcs+J169AW6hMjXdrhqZu9SpZxA4cqwqnTqHnmalRUMFQtZWp/POSpn/1XFZ 57zl/pMXwHJsP5ntk1+ICp2WSD2pOQTXPGmovsACnCVF3tgUcd0Qpu4ojXx7efKy1AJc AMR47IlZW0KHoVaaSXccFONrOIv1jeT+VgCQA3YwAKRfPvIzHQjSfE9mH900sX4bCAHa jK1S+4EsHKUApF4MlfeF25Ppw2DUi+OBUOJkGw5qH1B32C9n7fs81j52NrlUSXORIsVn jSkg== 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=oj5gGgXKRwSYSgxEShu9KdrFj/erZsD1w7H6dFlVLoM=; b=elHRDUg9WzGLX6b1xdU2hSj8TVYCDVtZPP9RrrRG0Iwj97gmumz6ak9d7spMaWw8Ji 7IjTOgqRRwqXiVQ3lvI+iyVuJ1yICcRCfb3unpxJRTdja2euKAbE5gNv4bMNtkqp7qTv JPlT9gY4GwaxlfI3Ud9H0+nlMTxIW8Uy8IJ27JZzUhn9MVESNmQOuLPF0g4Xn+KpLjon 9uDIdeVCVmg5MbNzR4ZEsJ12L4K01IB65VrwVyia2qjahl6YB2gzfiXZRIiwp5q9Dbff USJxDK4Sdra2NZ9aoT50mYeA9hkaCAbeFt7Dxm1Woosg5/SBx2Rm4A4qG9wzupGK/zE5 qB+w== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hw20-20020a170907a0d400b007ae1052554esi20735896ejc.898.2023.01.03.03.42.30; Tue, 03 Jan 2023 03:42:53 -0800 (PST) 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 S237236AbjACLkL (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Tue, 3 Jan 2023 06:40:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233103AbjACLj7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Jan 2023 06:39:59 -0500 Received: from out30-6.freemail.mail.aliyun.com (out30-6.freemail.mail.aliyun.com [115.124.30.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95DADBD7; Tue, 3 Jan 2023 03:39:56 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0VYn6ldB_1672745991; Received: from srmbuffer011165236051.sqa.eu95(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VYn6ldB_1672745991) by smtp.aliyun-inc.com; Tue, 03 Jan 2023 19:39:52 +0800 From: Jing Zhang <renyu.zj@linux.alibaba.com> To: John Garry <john.g.garry@oracle.com>, Ian Rogers <irogers@google.com>, Xing Zhengjun <zhengjun.xing@linux.intel.com>, Will Deacon <will@kernel.org>, James Clark <james.clark@arm.com>, Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linaro.org> Cc: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Andrew Kilroy <andrew.kilroy@arm.com>, Shuai Xue <xueshuai@linux.alibaba.com>, Zhuo Song <zhuo.song@linux.alibaba.com>, Jing Zhang <renyu.zj@linux.alibaba.com> Subject: [PATCH v5 2/6] perf vendor events arm64: Add TLB metrics for neoverse-n2 Date: Tue, 3 Jan 2023 19:39:32 +0800 Message-Id: <1672745976-2800146-3-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1672745976-2800146-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1672745976-2800146-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_MSPIKE_H2,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754001491781099539?= X-GMAIL-MSGID: =?utf-8?q?1754001491781099539?= |
Series |
Add metrics for neoverse-n2
|
|
Commit Message
Jing Zhang
Jan. 3, 2023, 11:39 a.m. UTC
Add TLB related metrics. Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com> Acked-by: Ian Rogers <irogers@google.com> --- .../arch/arm64/arm/neoverse-n2/metrics.json | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+)
Comments
On Tue, Jan 3, 2023 at 3:39 AM Jing Zhang <renyu.zj@linux.alibaba.com> wrote: > > Add TLB related metrics. > > Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com> > Acked-by: Ian Rogers <irogers@google.com> > --- > .../arch/arm64/arm/neoverse-n2/metrics.json | 49 ++++++++++++++++++++++ > 1 file changed, 49 insertions(+) > > diff --git a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json > index c126f1bc..8a74e07 100644 > --- a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json > +++ b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json > @@ -26,5 +26,54 @@ > "MetricGroup": "TopdownL1", > "MetricName": "backend_bound", > "ScaleUnit": "100%" > + }, > + { > + "MetricExpr": "L1D_TLB_REFILL / L1D_TLB", > + "BriefDescription": "The rate of L1D TLB refill to the overall L1D TLB lookups", > + "MetricGroup": "TLB", > + "MetricName": "l1d_tlb_miss_rate", > + "ScaleUnit": "100%" > + }, > + { > + "MetricExpr": "L1I_TLB_REFILL / L1I_TLB", > + "BriefDescription": "The rate of L1I TLB refill to the overall L1I TLB lookups", > + "MetricGroup": "TLB", > + "MetricName": "l1i_tlb_miss_rate", > + "ScaleUnit": "100%" > + }, > + { > + "MetricExpr": "L2D_TLB_REFILL / L2D_TLB", > + "BriefDescription": "The rate of L2D TLB refill to the overall L2D TLB lookups", > + "MetricGroup": "TLB", > + "MetricName": "l2_tlb_miss_rate", > + "ScaleUnit": "100%" > + }, > + { > + "MetricExpr": "DTLB_WALK / INST_RETIRED * 1000", > + "BriefDescription": "The rate of TLB Walks per kilo instructions for data accesses", > + "MetricGroup": "TLB", > + "MetricName": "dtlb_mpki", > + "ScaleUnit": "MPKI" > + }, > + { > + "MetricExpr": "DTLB_WALK / L1D_TLB", > + "BriefDescription": "The rate of DTLB Walks to the overall L1D TLB lookups", > + "MetricGroup": "TLB", > + "MetricName": "dtlb_walk_rate", > + "ScaleUnit": "100%" > + }, > + { > + "MetricExpr": "ITLB_WALK / INST_RETIRED * 1000", > + "BriefDescription": "The rate of TLB Walks per kilo instructions for instruction accesses", > + "MetricGroup": "TLB", > + "MetricName": "itlb_mpki", > + "ScaleUnit": "MPKI" Did you test this? IIRC if there is no number in the ScaleUnit then the scale factor becomes 0 and the metric value is always multiplied by zero. Perhaps: "MetricName": "itlb_miss_rate", "MetricExpr": "ITLB / INST_RETIRED" "ScaleUnit": "1000MPKI" Thanks, Ian > + }, > + { > + "MetricExpr": "ITLB_WALK / L1I_TLB", > + "BriefDescription": "The rate of ITLB Walks to the overall L1I TLB lookups", > + "MetricGroup": "TLB", > + "MetricName": "itlb_walk_rate", > + "ScaleUnit": "100%" > } > ] > -- > 1.8.3.1 >
在 2023/1/4 上午1:14, Ian Rogers 写道: > On Tue, Jan 3, 2023 at 3:39 AM Jing Zhang <renyu.zj@linux.alibaba.com> wrote: >> >> Add TLB related metrics. >> >> Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com> >> Acked-by: Ian Rogers <irogers@google.com> >> --- >> .../arch/arm64/arm/neoverse-n2/metrics.json | 49 ++++++++++++++++++++++ >> 1 file changed, 49 insertions(+) >> >> diff --git a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json >> index c126f1bc..8a74e07 100644 >> --- a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json >> +++ b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json >> @@ -26,5 +26,54 @@ >> "MetricGroup": "TopdownL1", >> "MetricName": "backend_bound", >> "ScaleUnit": "100%" >> + }, >> + { >> + "MetricExpr": "L1D_TLB_REFILL / L1D_TLB", >> + "BriefDescription": "The rate of L1D TLB refill to the overall L1D TLB lookups", >> + "MetricGroup": "TLB", >> + "MetricName": "l1d_tlb_miss_rate", >> + "ScaleUnit": "100%" >> + }, >> + { >> + "MetricExpr": "L1I_TLB_REFILL / L1I_TLB", >> + "BriefDescription": "The rate of L1I TLB refill to the overall L1I TLB lookups", >> + "MetricGroup": "TLB", >> + "MetricName": "l1i_tlb_miss_rate", >> + "ScaleUnit": "100%" >> + }, >> + { >> + "MetricExpr": "L2D_TLB_REFILL / L2D_TLB", >> + "BriefDescription": "The rate of L2D TLB refill to the overall L2D TLB lookups", >> + "MetricGroup": "TLB", >> + "MetricName": "l2_tlb_miss_rate", >> + "ScaleUnit": "100%" >> + }, >> + { >> + "MetricExpr": "DTLB_WALK / INST_RETIRED * 1000", >> + "BriefDescription": "The rate of TLB Walks per kilo instructions for data accesses", >> + "MetricGroup": "TLB", >> + "MetricName": "dtlb_mpki", >> + "ScaleUnit": "MPKI" >> + }, >> + { >> + "MetricExpr": "DTLB_WALK / L1D_TLB", >> + "BriefDescription": "The rate of DTLB Walks to the overall L1D TLB lookups", >> + "MetricGroup": "TLB", >> + "MetricName": "dtlb_walk_rate", >> + "ScaleUnit": "100%" >> + }, >> + { >> + "MetricExpr": "ITLB_WALK / INST_RETIRED * 1000", >> + "BriefDescription": "The rate of TLB Walks per kilo instructions for instruction accesses", >> + "MetricGroup": "TLB", >> + "MetricName": "itlb_mpki", >> + "ScaleUnit": "MPKI" > > Did you test this? IIRC if there is no number in the ScaleUnit then > the scale factor becomes 0 and the metric value is always multiplied > by zero. Perhaps: > > "MetricName": "itlb_miss_rate", > "MetricExpr": "ITLB / INST_RETIRED" > "ScaleUnit": "1000MPKI" > > Thanks, > Ian > You are absolutely right, I only tested TLB metrics. Sorry for not double checking. I will repost the corrected patches. >> + }, >> + { >> + "MetricExpr": "ITLB_WALK / L1I_TLB", >> + "BriefDescription": "The rate of ITLB Walks to the overall L1I TLB lookups", >> + "MetricGroup": "TLB", >> + "MetricName": "itlb_walk_rate", >> + "ScaleUnit": "100%" >> } >> ] >> -- >> 1.8.3.1 >>
在 2023/1/4 下午1:21, Jing Zhang 写道: > > > 在 2023/1/4 上午1:14, Ian Rogers 写道: >> On Tue, Jan 3, 2023 at 3:39 AM Jing Zhang <renyu.zj@linux.alibaba.com> wrote: >>> >>> Add TLB related metrics. >>> >>> Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com> >>> Acked-by: Ian Rogers <irogers@google.com> >>> --- >>> .../arch/arm64/arm/neoverse-n2/metrics.json | 49 ++++++++++++++++++++++ >>> 1 file changed, 49 insertions(+) >>> >>> diff --git a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json >>> index c126f1bc..8a74e07 100644 >>> --- a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json >>> +++ b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json >>> @@ -26,5 +26,54 @@ >>> "MetricGroup": "TopdownL1", >>> "MetricName": "backend_bound", >>> "ScaleUnit": "100%" >>> + }, >>> + { >>> + "MetricExpr": "L1D_TLB_REFILL / L1D_TLB", >>> + "BriefDescription": "The rate of L1D TLB refill to the overall L1D TLB lookups", >>> + "MetricGroup": "TLB", >>> + "MetricName": "l1d_tlb_miss_rate", >>> + "ScaleUnit": "100%" >>> + }, >>> + { >>> + "MetricExpr": "L1I_TLB_REFILL / L1I_TLB", >>> + "BriefDescription": "The rate of L1I TLB refill to the overall L1I TLB lookups", >>> + "MetricGroup": "TLB", >>> + "MetricName": "l1i_tlb_miss_rate", >>> + "ScaleUnit": "100%" >>> + }, >>> + { >>> + "MetricExpr": "L2D_TLB_REFILL / L2D_TLB", >>> + "BriefDescription": "The rate of L2D TLB refill to the overall L2D TLB lookups", >>> + "MetricGroup": "TLB", >>> + "MetricName": "l2_tlb_miss_rate", >>> + "ScaleUnit": "100%" >>> + }, >>> + { >>> + "MetricExpr": "DTLB_WALK / INST_RETIRED * 1000", >>> + "BriefDescription": "The rate of TLB Walks per kilo instructions for data accesses", >>> + "MetricGroup": "TLB", >>> + "MetricName": "dtlb_mpki", >>> + "ScaleUnit": "MPKI" >>> + }, >>> + { >>> + "MetricExpr": "DTLB_WALK / L1D_TLB", >>> + "BriefDescription": "The rate of DTLB Walks to the overall L1D TLB lookups", >>> + "MetricGroup": "TLB", >>> + "MetricName": "dtlb_walk_rate", >>> + "ScaleUnit": "100%" >>> + }, >>> + { >>> + "MetricExpr": "ITLB_WALK / INST_RETIRED * 1000", >>> + "BriefDescription": "The rate of TLB Walks per kilo instructions for instruction accesses", >>> + "MetricGroup": "TLB", >>> + "MetricName": "itlb_mpki", >>> + "ScaleUnit": "MPKI" >> >> Did you test this? IIRC if there is no number in the ScaleUnit then >> the scale factor becomes 0 and the metric value is always multiplied >> by zero. Perhaps: >> >> "MetricName": "itlb_miss_rate", >> "MetricExpr": "ITLB / INST_RETIRED" >> "ScaleUnit": "1000MPKI" >> >> Thanks, >> Ian >> > > You are absolutely right, I only tested TLB metrics. Sorry for not double checking. I will repost the corrected patches. > I rethought it. I want to change the ScaleUnit to "1MPKI" and keep the MetricExpr multiplied by 1000, so that the "MetricExpr" expresses the value of per kilo instruciton, which can be consistent with the description in "BriefDescription". Like: { "MetricExpr": "DTLB_WALK / INST_RETIRED * 1000", "BriefDescription": "The rate of TLB Walks per kilo instructions for data accesses", "MetricGroup": "TLB", "MetricName": "dtlb_mpki", "ScaleUnit": "1MPKI" }, In addition, I think it is more reasonable for ScaleUnit to have a default scale factor of 1 when there is no number. I want to try to fix this bug. Ian, what's your opnion? >>> + }, >>> + { >>> + "MetricExpr": "ITLB_WALK / L1I_TLB", >>> + "BriefDescription": "The rate of ITLB Walks to the overall L1I TLB lookups", >>> + "MetricGroup": "TLB", >>> + "MetricName": "itlb_walk_rate", >>> + "ScaleUnit": "100%" >>> } >>> ] >>> -- >>> 1.8.3.1 >>>
On Wed, Jan 4, 2023 at 12:40 AM Jing Zhang <renyu.zj@linux.alibaba.com> wrote: > > > > 在 2023/1/4 下午1:21, Jing Zhang 写道: > > > > > > 在 2023/1/4 上午1:14, Ian Rogers 写道: > >> On Tue, Jan 3, 2023 at 3:39 AM Jing Zhang <renyu.zj@linux.alibaba.com> wrote: > >>> > >>> Add TLB related metrics. > >>> > >>> Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com> > >>> Acked-by: Ian Rogers <irogers@google.com> > >>> --- > >>> .../arch/arm64/arm/neoverse-n2/metrics.json | 49 ++++++++++++++++++++++ > >>> 1 file changed, 49 insertions(+) > >>> > >>> diff --git a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json > >>> index c126f1bc..8a74e07 100644 > >>> --- a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json > >>> +++ b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json > >>> @@ -26,5 +26,54 @@ > >>> "MetricGroup": "TopdownL1", > >>> "MetricName": "backend_bound", > >>> "ScaleUnit": "100%" > >>> + }, > >>> + { > >>> + "MetricExpr": "L1D_TLB_REFILL / L1D_TLB", > >>> + "BriefDescription": "The rate of L1D TLB refill to the overall L1D TLB lookups", > >>> + "MetricGroup": "TLB", > >>> + "MetricName": "l1d_tlb_miss_rate", > >>> + "ScaleUnit": "100%" > >>> + }, > >>> + { > >>> + "MetricExpr": "L1I_TLB_REFILL / L1I_TLB", > >>> + "BriefDescription": "The rate of L1I TLB refill to the overall L1I TLB lookups", > >>> + "MetricGroup": "TLB", > >>> + "MetricName": "l1i_tlb_miss_rate", > >>> + "ScaleUnit": "100%" > >>> + }, > >>> + { > >>> + "MetricExpr": "L2D_TLB_REFILL / L2D_TLB", > >>> + "BriefDescription": "The rate of L2D TLB refill to the overall L2D TLB lookups", > >>> + "MetricGroup": "TLB", > >>> + "MetricName": "l2_tlb_miss_rate", > >>> + "ScaleUnit": "100%" > >>> + }, > >>> + { > >>> + "MetricExpr": "DTLB_WALK / INST_RETIRED * 1000", > >>> + "BriefDescription": "The rate of TLB Walks per kilo instructions for data accesses", > >>> + "MetricGroup": "TLB", > >>> + "MetricName": "dtlb_mpki", > >>> + "ScaleUnit": "MPKI" > >>> + }, > >>> + { > >>> + "MetricExpr": "DTLB_WALK / L1D_TLB", > >>> + "BriefDescription": "The rate of DTLB Walks to the overall L1D TLB lookups", > >>> + "MetricGroup": "TLB", > >>> + "MetricName": "dtlb_walk_rate", > >>> + "ScaleUnit": "100%" > >>> + }, > >>> + { > >>> + "MetricExpr": "ITLB_WALK / INST_RETIRED * 1000", > >>> + "BriefDescription": "The rate of TLB Walks per kilo instructions for instruction accesses", > >>> + "MetricGroup": "TLB", > >>> + "MetricName": "itlb_mpki", > >>> + "ScaleUnit": "MPKI" > >> > >> Did you test this? IIRC if there is no number in the ScaleUnit then > >> the scale factor becomes 0 and the metric value is always multiplied > >> by zero. Perhaps: > >> > >> "MetricName": "itlb_miss_rate", > >> "MetricExpr": "ITLB / INST_RETIRED" > >> "ScaleUnit": "1000MPKI" > >> > >> Thanks, > >> Ian > >> > > > > You are absolutely right, I only tested TLB metrics. Sorry for not double checking. I will repost the corrected patches. > > > > I rethought it. I want to change the ScaleUnit to "1MPKI" and keep the MetricExpr multiplied by 1000, > so that the "MetricExpr" expresses the value of per kilo instruciton, which can be consistent with the > description in "BriefDescription". Like: > { > "MetricExpr": "DTLB_WALK / INST_RETIRED * 1000", > "BriefDescription": "The rate of TLB Walks per kilo instructions for data accesses", > "MetricGroup": "TLB", > "MetricName": "dtlb_mpki", > "ScaleUnit": "1MPKI" > }, > > > In addition, I think it is more reasonable for ScaleUnit to have a default scale factor of 1 when there > is no number. I want to try to fix this bug. > > Ian, what's your opnion? I like intention revealing, itlb_mpki is something of a soup of characters to de-acronym-ify compared to itlb_miss_rate, but rate may not be completely intuitive in that name. I'm happy to follow your lead. Putting the 1000 in the ScaleUnit or the expression doesn't matter, so again happy to follow what you think is best. Thanks, Ian > >>> + }, > >>> + { > >>> + "MetricExpr": "ITLB_WALK / L1I_TLB", > >>> + "BriefDescription": "The rate of ITLB Walks to the overall L1I TLB lookups", > >>> + "MetricGroup": "TLB", > >>> + "MetricName": "itlb_walk_rate", > >>> + "ScaleUnit": "100%" > >>> } > >>> ] > >>> -- > >>> 1.8.3.1 > >>>
diff --git a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json index c126f1bc..8a74e07 100644 --- a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json +++ b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json @@ -26,5 +26,54 @@ "MetricGroup": "TopdownL1", "MetricName": "backend_bound", "ScaleUnit": "100%" + }, + { + "MetricExpr": "L1D_TLB_REFILL / L1D_TLB", + "BriefDescription": "The rate of L1D TLB refill to the overall L1D TLB lookups", + "MetricGroup": "TLB", + "MetricName": "l1d_tlb_miss_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "L1I_TLB_REFILL / L1I_TLB", + "BriefDescription": "The rate of L1I TLB refill to the overall L1I TLB lookups", + "MetricGroup": "TLB", + "MetricName": "l1i_tlb_miss_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "L2D_TLB_REFILL / L2D_TLB", + "BriefDescription": "The rate of L2D TLB refill to the overall L2D TLB lookups", + "MetricGroup": "TLB", + "MetricName": "l2_tlb_miss_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "DTLB_WALK / INST_RETIRED * 1000", + "BriefDescription": "The rate of TLB Walks per kilo instructions for data accesses", + "MetricGroup": "TLB", + "MetricName": "dtlb_mpki", + "ScaleUnit": "MPKI" + }, + { + "MetricExpr": "DTLB_WALK / L1D_TLB", + "BriefDescription": "The rate of DTLB Walks to the overall L1D TLB lookups", + "MetricGroup": "TLB", + "MetricName": "dtlb_walk_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "ITLB_WALK / INST_RETIRED * 1000", + "BriefDescription": "The rate of TLB Walks per kilo instructions for instruction accesses", + "MetricGroup": "TLB", + "MetricName": "itlb_mpki", + "ScaleUnit": "MPKI" + }, + { + "MetricExpr": "ITLB_WALK / L1I_TLB", + "BriefDescription": "The rate of ITLB Walks to the overall L1I TLB lookups", + "MetricGroup": "TLB", + "MetricName": "itlb_walk_rate", + "ScaleUnit": "100%" } ]