From patchwork Mon Oct 31 11:11:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 13208 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2248114wru; Mon, 31 Oct 2022 04:14:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4DtckOw39jNEp2lH0yheIZ1Uu7Q0gqwUra6edrU0D1gOI9QTcI4HwuEIzaIEtG2YvYRh9x X-Received: by 2002:a05:6402:f8e:b0:461:8b1c:eb0c with SMTP id eh14-20020a0564020f8e00b004618b1ceb0cmr13615405edb.20.1667214887788; Mon, 31 Oct 2022 04:14:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667214887; cv=none; d=google.com; s=arc-20160816; b=A3NROocTrvDq8GQTF9+ZdVR5ReIFOUMpp0S67dxN4KA3RsRYh7vfxgjm/VgdzBY2VP LuoQI78dvodha4n+Z7lEn0xOFUHkMD6iXyxK3tG9v2BS7LWVqAV8mCgXlMz5tgRdKldn VsGxyz/0AkWwVKTGUaWifo6e32le0rsITaJ1/ExFVmOpD5793EM3+ZEi2UdctyMv4a5P h86vXDXxJUaMz/7cvfb2gEWhvgp+zOm4yk1H5UyVvIlRFKXUqLYBnY8qHfnmW4TMzzW5 ytBun8xgb1SDp4fjQ7treUxijL5DhxqyN7xCaLUMigp8R234c1nHGNzGxjVwHY+BX5im /5Gg== 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=ePE4mErru7f2FVA77zgO/BP1D5VSEZP877D7yK2/tsw=; b=Dr7ows5reAKFbWtpCFDMamrhrrSd4IIhvnbBgsjBQWMoko3yigOStAf8KtEofnisK3 FUbjLxtzw0M7FDuu/AbS/bDKqsdzgOwWSdCfDgJCr/+l15pFzXRXhR+JUOwJZsRP7fhr LGBsoCePQmAjqWzVcyvsQ446XSZEoyYEY4lhfXU6sZJ/3aqRit9Ei6fwFfEINicX4JoI QQBJQV7SKQBULPZHSVHG6mapWlu4dJIUicD0PvjTqjxQqutFI/cMBMpYl3Qip0W97n/z 5xr9Cq/MbhMNmCwsK5f8/xAEkNtBo9SRJhWtBMuQ4yaiwllur4N0cxtH3AkadNKj6V6A hy+g== 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 f7-20020a1709063f4700b007a31138203asi6624628ejj.669.2022.10.31.04.14.22; Mon, 31 Oct 2022 04:14:47 -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 S230337AbiJaLL5 (ORCPT + 99 others); Mon, 31 Oct 2022 07:11:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230202AbiJaLLs (ORCPT ); Mon, 31 Oct 2022 07:11:48 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E02ACB847; Mon, 31 Oct 2022 04:11:46 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;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=18;SR=0;TI=SMTPD_---0VTVxoIB_1667214703; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VTVxoIB_1667214703) by smtp.aliyun-inc.com; Mon, 31 Oct 2022 19:11:44 +0800 From: Jing Zhang To: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Kilroy , Shuai Xue , Zhuo Song Subject: [PATCH RFC 3/6] perf vendor events arm64: Add cache metrics for neoverse-n2 Date: Mon, 31 Oct 2022 19:11:31 +0800 Message-Id: <1667214694-89839-4-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1667214694-89839-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_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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748201517919403593?= X-GMAIL-MSGID: =?utf-8?q?1748201517919403593?= 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 066d905..2dc6d9e 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