From patchwork Fri Dec 23 12:37:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 36260 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp296606wrn; Fri, 23 Dec 2022 04:43:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXvaiSOUO0Iog86YQSk5MhMrDP8p2bCO1eHqG/ly3XxqS7kCQrX369R0JYtbbSCFCwigiSyF X-Received: by 2002:a17:906:184a:b0:78d:f456:1ed0 with SMTP id w10-20020a170906184a00b0078df4561ed0mr11834799eje.33.1671799434822; Fri, 23 Dec 2022 04:43:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671799434; cv=none; d=google.com; s=arc-20160816; b=o4Z3OwCDDd2SneaMiqrrNoY3oangQvFtXS7g5K1/MkXMVzDv/Enj7maIde6VxD8/FO vMsrK1NzpCH5jA/FrzDhjiFfaYC53brTzh3WZrqF3U2bsyYVLHwyJNnN8d6c+NTPSy8W VtTAQx7/3+xSc+kcnKLOzAgDWek0ZcJFz3/fq4OvREN5h1qqguzcGqaVmfpeW0wc+fQ/ Ofwy4UvB6v4E96SGJMtQKeDKhHrneBnDDYXlJ8Dky8Pb4JKPksrqNKfHG6CrVubNNO5Z OgAOJiwl+EMdNUvifmoTLwkaIpasgr0/ngBsXKvA4MIKDu/00+2/oP23HFfT2l08er9Y xS0Q== 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=N4T09SRaUuK23YYQL7CKGSvmXsMLtGTftpce9S42YcE=; b=VkB/bNkk0a0NAoUlFN5dK6NeoxH8ef8raNlC2fEysL+g4e7ASMBS4IN96URacchdaS iWcIJ6pr97DXxzfz6JK/i1O5KRCFTfXVhvIRUDo//TXoye74EV7gXe6J/4X7HVgGFdmG TiAbCPC86H7AjNHpQkcYwnJpsdxF/7UJuirEWqN/Cukp4LSSlqSUltXOb9TILypq1IPG Bvn+FT0bJTkUFu5nOFZzlPAvZra5t83N+5KBG8Eo1gceGgCWJtBe0P6gSt0lwVef0YcC EC6B8csoXl4wWxbt4Unhm+jffGwLSKp5CKyLO6SLVRXbiraMwZhYuAG/KKuGalv2b6Jp dQxw== 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 xd1-20020a170907078100b008327270a79dsi2541010ejb.423.2022.12.23.04.43.30; Fri, 23 Dec 2022 04:43:54 -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 S236291AbiLWMkB (ORCPT + 99 others); Fri, 23 Dec 2022 07:40:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235917AbiLWMjm (ORCPT ); Fri, 23 Dec 2022 07:39:42 -0500 Received: from out199-11.us.a.mail.aliyun.com (out199-11.us.a.mail.aliyun.com [47.90.199.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A9B01B9F8; Fri, 23 Dec 2022 04:39:37 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0VXwwMZ8_1671799172; Received: from srmbuffer011165236051.sqa.eu95(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VXwwMZ8_1671799172) by smtp.aliyun-inc.com; Fri, 23 Dec 2022 20:39:33 +0800 From: Jing Zhang To: John Garry , Ian Rogers , Xing Zhengjun , Will Deacon , James Clark , Mike Leach , Leo Yan Cc: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Kilroy , Shuai Xue , Zhuo Song , Jing Zhang Subject: [PATCH v4 3/6] perf vendor events arm64: Add cache metrics for neoverse-n2 Date: Fri, 23 Dec 2022 20:37:22 +0800 Message-Id: <1671799045-1108027-4-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1671799045-1108027-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1671799045-1108027-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,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?1753008764168088077?= X-GMAIL-MSGID: =?utf-8?q?1753008764168088077?= Add cache related metrics. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 72 ++++++++++++++++++++++ 1 file changed, 72 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 d283356..817d80c 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 @@ -73,5 +73,77 @@ "MetricGroup": "TLB", "MetricName": "itlb_walk_rate", "ScaleUnit": "100%" + }, + { + "MetricExpr": "L1I_CACHE_REFILL / INST_RETIRED * 1000", + "BriefDescription": "The rate of L1 I-Cache misses per kilo instructions", + "MetricGroup": "Cache", + "MetricName": "l1i_cache_mpki" + }, + { + "MetricExpr": "L1I_CACHE_REFILL / L1I_CACHE", + "BriefDescription": "The rate of L1 I-Cache misses to the overall L1 I-Cache", + "MetricGroup": "Cache", + "MetricName": "l1i_cache_miss_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "L1D_CACHE_REFILL / INST_RETIRED * 1000", + "BriefDescription": "The rate of L1 D-Cache misses per kilo instructions", + "MetricGroup": "Cache", + "MetricName": "l1d_cache_mpki" + }, + { + "MetricExpr": "L1D_CACHE_REFILL / L1D_CACHE", + "BriefDescription": "The rate of L1 D-Cache misses to the overall L1 D-Cache", + "MetricGroup": "Cache", + "MetricName": "l1d_cache_miss_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "L2D_CACHE_REFILL / INST_RETIRED * 1000", + "BriefDescription": "The rate of L2 D-Cache misses per kilo instructions", + "MetricGroup": "Cache", + "MetricName": "l2d_cache_mpki" + }, + { + "MetricExpr": "L2D_CACHE_REFILL / L2D_CACHE", + "BriefDescription": "The rate of L2 D-Cache misses to the overall L2 D-Cache", + "MetricGroup": "Cache", + "MetricName": "l2d_cache_miss_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "L3D_CACHE_REFILL / INST_RETIRED * 1000", + "BriefDescription": "The rate of L3 D-Cache misses per kilo instructions", + "MetricGroup": "Cache", + "MetricName": "l3d_cache_mpki" + }, + { + "MetricExpr": "L3D_CACHE_REFILL / L3D_CACHE", + "BriefDescription": "The rate of L3 D-Cache misses to the overall L3 D-Cache", + "MetricGroup": "Cache", + "MetricName": "l3d_cache_miss_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "LL_CACHE_MISS_RD / INST_RETIRED * 1000", + "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", + "BriefDescription": "The rate of LL Cache read misses to the overall LL Cache read", + "MetricGroup": "Cache", + "MetricName": "ll_cache_read_miss_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "(LL_CACHE_RD - LL_CACHE_MISS_RD) / LL_CACHE_RD", + "BriefDescription": "The rate of LL Cache read hit to the overall LL Cache read", + "MetricGroup": "Cache", + "MetricName": "ll_cache_read_hit_rate", + "ScaleUnit": "100%" } ]