From patchwork Mon Nov 14 07:41:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 19558 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2017249wru; Sun, 13 Nov 2022 23:43:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf4ppwoxC5jRvYN8yBusy0R0O9vQqFnxqzR17LJxz1FBYeSZSUj0OPWZFzzfPGThl6GgnGVG X-Received: by 2002:a17:907:36c:b0:78d:3341:aa8 with SMTP id rs12-20020a170907036c00b0078d33410aa8mr9059938ejb.96.1668411803529; Sun, 13 Nov 2022 23:43:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668411803; cv=none; d=google.com; s=arc-20160816; b=S0gV5848KMzQGfFlHLdLMOBifLXGvXn7NgYNWR3xAwhFepHVATnZ8S1ExVZvuCojUE h4iL9VHz6xVAIEhL0q3AhOyc36RNxNZaiP26WI0nZiKNFDYfJjiREv7BrS9utLlLdPmb /BOl85WS2mmkR3CzXEJEpa8mIM17Y3STbky7LVp0Ujh8YS+HaRq9/7KQ5ad1JDjrLVZM OFkBHF0SVNJ2QcBV6d+L6WOAywRSFbgjW2k7LcJ+BBJqwnG8nE2HBp26Cttg3BIAGgtK 85EdiU4vvMy4wBWOJgPDLdmRikshSmllWsgLEKhBC+cHucJZEqXzQdnEtzBOZfYj7oFO qd+g== 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:references:in-reply-to :message-id:date:subject:cc:to:from; bh=UtI0mWB9+6zJNxmrEWGdA8RU2k++CGw0+tlRQ+Pwal0=; b=XxX21zZENNX9Xc1fmWJ/zRPzMDcTbIidrHcYVLLfyvn5+9f6zgKJAn4AQ8c5UwESfQ bw6KT1uquhm6rj2AgUzCT6mwHmpcpxNVsRXJgd6DrxNBRghTRzuHmFa1D839v1a9oQAZ LTSs1L0vSWKETZMv177INqQaAD5CFfAkIfo/db7bLZBGDJgtpnhGsg4EVMpomtyhZ+gF O9qBkdUQ47NR6C25YLo19qjRoSg0b0+UVstfHyQ77Cgd93UOvbINe7tumYb4mOtUOo9E nIEtKiqpa4U3SOHt20FJ0G68phAKDeL8URYVZa+7kQaYB9alarsWm/xoe6XAvB7Rplx6 6HbA== 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 m14-20020a056402430e00b004675aeea9c5si7697540edc.553.2022.11.13.23.42.59; Sun, 13 Nov 2022 23:43:23 -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 S235867AbiKNHmn (ORCPT + 99 others); Mon, 14 Nov 2022 02:42:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235785AbiKNHml (ORCPT ); Mon, 14 Nov 2022 02:42:41 -0500 Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF252140A2; Sun, 13 Nov 2022 23:42:40 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0VUjWi0h_1668411757; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VUjWi0h_1668411757) by smtp.aliyun-inc.com; Mon, 14 Nov 2022 15:42:38 +0800 From: Jing Zhang To: 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 , Jing Zhang Subject: [RFC PATCH v2 1/6] perf vendor events arm64: Add topdown L1 metrics for neoverse-n2 Date: Mon, 14 Nov 2022 15:41:55 +0800 Message-Id: <1668411720-3581-2-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> 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?1748201495931610595?= X-GMAIL-MSGID: =?utf-8?q?1749456575069487043?= The calculation formula of topdown L1 is from the document: https://documentation-service.arm.com/static/60250c7395978b529036da86?token= However, due to the wrong count of stall_slot and stall_slot_frontend in neoverse-n2, the real stall_slot and real stall_slot_frontend need to subtract cpu_cycles, so when calculating the topdownL1 metrics, stall_slot and stall_slot_frontend are corrected. Since neoverse-n2 does not yet support topdown L2, metricgroups such as Cache, TLB, Branch, InstructionsMix, and PEutilization will be added to further analysis of performance bottlenecks in the following patches. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json 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 new file mode 100644 index 0000000..0048dfe --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json @@ -0,0 +1,30 @@ +[ + { + "MetricExpr": "(stall_slot_frontend - cpu_cycles) / (5 * cpu_cycles)", + "PublicDescription": "Frontend bound L1 topdown metric", + "BriefDescription": "Frontend bound L1 topdown metric", + "MetricGroup": "TopDownL1", + "MetricName": "frontend_bound" + }, + { + "MetricExpr": "(1 - op_retired / op_spec) * (1 - (stall_slot - cpu_cycles) / (5 * cpu_cycles))", + "PublicDescription": "Wasted L1 topdown metric", + "BriefDescription": "Wasted L1 topdown metric", + "MetricGroup": "TopDownL1", + "MetricName": "wasted" + }, + { + "MetricExpr": "(op_retired / op_spec) * (1 - (stall_slot - cpu_cycles) / (5 * cpu_cycles))", + "PublicDescription": "Retiring L1 topdown metric", + "BriefDescription": "Retiring L1 topdown metric", + "MetricGroup": "TopDownL1", + "MetricName": "retiring" + }, + { + "MetricExpr": "stall_slot_backend / (5 * cpu_cycles)", + "PublicDescription": "Backend Bound L1 topdown metric", + "BriefDescription": "Backend Bound L1 topdown metric", + "MetricGroup": "TopDownL1", + "MetricName": "backend_bound" + } +] \ No newline at end of file From patchwork Mon Nov 14 07:41:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 19559 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2017355wru; Sun, 13 Nov 2022 23:43:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf6opUgguAPzl+8lTPR6M4lpE0la9c6py/BTtFwg2aIqkfGqYCFZzKDVc8CRmNEpYZ2se3XV X-Received: by 2002:a17:906:eb5b:b0:78d:47c8:e80f with SMTP id mc27-20020a170906eb5b00b0078d47c8e80fmr9280172ejb.700.1668411826709; Sun, 13 Nov 2022 23:43:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668411826; cv=none; d=google.com; s=arc-20160816; b=XEhGcsCCz1CebDEi8C607caOsQ6wFQrVPTNrAZuN468Yn64q1DA6EfHD+zYS0wM05X SOpOtChSXlHkY421UawCfUlqmASZp8TEb5nfkROxDrPUE0q1nLQchJR6C6M/DrMMBzvP NILolO0mTgBI0un2kvQrU0Mc7c2A2+jCLr2p3NfwLlXSurpjesTFWGOS4xqbREHnvDnk Qm4wNlt+qhvL10Eevh0Bfw11oIiQoBc4s3fb09Zh14FqircWaAnWcIJWbKAX8Isg0ix6 BfaZTfHDlu0VkXL+cH0bh0A6v36Aw9vxXmdLxaCWz5l2odMAoB+Q54mw3A/zhalykHcn TCUw== 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:references:in-reply-to :message-id:date:subject:cc:to:from; bh=STW4avrM5P/OF0xnSiTk72rHwIOKN6PXLTqIB+8rLEI=; b=YKaelir/R0fjLmktwtf3vTjr5y23x9GpB3ZDxMNXy529Dpc/85IGIfKiFybAt3Jhz+ ImAcYTw+Pg2IbNAWZgiTwnUyimOxQln4k4Xeko+x3qJp/zq82SUhGwoZUBh8p5AR+VHP J66rPCtM3Y3XsgSC4gXv2t47aC4vZU2wbsMeFfx4YH5SfCa2y6Y3ohiO9LoAI6JvVWGc ugj7+xly3dYqQVf88AvH8bE8yml9rBk5pLSbtCxpQA0JsQreA6p46POytQfm3Eiph4An xQJS5ziiZmxSmU9G14pEduIVRfrwIIb86siHMo1qChPExHQj7OAJ69M/E/mQm7idV+3t 4j0Q== 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 js12-20020a17090797cc00b007ae5ce3c730si8780815ejc.82.2022.11.13.23.43.23; Sun, 13 Nov 2022 23:43:46 -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 S235970AbiKNHmt (ORCPT + 99 others); Mon, 14 Nov 2022 02:42:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235785AbiKNHmo (ORCPT ); Mon, 14 Nov 2022 02:42:44 -0500 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2F0C12778; Sun, 13 Nov 2022 23:42:42 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0VUjWi16_1668411758; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VUjWi16_1668411758) by smtp.aliyun-inc.com; Mon, 14 Nov 2022 15:42:39 +0800 From: Jing Zhang To: 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 , Jing Zhang Subject: [RFC PATCH v2 2/6] perf vendor events arm64: Add TLB metrics for neoverse-n2 Date: Mon, 14 Nov 2022 15:41:56 +0800 Message-Id: <1668411720-3581-3-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> 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,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?1748201485730908494?= X-GMAIL-MSGID: =?utf-8?q?1749456600109563861?= Add TLB related metrics. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 28 ++++++++++++++++++++++ 1 file changed, 28 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 0048dfe..324ca12 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,33 @@ "BriefDescription": "Backend Bound L1 topdown metric", "MetricGroup": "TopDownL1", "MetricName": "backend_bound" + }, + { + "MetricExpr": "ITLB_WALK / INST_RETIRED * 1000", + "PublicDescription": "The rate of TLB Walks per kilo instructions for instruction accesses", + "BriefDescription": "The rate of TLB Walks per kilo instructions for instruction accesses", + "MetricGroup": "TLB", + "MetricName": "itlb_mpki" + }, + { + "MetricExpr": "ITLB_WALK / L1I_TLB", + "PublicDescription": "The rate of ITLB Walks to the overall TLB lookups initiated from the instruction side", + "BriefDescription": "The rate of ITLB Walks to the overall TLB lookups", + "MetricGroup": "TLB", + "MetricName": "itlb_walk_rate" + }, + { + "MetricExpr": "DTLB_WALK / INST_RETIRED * 1000", + "PublicDescription": "The rate of TLB Walks per kilo instructions for data accesses", + "BriefDescription": "The rate of TLB Walks per kilo instructions for data accesses", + "MetricGroup": "TLB", + "MetricName": "dtlb_mpki" + }, + { + "MetricExpr": "DTLB_WALK / L1D_TLB", + "PublicDescription": "The rate of DTLB Walks to the overall TLB lookups made by the program", + "BriefDescription": "The rate of DTLB Walks to the overall TLB lookups", + "MetricGroup": "TLB", + "MetricName": "dtlb_walk_rate" } ] \ No newline at end of file From patchwork Mon Nov 14 07:41:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 19560 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2017497wru; Sun, 13 Nov 2022 23:44:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf7JlJ6ACPWwx0PMh3eyni19PvUOzoRMCIfy3FAOqLiMb4VMYiEin7iLtDRFX/f99qGw+BR0 X-Received: by 2002:a17:907:c70f:b0:78d:9723:d9c3 with SMTP id ty15-20020a170907c70f00b0078d9723d9c3mr9216188ejc.316.1668411858461; Sun, 13 Nov 2022 23:44:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668411858; cv=none; d=google.com; s=arc-20160816; b=P4Z7LhRZ/f7tcLYHZ8k0Ai2UMxfwb4yIyeAt082a4LQivo2O/N8iO2mvopv+5drZ+a xfI72AW5UAhieIyek+jXUcPYJvGMQ0e76Jvw0k7GiMAG0Rx+biZU3BJ9E+8YBwECS9WB g33cvqqywwuZDIipXiC2eiX10yPXBHfDY9n6oyLtMCpdiDpaU6AHGVADaaDzLGXqscBG UNVnTJA3KXuVvb4uBuAgJ0Ot5qSuW++coh6YN0/gXK/PE/zI1T0V3WyhXYC2/jjwug+e laZZhYa9+OO13CuosJMz95QMIy11Qod1O4VCDLNuvmhkykaS8nL//E4EKsnw9E+z0wqp QCbg== 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:references:in-reply-to :message-id:date:subject:cc:to:from; bh=gHUShCpzxEhQRzXKjeLf/UDkymSDV3Ewt0XRKDRrIN4=; b=lPzSAvYAjb+0l0vTGXQIHafdqhVHvUNRUbxzBYsS0qzSCYDXYembpf+uXqeXIB5E2M bDJcMznhLae6jvPXoG+o1VGCgtWioWQJZ35qfnTpCJ/NAEnWpIN7FdSD/pKzuXMe51hB fWkkDmVxRSemBDI+Wo0mwzTXYqhC+7zQFWBWhvAzKes2w4ZYPhWhKm7tEDs2/Pda3b4/ 1bMFIU7pBSfr9AcqFMx9XNEKDcIUp1vSzuV85nQOngy8Bor5H7xQsakTNGO5bXt66q/I uNR3hVMCKjh+ZYFBeK98F2bw2HaQhDOQ3hzWAB02M8jZcxOqQx3ZaL2TD+dSf+WjP0Fu phbQ== 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 lg4-20020a170906f88400b007ad855bc09csi7013099ejb.595.2022.11.13.23.43.54; Sun, 13 Nov 2022 23:44:18 -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 S235975AbiKNHmw (ORCPT + 99 others); Mon, 14 Nov 2022 02:42:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235946AbiKNHmo (ORCPT ); Mon, 14 Nov 2022 02:42:44 -0500 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7D97140A2; Sun, 13 Nov 2022 23:42:42 -0800 (PST) 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=19;SR=0;TI=SMTPD_---0VUjWi1j_1668411759; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VUjWi1j_1668411759) by smtp.aliyun-inc.com; Mon, 14 Nov 2022 15:42:40 +0800 From: Jing Zhang To: 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 , Jing Zhang Subject: [RFC PATCH v2 3/6] perf vendor events arm64: Add cache metrics for neoverse-n2 Date: Mon, 14 Nov 2022 15:41:57 +0800 Message-Id: <1668411720-3581-4-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> 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,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?1749456633240517452?= 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 From patchwork Mon Nov 14 07:41:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 19564 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2019762wru; Sun, 13 Nov 2022 23:51:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf6MZUQJuMXC4/LkerGIxGlQP9luHMSH2sZQx3P2GbJBigkyf9IWB+es8kb2eD6a3nsFTLHl X-Received: by 2002:a63:fd41:0:b0:45c:59e9:a0a8 with SMTP id m1-20020a63fd41000000b0045c59e9a0a8mr10967719pgj.531.1668412291936; Sun, 13 Nov 2022 23:51:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668412291; cv=none; d=google.com; s=arc-20160816; b=DEo+2tF6/BZOYT/ccqwSHiV/bc9uIqe2CJnXal8TUNec/64s5mtwiefaV4ohBwPapW 3bg07tL4YQSLz9NvYNZ1Az9rlS5K3ZQcrPRydEeZDrAkqv6zCF+zZkJC/oJETW/YqfN3 uxFEB+HvKfuhVV9hhiIzHSdOcJHGB68wLEbvsMro3irkCTOraDPc/JmDH4aE4Ln75wsM V+XgGCj1usxlFmKzO5lieiu8Eekjxe9t+pmI1A9oO1DXQlvuQS3QRFCy79T5UIjTOblw 4E9Fj7B++AQgNKY2z0P5mxiYHYTLUGm4W+a/MhLG7s4gW3ch4feTMXdGs8wfpW90pAam GRVQ== 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:references:in-reply-to :message-id:date:subject:cc:to:from; bh=IBlgLpmUDWmXdMJwyP/5qwcGN0N7GJndbp5RDn/XPn0=; b=A+mz70iy2uJIJvyxvDMEwTWyzRkt6DLM/c8okcG3cofPWPoY5U/G4ASxcAN/qwkC3g Cqhu/+Cl+Jq/2gGng/4KVsfIF0o84M5N39KVG+84yGzJlwWGiu4GojhTnILQLoA3+fFw GujaeFJdX9HoxxXA+mZ7Z5u/aktjh5AGTBc3rxQ0n6GyTtk8Po4gD+R0fuOs+zGWnggj DABpQIfoKwegqaTr4Hj9ptitdTMRokXNWY7ZXiUsSmbbVw7MQ1vXNJiW7/n5ba3B6QcM BilgqbbFE2BZjblVVLwNAj89of9nyVgkBZFKySpTI/CGezTwXyBHnmM/2wmrateoEFB5 OHFA== 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 c19-20020a63d153000000b00438854c876esi8940847pgj.419.2022.11.13.23.51.19; Sun, 13 Nov 2022 23:51:31 -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 S235979AbiKNHnC (ORCPT + 99 others); Mon, 14 Nov 2022 02:43:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235967AbiKNHmr (ORCPT ); Mon, 14 Nov 2022 02:42:47 -0500 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BBA5186F9; Sun, 13 Nov 2022 23:42:44 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R411e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0VUjWi2J_1668411760; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VUjWi2J_1668411760) by smtp.aliyun-inc.com; Mon, 14 Nov 2022 15:42:41 +0800 From: Jing Zhang To: 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 , Jing Zhang Subject: [RFC PATCH v2 4/6] perf vendor events arm64: Add branch metrics for neoverse-n2 Date: Mon, 14 Nov 2022 15:41:58 +0800 Message-Id: <1668411720-3581-5-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> 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,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?1748201524772435101?= X-GMAIL-MSGID: =?utf-8?q?1749457087498215996?= Add branch related metrics. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 21 +++++++++++++++++++++ 1 file changed, 21 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 1690ef6..e960a66 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 @@ -131,5 +131,26 @@ "BriefDescription": "The rate of LL Cache read hit to the overall LL Cache read", "MetricGroup": "Cache", "MetricName": "ll_cache_read_hit_rate" + }, + { + "MetricExpr": "BR_MIS_PRED / INST_RETIRED * 1000", + "PublicDescription": "The rate of branches mis-predicted per kilo instructions", + "BriefDescription": "The rate of branches mis-predicted per kilo instructions", + "MetricGroup": "Branch", + "MetricName": "branch_mpki" + }, + { + "MetricExpr": "(BR_PRED - BR_MIS_PRED) / INST_RETIRED * 1000", + "PublicDescription": "The rate of branches retired per kilo instructions", + "BriefDescription": "The rate of branches retired per kilo instructions", + "MetricGroup": "Branch", + "MetricName": "branch_pki" + }, + { + "MetricExpr": "BR_MIS_PRED / BR_PRED", + "PublicDescription": "The rate of branches mis-predited to the overall branches", + "BriefDescription": "The rate of branches mis-predited to the overall branches", + "MetricGroup": "Branch", + "MetricName": "branch_miss_pred_rate" } ] \ No newline at end of file From patchwork Mon Nov 14 07:41:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 19561 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2017621wru; Sun, 13 Nov 2022 23:44:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf69WhqwJG6NTl6Qi2nsPdT+OfTqDHfP37CzYbVI1bsI2mzJ/Wp4L1UEuCCQvVByjca62/+j X-Received: by 2002:a17:906:539a:b0:7af:1236:dca8 with SMTP id g26-20020a170906539a00b007af1236dca8mr260852ejo.735.1668411880131; Sun, 13 Nov 2022 23:44:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668411880; cv=none; d=google.com; s=arc-20160816; b=j1A/eTIfrOgymP/N6C/KGFqbUNRg7CR4qlU7jICOaIBzTbj++gQL15f5sKXPYZ/F4F DjVP2ELanBMkiB0LeCVTj9RvXeujAfs/9nNMN791LdeqW2zb68QHIjNBBY4K/LcqFIB4 z7SoQ7AkBGNPI12d2Gs9dXr9/E2IvNyCp/n4qDcAq3SPLsSRarYrxN7e4MYtB2nbatQ7 lfl47Q5Qc4SKArG3ZTJi2FS8/L/s1T4ruqMWZcSYlT7pzUnbrmVbrZs8z+pTfFYQ3RjY WynV9Kdh48rBRz4+3/eMuxtWqUX7yvlr7L+cBlqsAPC1DRyCtSZ5ZjAw1KtupfRgA+n/ wRFw== 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:references:in-reply-to :message-id:date:subject:cc:to:from; bh=HQyE1U3gGEKMmONCwo47Vh9JJB4sMg5V64B+PsIJ5s0=; b=z0DftfX+GJ/8pMhqUuprAUtudoncKMu+bT+Z9zgZ/3LGO2CbQSu40MEoBndk0866/x gi5Uw/MlHdW26/gXdstCnOzPvrWmnFHqzy05IouJoxNHejERZ2exJv6t94ae4osOjHPE 0u7myiq4scABxqeJb+gqEJrhq67L1uXZGlaSA2PJbvSme/PUp+aVSsEWzMFjoYdP51El WMJBKyHnRODELoHVi6vbE+P/y1VisLijD6F5TKxG9iRrkYWk0UE8wDCcKPtAniNhv5hY KJLC0AXMU0VmDC3hFS091l/FTAXpie8dQ85H7sGqU27paZyLoSNfJyfi6k5PdnRbqrjm WOoA== 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 c2-20020a056402120200b0045c26f0050esi7311492edw.238.2022.11.13.23.44.16; Sun, 13 Nov 2022 23:44:40 -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 S235981AbiKNHm6 (ORCPT + 99 others); Mon, 14 Nov 2022 02:42:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235965AbiKNHmr (ORCPT ); Mon, 14 Nov 2022 02:42:47 -0500 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C538418B16; Sun, 13 Nov 2022 23:42:45 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R971e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0VUjWi2q_1668411761; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VUjWi2q_1668411761) by smtp.aliyun-inc.com; Mon, 14 Nov 2022 15:42:42 +0800 From: Jing Zhang To: 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 , Jing Zhang Subject: [RFC PATCH v2 5/6] perf vendor events arm64: Add PE utilization metrics for neoverse-n2 Date: Mon, 14 Nov 2022 15:41:59 +0800 Message-Id: <1668411720-3581-6-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> 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,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?1748201534987720342?= X-GMAIL-MSGID: =?utf-8?q?1749456655805153160?= Add PE utilization related metrics. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 28 ++++++++++++++++++++++ 1 file changed, 28 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 e960a66..3c14971 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 @@ -152,5 +152,33 @@ "BriefDescription": "The rate of branches mis-predited to the overall branches", "MetricGroup": "Branch", "MetricName": "branch_miss_pred_rate" + }, + { + "MetricExpr": "instructions / CPU_CYCLES", + "PublicDescription": "The average number of instructions executed for each cycle.", + "BriefDescription": "Instructions per cycle", + "MetricGroup": "PEutilization", + "MetricName": "ipc" + }, + { + "MetricExpr": "OP_RETIRED / OP_SPEC", + "PublicDescription": "Fraction of operations retired", + "BriefDescription": "Fraction of operations retired", + "MetricGroup": "PEutilization", + "MetricName": "retired_rate" + }, + { + "MetricExpr": "1 - OP_RETIRED / OP_SPEC", + "PublicDescription": "Fraction of operations wasted", + "BriefDescription": "Fraction of operations wasted", + "MetricGroup": "PEutilization", + "MetricName": "wasted_rate" + }, + { + "MetricExpr": "(1 - STALL_SLOT / (CPU_CYCLES * 5)) * OP_RETIRED / OP_SPEC", + "PublicDescription": "Utilization of CPU", + "BriefDescription": "Utilization of CPU", + "MetricGroup": "PEutilization", + "MetricName": "cpu_utilization" } ] \ No newline at end of file From patchwork Mon Nov 14 07:42:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 19567 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2020626wru; Sun, 13 Nov 2022 23:54:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf7N9i87p8mFPVKLqdBW4s+CHTqb2Psy6IyTP1XIHnc3bUbluRF3VgdM3dX28euvMgcZx1jh X-Received: by 2002:a17:90a:d34e:b0:20b:1f6:3fe0 with SMTP id i14-20020a17090ad34e00b0020b01f63fe0mr12829517pjx.125.1668412475005; Sun, 13 Nov 2022 23:54:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668412474; cv=none; d=google.com; s=arc-20160816; b=fE6k2JvcPwEOPpE5DpaiRmfnLWtC228/3FPOVsZ5F7zeRrUitZVEFuWmg08CfDY+MG SOKpzYxOtX4URqtXtopSUFzKK2N4Mfp087DqSsNrsJLrk4FZozuhz7UCByl5Hnv76ddY a/W/Fu6sfyZsURZTspTnmvqmMOgubLltiY+s3fYuqDY++/3oK5Z6JJPB2Cf/LgqKu7Dh Al34SGBC9v3+ksNKIr+OQUrt0z465KPP/WFDl1vSw7my842ZZZ0X+QpyDNtV++xg+eVR hu2iui9pwecfMVIXwcmCk/qSQPyEn9Zag+SXZ/3ZIUgxc7UKyiceG5W6Dd1Chp/7vY71 q1dQ== 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:references:in-reply-to :message-id:date:subject:cc:to:from; bh=RkRgZtzkU410YYxX8wh/+BKne7sxuFIdmH8Qtkgr8yw=; b=IPpBGg+SdjeiAXjTaVv1vvelITE4d67PtLEYNcdOjnBsvdKv7cnvqWVZpuT4Xagx4r /y9rHLFF14OnIcBDeu9W0hvh3RKd7qf+5NzZ+KUWYJVWPSZTeFUeF3376kjXKLjCoGQS W4kImk7KPXaggtfEBaTvAYL+qJxZsv9AN9aNEkSF/MG48mz+Ej9GfmUCV2TJ1RAOeV3V 9vWrC5dneEWvXsr1TVKfcuTkWHDXULjoCM/Kv37L4tP737aoYOzk3RBZEZ97/4Ss+pBe 7ycymTCzWg9Y6QQdokG07DklwiB53u91UImEeFHeZdDPcF43xFNmu6p0DBDWpXMcwvuc Bf4g== 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 v12-20020a17090a898c00b00213054baa79si14582154pjn.0.2022.11.13.23.54.22; Sun, 13 Nov 2022 23:54:34 -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 S236007AbiKNHnH (ORCPT + 99 others); Mon, 14 Nov 2022 02:43:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235986AbiKNHm6 (ORCPT ); Mon, 14 Nov 2022 02:42:58 -0500 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 E270E18B37; Sun, 13 Nov 2022 23:42:48 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R721e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0VUjWi3C_1668411762; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VUjWi3C_1668411762) by smtp.aliyun-inc.com; Mon, 14 Nov 2022 15:42:43 +0800 From: Jing Zhang To: 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 , Jing Zhang Subject: [RFC PATCH v2 6/6] perf vendor events arm64: Add instruction mix metrics for neoverse-n2 Date: Mon, 14 Nov 2022 15:42:00 +0800 Message-Id: <1668411720-3581-7-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> 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?1748201530095772830?= X-GMAIL-MSGID: =?utf-8?q?1749457279652565234?= Add instruction mix related metrics. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 63 ++++++++++++++++++++++ 1 file changed, 63 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 3c14971..8ff1dfe 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 @@ -180,5 +180,68 @@ "BriefDescription": "Utilization of CPU", "MetricGroup": "PEutilization", "MetricName": "cpu_utilization" + }, + { + "MetricExpr": "LD_SPEC / INST_SPEC", + "PublicDescription": "The rate of load instructions speculatively executed to overall instructions speclatively executed", + "BriefDescription": "The rate of load instructions speculatively executed to overall instructions speclatively executed", + "MetricGroup": "InstructionMix", + "MetricName": "load_spec_rate" + }, + { + "MetricExpr": "ST_SPEC / INST_SPEC", + "PublicDescription": "The rate of store instructions speculatively executed to overall instructions speclatively executed", + "BriefDescription": "The rate of store instructions speculatively executed to overall instructions speclatively executed", + "MetricGroup": "InstructionMix", + "MetricName": "store_spec_rate" + }, + { + "MetricExpr": "DP_SPEC / INST_SPEC", + "PublicDescription": "The rate of integer data-processing instructions speculatively executed to overall instructions speclatively executed", + "BriefDescription": "The rate of integer data-processing instructions speculatively executed to overall instructions speclatively executed", + "MetricGroup": "InstructionMix", + "MetricName": "date_process_spec_rate" + }, + { + "MetricExpr": "ASE_SPEC / INST_SPEC", + "PublicDescription": "The rate of advanced SIMD instructions speculatively executed to overall instructions speclatively executed", + "BriefDescription": "The rate of advanced SIMD instructions speculatively executed to overall instructions speclatively executed", + "MetricGroup": "InstructionMix", + "MetricName": "advanced_simd_spec_rate" + }, + { + "MetricExpr": "VFP_SPEC / INST_SPEC", + "PublicDescription": "The rate of floating point instructions speculatively executed to overall instructions speclatively executed", + "BriefDescription": "The rate of floating point instructions speculatively executed to overall instructions speclatively executed", + "MetricGroup": "InstructionMix", + "MetricName": "float_point_spec_rate" + }, + { + "MetricExpr": "CRYPTO_SPEC / INST_SPEC", + "PublicDescription": "The rate of crypto instructions speculatively executed to overall instructions speclatively executed", + "BriefDescription": "The rate of crypto instructions speculatively executed to overall instructions speclatively executed", + "MetricGroup": "InstructionMix", + "MetricName": "crypto_spec_rate" + }, + { + "MetricExpr": "BR_IMMED_SPEC / INST_SPEC", + "PublicDescription": "The rate of branch immediate instructions speculatively executed to overall instructions speclatively executed", + "BriefDescription": "The rate of branch immediate instructions speculatively executed to overall instructions speclatively executed", + "MetricGroup": "InstructionMix", + "MetricName": "branch_immed_spec_rate" + }, + { + "MetricExpr": "BR_RETURN_SPEC / INST_SPEC", + "PublicDescription": "The rate of procedure return instructions speculatively executed to overall instructions speclatively executed", + "BriefDescription": "The rate of procedure return instructions speculatively executed to overall instructions speclatively executed", + "MetricGroup": "InstructionMix", + "MetricName": "branch_return_spec_rate" + }, + { + "MetricExpr": "BR_INDIRECT_SPEC / INST_SPEC", + "PublicDescription": "The rate of indirect branch instructions speculatively executed to overall instructions speclatively executed", + "BriefDescription": "The rate of indirect branch instructions speculatively executed to overall instructions speclatively executed", + "MetricGroup": "InstructionMix", + "MetricName": "branch_indirect_spec_rate" } ] \ No newline at end of file