Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5227362rwb; Mon, 14 Nov 2022 00:59:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf49AjQZRvMDVqgkEn7erDtRNL6nrQEpiWWXooD4c6n7EJlxu6MAJtMSTwMSW5wXwlO0EkvK X-Received: by 2002:a17:906:82c9:b0:7ad:aedb:140b with SMTP id a9-20020a17090682c900b007adaedb140bmr9762413ejy.477.1668416353497; Mon, 14 Nov 2022 00:59:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668416353; cv=none; d=google.com; s=arc-20160816; b=goDUBOOSF/+x/NKHJ2khRsd7I9QvUYHeV4g/d6u97Bqra2mCdbb3io1R9D+zH+gUN2 39J1xfrKHtVhoaFLgybEu7FF14qSuP157veN8ngw2uJLO+aZbEh3XX0cu6xLBCoHv1Ev u3sw4W+7i0MwsZLeYoxBk5kCVadXrQyTf64OV6ygd3BlNUGXNWsux4LSQ5fQwvJ9Zokv /J94ex1HkWB5xUUWetqXaboCNm1WERAOC6ITeacR6GfiAdXzw/fPS72bkQjLbc9v4q4k +tUfEPuvGUDk3x6KRk+ay2pwggbKPaN+uSBieZrgcjientW4SgNGXjh8WLy+DGyjLxMU owrg== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=2Y25xZOjcaKLLxFRWwm1/WQeOQFSkAqdCivmByEdaFw=; b=JtvcBHnij2e/4ZIjmEwc72YAhoaZCKqcfRTISZGJQSoY8OR4ojKldqPT7+2QIH3dzJ 9btJTlOjtUbTkcGK+RV3fp0ednLo+lrbsKj7163tSi63WJ25JTl6vdGQv69rvSlfXoBo MxsXANa6ZbVwGhgoZs1r5epvH3vjdCi1bO9Xi+X9a48cD2Sz2ZewCXH2v6YhAtlCHVog syaZ8ADd7TYt+cvz+ORuOS4LNPHnSuBVIfoowtjQZvLlrZ4SYoOYrFLlw3wAJYdxo+88 /urAqETNzHXvqP+R7f2kd8+yG4iWda4wxR/J6H6vw2RQeYWdo/ESvPt1XOJNPpV0D5zH B7GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=C2Wg0o2p; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id my28-20020a1709065a5c00b0077e6bb482adsi2801132ejc.658.2022.11.14.00.58.51; Mon, 14 Nov 2022 00:59:13 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=C2Wg0o2p; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236543AbiKNIgF (ORCPT + 88 others); Mon, 14 Nov 2022 03:36:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236545AbiKNIgB (ORCPT ); Mon, 14 Nov 2022 03:36:01 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17CAC1C114; Mon, 14 Nov 2022 00:36:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668414961; x=1699950961; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=fdpZZ4r1hTVkoO3kGE4DlZQf60aaP2bmV66mBFHDQ/U=; b=C2Wg0o2p64l9epkj4axYH6U+R/sMR/Du/H79RR1+XV7jxrn/V+dK5TL4 +XlL1RyOmLSpy2K/5o/FBAJd4vDn5/IDArmo0LyEwCNdMPEMjNiFZ67b7 KFY3Asrw+q01CbnV7BGS0eDdYle87O6AGv+WRKz3x9L7NrCRNhJo8saUA iWyYVU7v9iFcSpJwDQ7ajNvlfOa4oHXI+hhWtjQeReX91Hl0OrVjvzFUs uh/stjv8jfHBKK5DICrzCYZYORd5CgWAWi2h0VSPC4I1bc6iujbxDXJ+A 5YV2gkDLofyLkjn16G7LXMluPiLXZVsOOKMziu9mhnZ9BXg526AQK7eTG g==; X-IronPort-AV: E=McAfee;i="6500,9779,10530"; a="295277104" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="295277104" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 00:36:00 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10530"; a="967483826" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="967483826" Received: from xingzhen-mobl.ccr.corp.intel.com (HELO [10.254.211.184]) ([10.254.211.184]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 00:35:56 -0800 Message-ID: Date: Mon, 14 Nov 2022 16:35:35 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [RFC PATCH v2 3/6] perf vendor events arm64: Add cache metrics for neoverse-n2 To: Jing Zhang , 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> Content-Language: en-US From: Xing Zhengjun In-Reply-To: <1668411720-3581-4-git-send-email-renyu.zj@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE 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 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. -- Zhengjun Xing