From patchwork Thu Nov 24 17:14:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 25644 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3517252wrr; Thu, 24 Nov 2022 09:15:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf7XnI5qwl2bvOmC8ErgC/UXGtGkAVUK6lSCCfaB29Uw0RxwAGFxaCfPKk8G3UGjMN7eWwbf X-Received: by 2002:a62:e417:0:b0:56d:e0b8:e552 with SMTP id r23-20020a62e417000000b0056de0b8e552mr15345956pfh.78.1669310127580; Thu, 24 Nov 2022 09:15:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669310127; cv=none; d=google.com; s=arc-20160816; b=oDGwQms4HWuqPhRf2eTMDi3nHgjt+/DgrMf/L7LefcyDmSBx9isiOwspLU2LO/qP7k mMH78quthZ9619/fMaU3reVZxGNhPP5hvebgkpygE19MBmJw3wyU5T9PyC7+7L5fUEBP rZA1c63MAjb+F/CLbVXOfvZgvm9r0SrkAxbHRSEz1or/qCg9lPZFWZOrVaBx7HCXjTWD FQKpVgDwWLKh2YVsgjNO/nxAE4qnMtU5Mg7QLn/t+04uxxqOCB7s+c4vWXNTTzlnrqc/ 6HqtZ9eVJYGnAEdWJoQijzL4JsEVe5bYz8qlquRmWPNzVOceOkpIhtzVYqnwcHsV02M1 6XEQ== 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=W7ucGNmuh9+GmjI7jXFLV+YVmR7PamwsQGabzj7W2PE=; b=IRo78vVnom2Tl+mQuEt2eob3tzPT7e8M5gpTGDRkDV3rfGSNgY0Xm8n3VU++4ErhSS V8XpWL0BFShydhoFaaDmOVVVEZKtXme5pqegSVVP2+DePNcdaXDdjCz4gkPEg8JOYHC3 g5qP3J8SCBXYRSsDtOVyY00+0Qgr9KITcIzFoTAQd4nFg2y5jnxczjs+omBnHalLZ2CD v8viMy+SZ+dsm5fGMO3g4doMZyZrxA6nirlYzGVeSgYPhnbrrc8aXNJ5KR1VSL7gq3o3 Rg1sPUXtzt35SO2gkuVDuDUDCaDbxS8BcXiLubCEUVHkQcOV93aeDRwjvIIQzLahtqH2 RgCw== 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 qi13-20020a17090b274d00b00218089f3f72si3269188pjb.55.2022.11.24.09.15.13; Thu, 24 Nov 2022 09:15:27 -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 S229717AbiKXRPF (ORCPT + 99 others); Thu, 24 Nov 2022 12:15:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbiKXRPD (ORCPT ); Thu, 24 Nov 2022 12:15:03 -0500 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 477DC12F41C; Thu, 24 Nov 2022 09:15:02 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R271e4;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=21;SR=0;TI=SMTPD_---0VVbtc6r_1669310097; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VVbtc6r_1669310097) by smtp.aliyun-inc.com; Fri, 25 Nov 2022 01:14:58 +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 v3 1/6] perf vendor events arm64: Add topdown L1 metrics for neoverse-n2 Date: Fri, 25 Nov 2022 01:14:43 +0800 Message-Id: <1669310088-13482-2-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1669310088-13482-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1669310088-13482-1-git-send-email-renyu.zj@linux.alibaba.com> 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> 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?1748201495931610595?= X-GMAIL-MSGID: =?utf-8?q?1750398536053849365?= The formula of topdown L1 on neoverse-n2 is from ARM sbsa7.0 platform design document [0], D37-38. However, due to the wrong count of stall_slot and stall_slot_frontend on neoverse-n2, the real stall_slot and real stall_slot_frontend need to subtract cpu_cycles, so correct the expression of topdown metrics. Reference from ARM neoverse-n2 errata notice [1], D117. 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. Reference from ARM PMU guide [2][3]. [0] https://documentation-service.arm.com/static/60250c7395978b529036da86?token= [1] https://documentation-service.arm.com/static/636a66a64e6cf12278ad89cb?token= [2] https://documentation-service.arm.com/static/628f8fa3dfaf015c2b76eae8?token= [3] https://documentation-service.arm.com/static/62cfe21e31ea212bb6627393?token= Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 34 ++++++++++++++++++++++ 1 file changed, 34 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..8628140 --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json @@ -0,0 +1,34 @@ +[ + { + "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", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "(1 - op_retired / op_spec) * (1 - (stall_slot - cpu_cycles) / (5 * cpu_cycles))", + "PublicDescription": "Bad speculation L1 topdown metric", + "BriefDescription": "Bad speculation L1 topdown metric", + "MetricGroup": "TopdownL1", + "MetricName": "bad_speculation", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "stall_slot_backend / (5 * cpu_cycles)", + "PublicDescription": "Backend Bound L1 topdown metric", + "BriefDescription": "Backend Bound L1 topdown metric", + "MetricGroup": "TopdownL1", + "MetricName": "backend_bound", + "ScaleUnit": "100%" + } +] From patchwork Thu Nov 24 17:14:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 25645 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3517339wrr; Thu, 24 Nov 2022 09:15:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf6cQct1hIXiXaLBduSGMH6H3jdRqrJp5VEdZnbIpswkQlCtKjkS9+W0vZmvN03MIIZlEs+v X-Received: by 2002:a63:1345:0:b0:476:f92f:69f0 with SMTP id 5-20020a631345000000b00476f92f69f0mr31087710pgt.463.1669310138104; Thu, 24 Nov 2022 09:15:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669310138; cv=none; d=google.com; s=arc-20160816; b=zLVio+tmZayDySRXO9gdWiSSW0D7xuxEL0NVDjF3+CHRQATsWHXuoTzpuG0tpRIQuP 1B3DmSUW1zpu9hT5ZhdJdUPK43TCCPpyotaAtaSwAvmzmmEw/ZBoou0SVNxtIYZ2A46q CahkrgySz7OEasaMQc07DvRcD+xoW1HYuN6XMZZ8d2TO3ybquFe/xE8dFB9eyJpQU6gJ dXtk0w37zy6nk3N5anyUMqmBdL7MqfZo/YAOT6TyxIKSRIMJDAwRz1iszMlfzTpAJQoT k4XaKbtaMQUZz3p0k+eBv400cunSKajkA7E1cuF6jWQgCmrta7LdFeFdjIak1ji3jKXB Uy9A== 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=EsWTy+RyYOcztkeibKY1u5zSwtg7IDyyVX8Jm8h8oWI=; b=ZSgtU8KDthNbAmWmlYwhlcrVEufNvYLBSOvTSt9FChVT9W8F2UmXb46FZ6xYXol86O 3GzfYHeb6UCE5vln/UgxMFYJQLfbIYMuV85O25IfyDH3ov5RQa1O3z869UZn5LFtoWX9 ujcubolIHt2aKO313zNiQpNjz3Pdhg7Sy6kXXsO+NyURmfNVmu0I5FP6XuL+2rj7/Vvr BX5/FcBDZ2oU8L83qt26VqrNlYLPY0+s1JXYIOqSgzFYnYmNCIDONa99NZFKaoYGdnOR vIA37dsEPRYxRP1E+uLU7Q5+CpwN/OuXEGQfVrpkbAKnKJJkEAa6qzdawQaCMH5Bl6jp /D1w== 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 35-20020a631163000000b004707dd3280asi1080973pgr.204.2022.11.24.09.15.24; Thu, 24 Nov 2022 09:15:38 -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 S229752AbiKXRPJ (ORCPT + 99 others); Thu, 24 Nov 2022 12:15:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbiKXRPF (ORCPT ); Thu, 24 Nov 2022 12:15:05 -0500 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D199F12F423; Thu, 24 Nov 2022 09:15:03 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R571e4;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_---0VVbtc7B_1669310098; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VVbtc7B_1669310098) by smtp.aliyun-inc.com; Fri, 25 Nov 2022 01:14:59 +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 v3 2/6] perf vendor events arm64: Add TLB metrics for neoverse-n2 Date: Fri, 25 Nov 2022 01:14:44 +0800 Message-Id: <1669310088-13482-3-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1669310088-13482-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1669310088-13482-1-git-send-email-renyu.zj@linux.alibaba.com> 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> 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?1748201485730908494?= X-GMAIL-MSGID: =?utf-8?q?1750398547465349609?= Add TLB related metrics. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 54 ++++++++++++++++++++++ 1 file changed, 54 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 8628140..bb19960 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 @@ -30,5 +30,59 @@ "MetricGroup": "TopdownL1", "MetricName": "backend_bound", "ScaleUnit": "100%" + }, + { + "MetricExpr": "L1D_TLB_REFILL / L1D_TLB", + "PublicDescription": "The rate of L1D TLB refill to the overall L1D TLB lookups", + "BriefDescription": "L1 data TLB miss rate", + "MetricGroup": "TLB", + "MetricName": "l1d_tlb_miss_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "L1I_TLB_REFILL / L1I_TLB", + "PublicDescription": "The rate of L1I TLB refill to the overall L1I TLB lookups", + "BriefDescription": "L1 instruction TLB miss rate", + "MetricGroup": "TLB", + "MetricName": "l1i_tlb_miss_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "L2D_TLB_REFILL / L2D_TLB", + "PublicDescription": "The rate of L2D TLB refill to the overall L2D TLB lookups", + "BriefDescription": "L2 TLB miss rate", + "MetricGroup": "TLB", + "MetricName": "l2_tlb_miss_rate", + "ScaleUnit": "100%" + }, + { + "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 L1D TLB lookups", + "BriefDescription": "D-side page table walk rate", + "MetricGroup": "TLB", + "MetricName": "dtlb_walk_rate", + "ScaleUnit": "100%" + }, + { + "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 L1I TLB lookups", + "BriefDescription": "I-side page table walk rate", + "MetricGroup": "TLB", + "MetricName": "itlb_walk_rate", + "ScaleUnit": "100%" } ] From patchwork Thu Nov 24 17:14:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 25646 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3517926wrr; Thu, 24 Nov 2022 09:16:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf4IUP5cuvAmfgkLb9YcB118OjHKzmEddLmWEkumzop+ajvKJeTilOCLRMrWHPF4cpRQtMpI X-Received: by 2002:a17:90a:e2c5:b0:214:1648:687d with SMTP id fr5-20020a17090ae2c500b002141648687dmr43022694pjb.78.1669310205782; Thu, 24 Nov 2022 09:16:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669310205; cv=none; d=google.com; s=arc-20160816; b=01evF8gtFJVV9rqDBkh4Zb7tBI6bvlIWLyUNKEDwEUKrz4LGhnJgxMCT9gUiujfPTV vjU/XTcrFNxzDYcHvuZ7PA397+oeBThRozcY7ch/NbQl/4l84wry4fQt80KND/WjUbLE Wy7bEa/2cLYiZESplXy8sMTD5soIicwzliQ7HrgHKRslNA+Fp1TZolCCjNg5t8kqOQLI LgYUe6fFwBrdeWE9A+CqvQnImTHc32ZbhLCqjHyJz+PjF7ZITeKEqo5XIJgiErWB9NoA D6cdiqldMRCx06H9ACDfwnI6nbKuNPMr2XFYS8YaBSxs+MtZ+U/foh/newBQlD1jO00Z 5SCw== 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=4Rzh2GX0HXoHfI/o4TXKjnRBhPda864aAckaMv0KCss=; b=lCGeHuJyuDzkLjL9vucLBGE/muzvKxQxvtMQLIOp18SDEoenSIvxHWIMO/JU6asgeJ GJ6I+D7d3hSBXjaojpwINsllVAmDm+qRqv9Zy8oYmXeWHrlOqODls9sRnu97VwiPi523 nKOd6hyhYqo1ObiHTzMCXOA+oemToQ25OUiBRje9huoKG/1zhF3lfarh+Z/rxIiQSILA ndGIfiwgPNC5wP6on9yQ/q5q1b1gR3/bUSqPN0RKUI7z4Ey5pLcMPNZGm376xklIILAY IGPGzInOoisK8jJe+NNMWPl0/0KJ7sSutyGZ45cyz+Xi3Z0gPvB4qWYSZCJZEEXKQSaz gCEQ== 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 u4-20020a17090341c400b00186b3cb49basi1687569ple.202.2022.11.24.09.16.32; Thu, 24 Nov 2022 09:16: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 S229760AbiKXRPL (ORCPT + 99 others); Thu, 24 Nov 2022 12:15:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229718AbiKXRPG (ORCPT ); Thu, 24 Nov 2022 12:15:06 -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 D311212F43E; Thu, 24 Nov 2022 09:15:04 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;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=21;SR=0;TI=SMTPD_---0VVbtc7b_1669310099; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VVbtc7b_1669310099) by smtp.aliyun-inc.com; Fri, 25 Nov 2022 01:15:00 +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 v3 3/6] perf vendor events arm64: Add cache metrics for neoverse-n2 Date: Fri, 25 Nov 2022 01:14:45 +0800 Message-Id: <1669310088-13482-4-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1669310088-13482-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1669310088-13482-1-git-send-email-renyu.zj@linux.alibaba.com> 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> 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?1750398618061302181?= Add cache related metrics. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 83 ++++++++++++++++++++++ 1 file changed, 83 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 bb19960..20b5ad1 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 @@ -84,5 +84,88 @@ "MetricGroup": "TLB", "MetricName": "itlb_walk_rate", "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" } ] From patchwork Thu Nov 24 17:14:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 25649 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3521524wrr; Thu, 24 Nov 2022 09:24:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf7philZtKkw6SXKO0ppq3W4t/P/4lre168RCvct/TGxEpjMTh4KtryUPWaSQMZSNXdwJOI4 X-Received: by 2002:a17:906:4804:b0:7a8:3ecb:bd62 with SMTP id w4-20020a170906480400b007a83ecbbd62mr29078617ejq.721.1669310679275; Thu, 24 Nov 2022 09:24:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669310679; cv=none; d=google.com; s=arc-20160816; b=GIlD4XBegpBAT4NJngChZQJ42Vm2IzR4yxdem29fF7aJ9SO5Tt8NboF9sl5jaYwUst RpJp44cka+xOv2g9gJ8B6kWHwT080/2F06FR0wjyJReqKaZMBGcCCoE1coGmcYmydrwS 4Mfyn72/8IjS23pFIKvY4AnUvNjwmXbaBuXW67/9oB+IdCaTPpvgYwB54URHlnRaG9li ia8IITUBekCdI/R/R5zzWAWPKo6uRf49tB0PyziGCDQFqS9W4Inm4XAqLHlWnvNjXZnH vXdU/HAtS1kkyb1zNdCQSR+EUXMtKP91QJtTNpU0/yje+O1ZkU09YNTzbx695I0/ABz8 D3Bg== 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=33c77443LGSLWPqQpH64z5DznCWa3R19H1ZwFbKTKx8=; b=KUKjeRz6K+XcHxp6BGVYJeIyzpBI76w5oclO76PTw4zndYzUR71+/n1VT1NTbFoIzK 4L15c5bYyDPAvXxeQYl6odI2g519JwAOPSAAEy8JF5IXA4TwgOSPHMeT/+CK65E2DkaQ qoOWKAxTOGIaZ+Thz4qXCFqiH1QKEdao+zBzFpiWWz5NP25DTo6cn8Y6qLB3bnbyyG4g RSd+ol3x98spRHo7pmBWwhM94zHPSDuFyylsWJg3feBOr/jVzku6HiQRJxLCpQXkL+UY go1azTMyb525aITNnocBru1HBbKMUxYfPDX2IpVBkjOCRGLxwcsz5xshfT7YoUCeQxzT l57A== 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 gs34-20020a1709072d2200b0078df1c345dcsi1519563ejc.535.2022.11.24.09.24.15; Thu, 24 Nov 2022 09:24:39 -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 S229718AbiKXRPM (ORCPT + 99 others); Thu, 24 Nov 2022 12:15:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229735AbiKXRPG (ORCPT ); Thu, 24 Nov 2022 12:15:06 -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 B21AE131802; Thu, 24 Nov 2022 09:15:05 -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=ay29a033018045170;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0VVbtc8-_1669310100; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VVbtc8-_1669310100) by smtp.aliyun-inc.com; Fri, 25 Nov 2022 01:15:01 +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 v3 4/6] perf vendor events arm64: Add branch metrics for neoverse-n2 Date: Fri, 25 Nov 2022 01:14:46 +0800 Message-Id: <1669310088-13482-5-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1669310088-13482-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1669310088-13482-1-git-send-email-renyu.zj@linux.alibaba.com> 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> 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?1748201524772435101?= X-GMAIL-MSGID: =?utf-8?q?1750399114663368668?= Add branch related metrics. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 22 ++++++++++++++++++++++ 1 file changed, 22 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 20b5ad1..23c7d62 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 @@ -167,5 +167,27 @@ "MetricGroup": "Cache", "MetricName": "ll_cache_read_hit_rate", "ScaleUnit": "100%" + }, + { + "MetricExpr": "BR_MIS_PRED_RETIRED / 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_RETIRED / 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_RETIRED / BR_RETIRED", + "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", + "ScaleUnit": "100%" } ] From patchwork Thu Nov 24 17:14:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 25647 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3518489wrr; Thu, 24 Nov 2022 09:17:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf5q1KMOpdR7Vd83fNOj/qmL1VJL5WUPNOmThDkfgWHK0aNaaPueYpm9hS8sfzbJJIJw/m9G X-Received: by 2002:a50:f602:0:b0:469:4e4f:4827 with SMTP id c2-20020a50f602000000b004694e4f4827mr23146204edn.214.1669310273778; Thu, 24 Nov 2022 09:17:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669310273; cv=none; d=google.com; s=arc-20160816; b=0I3wE4p2MCnT/wOoFLAXIzQEYPIdkcLwU8uyoN3pSE9Wrp7j9bYCmV3HZkcDjtRnoD Xa5zYO4dPJEBBQ0BnNdcIoQ3pusiboCLOk/usrL90ceEu04AKvEs8cwhC6AdzSq/UE8c W+lU3pqAx6u0puwE/W9HPUHEk12c/mbZOGEwOZcX3vvnCanX3wYA/9YmG23IbLJ5ETju 86wda6tMY+xVtKyDZM+pS/mXef0jHtyZfuPmAsyWOSz1eL6Ifyf+SSw6mXYNprMAY0HZ UkesAUKvbflzqkCcPvl32rjVWftLAuXjRgdfEPg5PTeWiUftvbUVugVk+BJtdgfM+MoJ CPEA== 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=GnENjVrQ0cj994x/sBgASpwMO5lVfLCh79eKApRlL9w=; b=0exjDEfIzfIsRZ13m3AbJH4/A5pSU8wZ2j40BrKn6tsIlZw2IYFNTGH543teTS035j A1T17Go5anWrecKmWTtWXbbnQCWioA7FkFPSm8nrPnvcKA/k6dvzySvHjufk6gNMyDgI DmbkmNBz0aTklkLcygneHXR9outLtg62lJR2FYqgCoQkIjQ6QfI9gkFWqIZmlACPyhH0 37wZ3y5rupvjbKz7LR8zA2Lj9Fb08PoQbIiViwDzqUUm9jW40hR2bdTm26b7D3Y899+J pUR4pmjFyofTCk7TOzPAflOyxdDSXiXlG1c77Ij7c5dC/N5RZIgs0Mq8boHfHmv5httH 1bBw== 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 ne22-20020a1709077b9600b0076ed46e4440si1360077ejc.636.2022.11.24.09.17.26; Thu, 24 Nov 2022 09:17:53 -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 S229791AbiKXRPR (ORCPT + 99 others); Thu, 24 Nov 2022 12:15:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229712AbiKXRPJ (ORCPT ); Thu, 24 Nov 2022 12:15:09 -0500 Received: from out199-5.us.a.mail.aliyun.com (out199-5.us.a.mail.aliyun.com [47.90.199.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2955513180B; Thu, 24 Nov 2022 09:15:07 -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=ay29a033018046050;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0VVbtc8O_1669310102; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VVbtc8O_1669310102) by smtp.aliyun-inc.com; Fri, 25 Nov 2022 01:15:02 +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 v3 5/6] perf vendor events arm64: Add PE utilization metrics for neoverse-n2 Date: Fri, 25 Nov 2022 01:14:47 +0800 Message-Id: <1669310088-13482-6-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1669310088-13482-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1669310088-13482-1-git-send-email-renyu.zj@linux.alibaba.com> 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> 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?1748201534987720342?= X-GMAIL-MSGID: =?utf-8?q?1750398689823335164?= Add PE utilization related metrics. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 45 ++++++++++++++++++++++ 1 file changed, 45 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 23c7d62..7b54819 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 @@ -189,5 +189,50 @@ "MetricGroup": "Branch", "MetricName": "branch_miss_pred_rate", "ScaleUnit": "100%" + }, + { + "MetricExpr": "instructions / CPU_CYCLES", + "PublicDescription": "The average number of instructions executed for each cycle.", + "BriefDescription": "Instructions per cycle", + "MetricGroup": "PEutilization", + "MetricName": "ipc" + }, + { + "MetricExpr": "INST_RETIRED / CPU_CYCLES", + "PublicDescription": "Architecturally executed Instructions Per Cycle (IPC)", + "BriefDescription": "Architecturally executed Instructions Per Cycle (IPC)", + "MetricGroup": "PEutilization", + "MetricName": "retired_ipc" + }, + { + "MetricExpr": "INST_SPEC / CPU_CYCLES", + "PublicDescription": "Speculatively executed Instructions Per Cycle (IPC)", + "BriefDescription": "Speculatively executed Instructions Per Cycle (IPC)", + "MetricGroup": "PEutilization", + "MetricName": "spec_ipc" + }, + { + "MetricExpr": "OP_RETIRED / OP_SPEC", + "PublicDescription": "Fraction of operations retired", + "BriefDescription": "Fraction of operations retired", + "MetricGroup": "PEutilization", + "MetricName": "retired_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "1 - OP_RETIRED / OP_SPEC", + "PublicDescription": "Fraction of operations wasted", + "BriefDescription": "Fraction of operations wasted", + "MetricGroup": "PEutilization", + "MetricName": "wasted_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "OP_RETIRED / OP_SPEC * (1 - (STALL_SLOT - CPU_CYCLES) / (CPU_CYCLES * 5))", + "PublicDescription": "Utilization of CPU", + "BriefDescription": "Utilization of CPU", + "MetricGroup": "PEutilization", + "MetricName": "cpu_utilization", + "ScaleUnit": "100%" } ] From patchwork Thu Nov 24 17:14:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 25648 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3521341wrr; Thu, 24 Nov 2022 09:24:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf7wIcdx2Kbh3a3fkFf5u59HWbnmcLxEeFrQEl4chtYrbXJWrc/pEqcQGp7IyPC6Q0WO2pkw X-Received: by 2002:a05:6402:24a0:b0:458:ad54:20d5 with SMTP id q32-20020a05640224a000b00458ad5420d5mr30488913eda.86.1669310650748; Thu, 24 Nov 2022 09:24:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669310650; cv=none; d=google.com; s=arc-20160816; b=uhaEf106Bc8leNOGZlnEoBrGhhRCI+sl54p9i7Zcmwdi70p1QAzPEnsMJu6QZ9f4oS dwLBXBnniGP8WYje0Qm5IH2Zh6ddn9iM308/XC3iwQ5thMfX7cb+DDasI1lRyyMIPZcV mJSg9P7tx/abSJGSBVJxe6j+auFw4SgWJVcqNcWsoLhEcCWElDkCCLFZ2E6seK5xvDRJ 5VVHHr5WPI66fUox7ienQhoxmSBRcfAImBzMn5XWElLGUbxTZ+E9lwNeFM8QnLAxMBje fVcs788sBKnEHBGRQqFB11cjRgYdTgow7q3eQ2saYpspQfJ8atxhVGaUdJML3c0eIcfg x4pg== 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=gye1j+cPEzCVNJ6BgXtDlhCGMFFASmdMwR8pSl+qg+s=; b=0zljs90oUkd9JMWkqjnVivutkF/c/Fl0jBGhdECPWQXJsRqEelPJ9egHz2vSsKnw8i vnnRlcK46EbJRvq8DgC9uv6p6Rfvlu8Aq6LatzYoNDE2qM0R8ccRQrg53/mKpYql9sJQ d0MgRosLgRk9oRr+d+Xh50T1dVjoNMhgWXtoJv0ay128PcOdaURBV/oBxoBWJwB5yQp1 VVcNr7bmTGEvHRI6jYW4o9apP+9mHZGW6WGM9zEGb9m1ynfa8Ez41o/d31FIeFra+7Yd M1sResaDFpuRgk5WQpgwu5vKA0lKIG4DBfQkcUUzL6cdsXTd/t5AAMh19OV+6Rjm/KmV Vxfg== 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 t18-20020a1709063e5200b0077f92be81adsi1075457eji.212.2022.11.24.09.23.43; Thu, 24 Nov 2022 09:24:10 -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 S229805AbiKXRPV (ORCPT + 99 others); Thu, 24 Nov 2022 12:15:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbiKXRPJ (ORCPT ); Thu, 24 Nov 2022 12:15:09 -0500 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34EEE131819; Thu, 24 Nov 2022 09:15:08 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0VVbtc8u_1669310103; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VVbtc8u_1669310103) by smtp.aliyun-inc.com; Fri, 25 Nov 2022 01:15:04 +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 v3 6/6] perf vendor events arm64: Add instruction mix metrics for neoverse-n2 Date: Fri, 25 Nov 2022 01:14:48 +0800 Message-Id: <1669310088-13482-7-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1669310088-13482-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1669310088-13482-1-git-send-email-renyu.zj@linux.alibaba.com> 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> 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?1750399084930236152?= Add instruction mix 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 7b54819..20d46be 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 @@ -234,5 +234,77 @@ "MetricGroup": "PEutilization", "MetricName": "cpu_utilization", "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "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": "data_process_spec_rate", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" + }, + { + "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", + "ScaleUnit": "100%" } ]