From patchwork Mon Oct 31 11:11:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 13207 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2247944wru; Mon, 31 Oct 2022 04:14:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ZWT0mBJr/UI+IX/1seE5ylBCgTSIyVNpnyQfwj5orh/QR+36FjA+yWE6XAFqL2IB1DyJL X-Received: by 2002:a05:6402:c4d:b0:457:99ec:1837 with SMTP id cs13-20020a0564020c4d00b0045799ec1837mr12738571edb.86.1667214866595; Mon, 31 Oct 2022 04:14:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667214866; cv=none; d=google.com; s=arc-20160816; b=zxx0Ph6GUfVTOAAteoqJklFyN/ALDw09KCTrlvaBG9VqvVKGVG5BnDfRk45OS9CKey w8MKtzCOWWyMloo5WLTQ2QyWUDu0nDRPhbMav4LZty2O7v0zdxfqBwA9/O23ygx3rxtI at9nROhU2exXIcZqEqEobZXjDczpEEk9WZM2G1gQaHqgk14jnHWvtcHdiD91RODJ+9Qz AdqjgOnLs7E1/ebkn+NZoJqJG+KlMOeegxXyoEbWBhveLf/tHsfjziRMtI0z3ZH7rU8M TSPYGdGLAawwcN1MYa8uYRZvODry9dasbl0CU3Q4sjZ/JzyFoOzeipxO6CCDSJO56rH4 RQQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=PwtvZMh4lUhsH+ALqiuRCwfTpJKgLjWFN1Ao6rTKo74=; b=T82sP59iUqVBQWAIuUlBoOZ9K6s9ZPhSSgtDAq0oZFDw9ZTNqucX/WeQ7gH7YsT55i m+juHv+KtUd1GwkBp0ep08UqtJJE+AFmaZRre5baRmi/ke3fkRRbNiGKm6xucAnknzi5 GIekDOXY1dF+dCNVW97lPncQwU57kHlx/1hppHDPK4KO0A3EaV391bgSk7auecPRvTOm elqGyU6FSJULBxchqaNAacrVhNXiTBb6n2NAVKJKn07ho7B98as/kMXAR1IuUXCmKn3I IwfYIK6nkosYkc2J0POeVlaVD1elda1tL2sZM07SN5sG6HgL7qrnp5qhmxYEAmSBMK/9 G84w== 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 t4-20020a056402240400b004628e41569esi7168880eda.155.2022.10.31.04.14.01; Mon, 31 Oct 2022 04:14:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230234AbiJaLLu (ORCPT + 99 others); Mon, 31 Oct 2022 07:11:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230134AbiJaLLq (ORCPT ); Mon, 31 Oct 2022 07:11:46 -0400 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDF66B847; Mon, 31 Oct 2022 04:11:44 -0700 (PDT) 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=ay29a033018045176;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0VTVxoHU_1667214701; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VTVxoHU_1667214701) by smtp.aliyun-inc.com; Mon, 31 Oct 2022 19:11:42 +0800 From: Jing Zhang To: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Kilroy , Shuai Xue , Zhuo Song Subject: [PATCH RFC 1/6] perf vendor events arm64: Add topdown L1 metrics for neoverse-n2 Date: Mon, 31 Oct 2022 19:11:29 +0800 Message-Id: <1667214694-89839-2-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748201495931610595?= X-GMAIL-MSGID: =?utf-8?q?1748201495931610595?= The calculation formula of topdown L1 is from the document: https://documentation-service.arm.com/static/60250c7395978b529036da86?token= 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..b6b3b19 --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json @@ -0,0 +1,30 @@ +[ + { + "MetricExpr": "stall_slot_frontend / (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 / (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 / (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 Oct 31 11:11:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 13206 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2247883wru; Mon, 31 Oct 2022 04:14:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5cqEuw7zi0pMhYFAOc4xLyrRelwcPAzOFrYzXtWSOVNcV30DOyy/4VUBSNty1cDoz3QulQ X-Received: by 2002:a17:907:31c1:b0:742:28a3:5d08 with SMTP id xf1-20020a17090731c100b0074228a35d08mr12334731ejb.112.1667214857143; Mon, 31 Oct 2022 04:14:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667214857; cv=none; d=google.com; s=arc-20160816; b=kQauHUqwD8tktvnNW5dMS+eAhHIDsl7vL05rOWJPP6cMhjX9BbYFAncYF4RshmkIGN YvqQn8d2Nk2fDBNiw7v5n6C7SBwQ5poX3tHsnkV1M+S2HIX/2DigcxQZ+bJe91T8sYA9 P7Mz/HX9ixvJjX/bZKvmO+LTjwwKWvIARiZXZFyuuwclymlbpX9MqROb0LHw7+2neauO jB8336KuHEVahscX8A437q5BbsBfQsPqQ415Sterj1Fwz8dmsDaDc1hRrBnb+ujp1566 1ZycSgAlKB7zNFmtziDw82PWbonxfww/TXxqz2ToxFYza73ZKOblxqqEY4qLElj0lQh9 gO8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=iYys7ZRdE0wCMheJJ5B6mZggBjEpYsg8byV0Ujl7v2E=; b=IhwdX+fvoMenzGG9FKw8//Q7LbRzBwt1UM1413SglfFib7ikv1sOLXw7PQJHRlGF7K bljWyv4yykY/VMaej3kyDObx4cW3ItT08F56ct0zUlRL/C0EoTVhR0n2yGNS7tmKq90b +wsk/OEbM25vwQUsMaQIw/xqO9ILA2m+xAi3buims9wu5YcF5A7CYTpBuJDrhiG6pS9v XQIPLh0t6c6XZbPLdE5fJ9GUe/OTMaHaLEroIeUdILvFDnwowC+2SnytRPOCZTg+XLUq iL8aoa7NGk4f2Z0pjLVotU67V3GASZ0BUS6DqgbFS4h46yn6kXIiZEzqv8uv40Jilgd6 bUfw== 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 hv21-20020a17090760d500b007add8160fd4si2142129ejc.766.2022.10.31.04.13.51; Mon, 31 Oct 2022 04:14:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230228AbiJaLLz (ORCPT + 99 others); Mon, 31 Oct 2022 07:11:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230174AbiJaLLr (ORCPT ); Mon, 31 Oct 2022 07:11:47 -0400 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 E9AEBC75B; Mon, 31 Oct 2022 04:11:45 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0VTVxoHo_1667214702; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VTVxoHo_1667214702) by smtp.aliyun-inc.com; Mon, 31 Oct 2022 19:11:43 +0800 From: Jing Zhang To: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Kilroy , Shuai Xue , Zhuo Song Subject: [PATCH RFC 2/6] perf vendor events arm64: Add TLB metrics for neoverse-n2 Date: Mon, 31 Oct 2022 19:11:30 +0800 Message-Id: <1667214694-89839-3-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,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?1748201485730908494?= 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 b6b3b19..066d905 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 Oct 31 11:11:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 13208 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2248114wru; Mon, 31 Oct 2022 04:14:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4DtckOw39jNEp2lH0yheIZ1Uu7Q0gqwUra6edrU0D1gOI9QTcI4HwuEIzaIEtG2YvYRh9x X-Received: by 2002:a05:6402:f8e:b0:461:8b1c:eb0c with SMTP id eh14-20020a0564020f8e00b004618b1ceb0cmr13615405edb.20.1667214887788; Mon, 31 Oct 2022 04:14:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667214887; cv=none; d=google.com; s=arc-20160816; b=A3NROocTrvDq8GQTF9+ZdVR5ReIFOUMpp0S67dxN4KA3RsRYh7vfxgjm/VgdzBY2VP LuoQI78dvodha4n+Z7lEn0xOFUHkMD6iXyxK3tG9v2BS7LWVqAV8mCgXlMz5tgRdKldn VsGxyz/0AkWwVKTGUaWifo6e32le0rsITaJ1/ExFVmOpD5793EM3+ZEi2UdctyMv4a5P h86vXDXxJUaMz/7cvfb2gEWhvgp+zOm4yk1H5UyVvIlRFKXUqLYBnY8qHfnmW4TMzzW5 ytBun8xgb1SDp4fjQ7treUxijL5DhxqyN7xCaLUMigp8R234c1nHGNzGxjVwHY+BX5im /5Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=ePE4mErru7f2FVA77zgO/BP1D5VSEZP877D7yK2/tsw=; b=Dr7ows5reAKFbWtpCFDMamrhrrSd4IIhvnbBgsjBQWMoko3yigOStAf8KtEofnisK3 FUbjLxtzw0M7FDuu/AbS/bDKqsdzgOwWSdCfDgJCr/+l15pFzXRXhR+JUOwJZsRP7fhr LGBsoCePQmAjqWzVcyvsQ446XSZEoyYEY4lhfXU6sZJ/3aqRit9Ei6fwFfEINicX4JoI QQBJQV7SKQBULPZHSVHG6mapWlu4dJIUicD0PvjTqjxQqutFI/cMBMpYl3Qip0W97n/z 5xr9Cq/MbhMNmCwsK5f8/xAEkNtBo9SRJhWtBMuQ4yaiwllur4N0cxtH3AkadNKj6V6A hy+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f7-20020a1709063f4700b007a31138203asi6624628ejj.669.2022.10.31.04.14.22; Mon, 31 Oct 2022 04:14:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230337AbiJaLL5 (ORCPT + 99 others); Mon, 31 Oct 2022 07:11:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230202AbiJaLLs (ORCPT ); Mon, 31 Oct 2022 07:11:48 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E02ACB847; Mon, 31 Oct 2022 04:11:46 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0VTVxoIB_1667214703; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VTVxoIB_1667214703) by smtp.aliyun-inc.com; Mon, 31 Oct 2022 19:11:44 +0800 From: Jing Zhang To: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Kilroy , Shuai Xue , Zhuo Song Subject: [PATCH RFC 3/6] perf vendor events arm64: Add cache metrics for neoverse-n2 Date: Mon, 31 Oct 2022 19:11:31 +0800 Message-Id: <1667214694-89839-4-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748201517919403593?= X-GMAIL-MSGID: =?utf-8?q?1748201517919403593?= Add cache related metrics. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json index 066d905..2dc6d9e 100644 --- a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json +++ b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json @@ -54,5 +54,82 @@ "BriefDescription": "The rate of DTLB Walks to the overall TLB lookups", "MetricGroup": "TLB", "MetricName": "dtlb_walk_rate" + }, + { + "MetricExpr": "L1I_CACHE_REFILL / INST_RETIRED * 1000", + "PublicDescription": "The rate of L1 I-Cache misses per kilo instructions", + "BriefDescription": "The rate of L1 I-Cache misses per kilo instructions", + "MetricGroup": "Cache", + "MetricName": "l1i_cache_mpki" + }, + { + "MetricExpr": "L1I_CACHE_REFILL / L1I_CACHE", + "PublicDescription": "The rate of L1 I-Cache misses to the overall L1 I-Cache", + "BriefDescription": "The rate of L1 I-Cache misses to the overall L1 I-Cache", + "MetricGroup": "Cache", + "MetricName": "l1i_cache_miss_rate" + }, + { + "MetricExpr": "L1D_CACHE_REFILL / INST_RETIRED * 1000", + "PublicDescription": "The rate of L1 D-Cache misses per kilo instructions", + "BriefDescription": "The rate of L1 D-Cache misses per kilo instructions", + "MetricGroup": "Cache", + "MetricName": "l1d_cache_mpki" + }, + { + "MetricExpr": "L1D_CACHE_REFILL / L1D_CACHE", + "PublicDescription": "The rate of L1 D-Cache misses to the overall L1 D-Cache", + "BriefDescription": "The rate of L1 D-Cache misses to the overall L1 D-Cache", + "MetricGroup": "Cache", + "MetricName": "l1d_cache_miss_rate" + }, + { + "MetricExpr": "L2D_CACHE_REFILL / INST_RETIRED * 1000", + "PublicDescription": "The rate of L2 D-Cache misses per kilo instructions", + "BriefDescription": "The rate of L2 D-Cache misses per kilo instructions", + "MetricGroup": "Cache", + "MetricName": "l2d_cache_mpki" + }, + { + "MetricExpr": "L2D_CACHE_REFILL / L2D_CACHE", + "PublicDescription": "The rate of L2 D-Cache misses to the overall L2 D-Cache", + "BriefDescription": "The rate of L2 D-Cache misses to the overall L2 D-Cache", + "MetricGroup": "Cache", + "MetricName": "l2d_cache_miss_rate" + }, + { + "MetricExpr": "L3D_CACHE_REFILL / INST_RETIRED * 1000", + "PublicDescription": "The rate of L3 D-Cache misses per kilo instructions", + "BriefDescription": "The rate of L3 D-Cache misses per kilo instructions", + "MetricGroup": "Cache", + "MetricName": "l3d_cache_mpki" + }, + { + "MetricExpr": "L3D_CACHE_REFILL / L3D_CACHE", + "PublicDescription": "The rate of L3 D-Cache misses to the overall L3 D-Cache", + "BriefDescription": "The rate of L3 D-Cache misses to the overall L3 D-Cache", + "MetricGroup": "Cache", + "MetricName": "l3d_cache_miss_rate" + }, + { + "MetricExpr": "LL_CACHE_MISS_RD / INST_RETIRED * 1000", + "PublicDescription": "The rate of LL Cache read misses per kilo instructions", + "BriefDescription": "The rate of LL Cache read misses per kilo instructions", + "MetricGroup": "Cache", + "MetricName": "ll_cache_read_mpki" + }, + { + "MetricExpr": "LL_CACHE_MISS_RD / LL_CACHE_RD", + "PublicDescription": "The rate of LL Cache read misses to the overall LL Cache read", + "BriefDescription": "The rate of LL Cache read misses to the overall LL Cache read", + "MetricGroup": "Cache", + "MetricName": "ll_cache_read_miss_rate" + }, + { + "MetricExpr": "(LL_CACHE_RD - LL_CACHE_MISS_RD) / LL_CACHE_RD", + "PublicDescription": "The rate of LL Cache read hit to the overall LL Cache read", + "BriefDescription": "The rate of LL Cache read hit to the overall LL Cache read", + "MetricGroup": "Cache", + "MetricName": "ll_cache_read_hit_rate" } ] \ No newline at end of file From patchwork Mon Oct 31 11:11:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 13209 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2248173wru; Mon, 31 Oct 2022 04:14:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6a5h+xZcGl81FJzCL+/KIvsjs/4mNwChB1lB11TeDOxo9TvyUaVhqP45mzhY0sxsB3vJ1d X-Received: by 2002:a17:907:3f28:b0:7ad:88f8:7644 with SMTP id hq40-20020a1709073f2800b007ad88f87644mr12186787ejc.738.1667214893608; Mon, 31 Oct 2022 04:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667214893; cv=none; d=google.com; s=arc-20160816; b=JnqOfy3hXYCitQqmZnJvJlv7+XlF+s9OPDr08y+vZb7qlB707hG30ZVdGsoRch4haY pIM1OaeiFTT+myRXYhAjM2+S16RUtHoBGVDg3rRgjvR3rebZR1gSBM+RHizcFkqMSQV0 bPjT3e2HsrGKrL4MDedwMtldQWZr8NyAhgC27FsSmo14Hlg7zIegYt2JVtOmhckFe8uJ 6yJyB6F1rtyZ26GdmePlihlnl9NpfYtg9Ho5Ht7/ZIgwIPGQSXNrfNrOwFPLtkgzw8rh 4DPdc1nY8274g1gNkk6XeiVQGdv4CLM9lfASS7dApjg+sk4yp1jTE+K9yRl0ogsNQi/D Fwlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=MezUK7L6IL0GPLz3HsIexw2O7ytElovoXwsuIiKz1U8=; b=xChziX7mgBwbh7cfSvcaCREce0/YKxrviOMvCT+5rvX8HM5PcAeth1NZ28BxNIcVAH L0OX7dysmbPoCbJdL0Pxzw5rBdwM9sVSYacLP/9W30odrzBZRDwjeOjL0uJ1ABIIIGJ4 YMF9KQ5nbrL9mM2qFCCxdp3PgSE8152GggTbiWTHyj5e1bDnOtGOmQzorI/pevOl4RWg 16RLCEddnovdGczxBW2fIt7SvA1uUPOelbTeBBJK0HqQgPBPWx9kisURDIxySqm1g6NG 8oBHVXihPF7bJcVG7uu3I4HrDgcZLBc6M+fnMBHmo6qwtG+VNKvVUWB9qQF4MlInIxr3 9bMw== 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 ds8-20020a170907724800b0078d3ab37efasi8389814ejc.84.2022.10.31.04.14.29; Mon, 31 Oct 2022 04:14:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbiJaLMB (ORCPT + 99 others); Mon, 31 Oct 2022 07:12:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230205AbiJaLLt (ORCPT ); Mon, 31 Oct 2022 07:11:49 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1705BE12; Mon, 31 Oct 2022 04:11:47 -0700 (PDT) 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=ay29a033018045168;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0VTVxoIV_1667214704; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VTVxoIV_1667214704) by smtp.aliyun-inc.com; Mon, 31 Oct 2022 19:11:45 +0800 From: Jing Zhang To: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Kilroy , Shuai Xue , Zhuo Song Subject: [PATCH RFC 4/6] perf vendor events arm64: Add branch metrics for neoverse-n2 Date: Mon, 31 Oct 2022 19:11:32 +0800 Message-Id: <1667214694-89839-5-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748201524772435101?= X-GMAIL-MSGID: =?utf-8?q?1748201524772435101?= 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 2dc6d9e..6b5aaf7 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 Oct 31 11:11:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 13211 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2248267wru; Mon, 31 Oct 2022 04:15:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6kc2NHjwgWPDobzw8lJC8s5S3Yflire49lvBjnHDFXMZIMiltGWcjwi/jvmnITjjzlXU59 X-Received: by 2002:a05:6402:280a:b0:461:9845:d9c9 with SMTP id h10-20020a056402280a00b004619845d9c9mr13468640ede.268.1667214904121; Mon, 31 Oct 2022 04:15:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667214904; cv=none; d=google.com; s=arc-20160816; b=ELPj9KmigqsxA14IrGk2ePgLlagtTP8kZuBxT0tPd696IQVIJakKxYdDOFHRv+NNse nOCJ5MXU7xxxoOmDXyKbgUPXQtbNXgYTbNcYFEo5pXriYmWXxNF0iCUhDyV0ckXlAgI4 gExm4mz4sWK2KDuNR5WRVOLD5uRATq9WTCku3UY+ORonS08IeGuB7osUf6b8zWeiOtGW st9UvCiAQV/s+hKVNNy1EHodrKgQ1lYm56erEQ53qwWJmsZ2KzDOJAnGCuvqJgm1tBpZ ObfbQ5HPmaG3A2SodU9GH0DajfjNLoodPg2pbUxl9bTnCybpTxHyqnJkyGyDblfigTfD ZcHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=lZ/sQBhwRRfR07BIgZxfw7ZJFDTezLRmJs6n7q7Mf3s=; b=SEr7c5r2NMQxBJIGXd651Mh/NJxpP0sab3UOjOyRWNAjUAHq+DeZN3jmwZyMmURtZ7 JhtoaAEdH0baLRajyNWX6CHrj5/eEU83IsheN3Z2VIziJ30R2SCdCQ47Id4vG1L8c7Ih /c1QhbVSMu6OcSe/Z11SeD5sGvXEXlFpv0TZlnzqjgtazt0NLvUmF+FTjCW6bF9SNZjj Q88jxHmknYYCO2PakHwXSlt12Vrl3ZD9T2gY4NEE2t2FtDV7WBAvzvMFKlHA4LCvcy0P OdTeZDdAFWeZ1gklrlW0sYkBc/OlQRFlkfWkgMYSQxtsI5vfwnJzsrnhJYNdlslrVe/Z U8cQ== 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 ja14-20020a170907988e00b0078def76da94si5983503ejc.437.2022.10.31.04.14.40; Mon, 31 Oct 2022 04:15:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230420AbiJaLMI (ORCPT + 99 others); Mon, 31 Oct 2022 07:12:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230236AbiJaLLu (ORCPT ); Mon, 31 Oct 2022 07:11:50 -0400 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 A6848D131; Mon, 31 Oct 2022 04:11:49 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0VTVxoIw_1667214705; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VTVxoIw_1667214705) by smtp.aliyun-inc.com; Mon, 31 Oct 2022 19:11:46 +0800 From: Jing Zhang To: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Kilroy , Shuai Xue , Zhuo Song Subject: [PATCH RFC 5/6] perf vendor events arm64: Add PE utilization metrics for neoverse-n2 Date: Mon, 31 Oct 2022 19:11:33 +0800 Message-Id: <1667214694-89839-6-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748201534987720342?= X-GMAIL-MSGID: =?utf-8?q?1748201534987720342?= 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 6b5aaf7..230e93a 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 Oct 31 11:11:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 13210 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2248219wru; Mon, 31 Oct 2022 04:14:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM73f3riVEUrF9gAcSwcGt7bUEXpsgMSYOyago9pNn4AOXC2R6MKIM9rk1tfV6QIdPv5bhUY X-Received: by 2002:a17:907:a43:b0:77b:ba98:d2f with SMTP id be3-20020a1709070a4300b0077bba980d2fmr12516098ejc.270.1667214899190; Mon, 31 Oct 2022 04:14:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667214899; cv=none; d=google.com; s=arc-20160816; b=nJXR273CgoGhzWkdxIPcMAN6AN6Qrc0GhmCcKhqjKuS/VBXblDXc9wElfrQxIajUHm H1FXaBnC6JUN7TqfOsAEow2iJ7ptjUpWN2NVsYS1Q6VgPKvyC+gyv13VOUGFedRds1OY xpH6rlrJRevq+pOixWmwEq3UsAKqBB660oyrioOHrCHaMvHSgO322SXlnA9ntl7qnZA6 Y/WsLVgHWqolg2y/gQTCYOdSL97Sg400dImgBaXX4hFjif5B7fl/xfTesLnYu21UhbU4 6u/6IJGutxDDV3ImqF2n4g7Msk3ZvWb6ol1cxAYI5i6nU82p95FVmKr05irpnnVjMnii cVmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=lknI1YeF90KCQLUKFIcBKqPAQcHVecPUjdeAb20hoUI=; b=TGkBOGhg3chFWEQmbRx5xngDeVhQRSu4lNa43vvswPTpcWwSUKBlgUA52pekgzA1he 5nAiFXO8OithqebnBHDPziDVgJkodrT6Wv+FS2Yd+cMkvICwJOluhlhQI0yS4nUCBf0M eTZTwI9r+k4UG8Fx2LW/JLFj4dH9MbAQjGVOShvqSK3PHov7vI2L6K7Prnax4VNzeQ0z spmvcPhdjIbHCFX2cLY3CfkczOsbNUod634UL8Os4nE04H1tDzuUkePRwS55XzoSlQxv p4vmJX1G5qoG34Hixbgj8SV82QBWG2Ec1vJZctHwxKvI0uy8Kpj2tD7Tlo51KQVG4xWs i20g== 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 ga17-20020a1709070c1100b007833cbbb747si7362385ejc.578.2022.10.31.04.14.35; Mon, 31 Oct 2022 04:14:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230366AbiJaLME (ORCPT + 99 others); Mon, 31 Oct 2022 07:12:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230248AbiJaLLw (ORCPT ); Mon, 31 Oct 2022 07:11:52 -0400 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 AF691D2FC; Mon, 31 Oct 2022 04:11:50 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R591e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0VTVxoJQ_1667214706; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VTVxoJQ_1667214706) by smtp.aliyun-inc.com; Mon, 31 Oct 2022 19:11:47 +0800 From: Jing Zhang To: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Kilroy , Shuai Xue , Zhuo Song Subject: [PATCH RFC 6/6] perf vendor events arm64: Add instruction mix metrics for neoverse-n2 Date: Mon, 31 Oct 2022 19:11:34 +0800 Message-Id: <1667214694-89839-7-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1667214694-89839-1-git-send-email-renyu.zj@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748201530095772830?= X-GMAIL-MSGID: =?utf-8?q?1748201530095772830?= 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 230e93a..2a3e50d 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