Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6505053rwb; Mon, 14 Nov 2022 22:30:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf7ZA3Pnilz+fpMlF3acd3JSDpaWDLEeNQwxK9B01ZP3wmOcsM7E3nGsM1uHOcOkrk8Ryi2Y X-Received: by 2002:a17:90b:230e:b0:214:1a8a:a415 with SMTP id mt14-20020a17090b230e00b002141a8aa415mr674917pjb.197.1668493845311; Mon, 14 Nov 2022 22:30:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668493845; cv=none; d=google.com; s=arc-20160816; b=y8NQqZd+Xrxv3VMTP75CFo/02GUSl6/MI8tFregXexp/79uuTzI5RmLL27sQwKuPdK N1IhlElEmw+BzUb9bCWVIE0JtzpzIPsCltDb7rUL0pENF6QoRqYdsaJP+c4TN0xWelYm sJkP8SjhlnQhjirlpSJKWxSm6p53+wuUEyW6EsJLVfSBVjyY5/sm/FVrDbtFoMLbK+nv /4Qi3wy1qxNjsgjJKtLtZ2DS5Iy5WP2N6GRRwz0oDJZ2G81+WWL6Ij7Z1LwlUurT4vp5 MxS9L62MVH52RHcUg+ashh/F9ZEqUk+ZtqCz233fR7/hpe/spWNzr5pKeqRee4PQ0hDZ dTeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=m48YWjSdMkXRppXOTmuPySNXcU8EUCQfKUgaeleruQI=; b=gwdxjBeHWhfCoDY0alnf+nHrLoRXnjC+hCAx9192YwXOJgzy+hpXIw3u2KcTKy/D/J yV+zZ08X/DnKNdGhD710uk5SkZUTZA86rW8QkgV8zMfmW7wjglApbuSzA+8Bd/4z9JGD LA/o3EKxZEMuiwssZMZnDk2yuqz5DQyJ7TBFVjyef98zj8tWrwDX6cLKDNAW+WUEhNl6 8uTSKLJGUhTc+dpYL2fu60EL59NNFfpMuji/J6j365StAXbDo0duntl1rn3hYZktfaXV /EaBF0x+HUKZqZVJFgraVsBx3cqOF/LT76jp4tY+geESvG3tfcnpVEPNjNKHHRYQf5KK Q4sA== 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 o2-20020a17090ac70200b002006ace0cc4si15208480pjt.138.2022.11.14.22.30.33; Mon, 14 Nov 2022 22:30:45 -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 S231501AbiKOG2u (ORCPT + 89 others); Tue, 15 Nov 2022 01:28:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230033AbiKOG2f (ORCPT ); Tue, 15 Nov 2022 01:28:35 -0500 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECB729FF5; Mon, 14 Nov 2022 22:28:32 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R821e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0VUs.4Oo_1668493707; Received: from 30.221.131.168(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VUs.4Oo_1668493707) by smtp.aliyun-inc.com; Tue, 15 Nov 2022 14:28:29 +0800 Message-ID: Date: Tue, 15 Nov 2022 14:28:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [RFC PATCH v2 3/6] perf vendor events arm64: Add cache metrics for neoverse-n2 To: Xing Zhengjun , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Kilroy , Shuai Xue , Zhuo Song References: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> <1668411720-3581-4-git-send-email-renyu.zj@linux.alibaba.com> From: Jing Zhang In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, 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: X-Mailing-List: linux-kernel@vger.kernel.org 在 2022/11/14 下午4:35, Xing Zhengjun 写道: > > > On 11/14/2022 3:41 PM, Jing Zhang wrote: >> Add cache related metrics. >> >> Signed-off-by: Jing Zhang >> --- >>   .../arch/arm64/arm/neoverse-n2/metrics.json        | 77 ++++++++++++++++++++++ >>   1 file changed, 77 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 324ca12..1690ef6 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 >> @@ -54,5 +54,82 @@ >>           "BriefDescription": "The rate of DTLB Walks to the overall TLB lookups", >>           "MetricGroup": "TLB", >>           "MetricName": "dtlb_walk_rate" >> +    }, >> +    { >> +        "MetricExpr": "L1I_CACHE_REFILL / INST_RETIRED * 1000", >> +        "PublicDescription": "The rate of L1 I-Cache misses per kilo instructions", >> +        "BriefDescription": "The rate of L1 I-Cache misses per kilo instructions", >> +        "MetricGroup": "Cache", >> +        "MetricName": "l1i_cache_mpki" >> +    }, >> +    { >> +        "MetricExpr": "L1I_CACHE_REFILL / L1I_CACHE", >> +        "PublicDescription": "The rate of L1 I-Cache misses to the overall L1 I-Cache", >> +        "BriefDescription": "The rate of L1 I-Cache misses to the overall L1 I-Cache", >> +        "MetricGroup": "Cache", >> +        "MetricName": "l1i_cache_miss_rate" >> +    }, >> +    { >> +        "MetricExpr": "L1D_CACHE_REFILL / INST_RETIRED * 1000", >> +        "PublicDescription": "The rate of L1 D-Cache misses per kilo instructions", >> +        "BriefDescription": "The rate of L1 D-Cache misses per kilo instructions", >> +        "MetricGroup": "Cache", >> +        "MetricName": "l1d_cache_mpki" >> +    }, >> +    { >> +        "MetricExpr": "L1D_CACHE_REFILL / L1D_CACHE", >> +        "PublicDescription": "The rate of L1 D-Cache misses to the overall L1 D-Cache", >> +        "BriefDescription": "The rate of L1 D-Cache misses to the overall L1 D-Cache", >> +        "MetricGroup": "Cache", >> +        "MetricName": "l1d_cache_miss_rate" >> +    }, >> +    { >> +        "MetricExpr": "L2D_CACHE_REFILL / INST_RETIRED * 1000", >> +        "PublicDescription": "The rate of L2 D-Cache misses per kilo instructions", >> +        "BriefDescription": "The rate of L2 D-Cache misses per kilo instructions", >> +        "MetricGroup": "Cache", >> +        "MetricName": "l2d_cache_mpki" >> +    }, >> +    { >> +        "MetricExpr": "L2D_CACHE_REFILL / L2D_CACHE", >> +        "PublicDescription": "The rate of L2 D-Cache misses to the overall L2 D-Cache", >> +        "BriefDescription": "The rate of L2 D-Cache misses to the overall L2 D-Cache", >> +        "MetricGroup": "Cache", >> +        "MetricName": "l2d_cache_miss_rate" >> +    }, >> +    { >> +        "MetricExpr": "L3D_CACHE_REFILL / INST_RETIRED * 1000", >> +        "PublicDescription": "The rate of L3 D-Cache misses per kilo instructions", >> +        "BriefDescription": "The rate of L3 D-Cache misses per kilo instructions", >> +        "MetricGroup": "Cache", >> +        "MetricName": "l3d_cache_mpki" >> +    }, >> +    { >> +        "MetricExpr": "L3D_CACHE_REFILL / L3D_CACHE", >> +        "PublicDescription": "The rate of L3 D-Cache misses to the overall L3 D-Cache", >> +        "BriefDescription": "The rate of L3 D-Cache misses to the overall L3 D-Cache", >> +        "MetricGroup": "Cache", >> +        "MetricName": "l3d_cache_miss_rate" >> +    }, >> +    { >> +        "MetricExpr": "LL_CACHE_MISS_RD / INST_RETIRED * 1000", >> +        "PublicDescription": "The rate of LL Cache read misses per kilo instructions", >> +        "BriefDescription": "The rate of LL Cache read misses per kilo instructions", >> +        "MetricGroup": "Cache", >> +        "MetricName": "ll_cache_read_mpki" >> +    }, >> +    { >> +        "MetricExpr": "LL_CACHE_MISS_RD / LL_CACHE_RD", >> +        "PublicDescription": "The rate of LL Cache read misses to the overall LL Cache read", >> +        "BriefDescription": "The rate of LL Cache read misses to the overall LL Cache read", >> +        "MetricGroup": "Cache", >> +        "MetricName": "ll_cache_read_miss_rate" >> +    }, >> +    { >> +        "MetricExpr": "(LL_CACHE_RD - LL_CACHE_MISS_RD) / LL_CACHE_RD", >> +        "PublicDescription": "The rate of LL Cache read hit to the overall LL Cache read", >> +        "BriefDescription": "The rate of LL Cache read hit to the overall LL Cache read", >> +        "MetricGroup": "Cache", >> +        "MetricName": "ll_cache_read_hit_rate" >>       } >>   ] >> \ No newline at end of file > > It is better to fix this by adding a newline at the end of the file. > OK, thanks for pointing it out.