Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5267266rwb; Mon, 14 Nov 2022 01:48:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf4NJsDr5yLMu0akBTe9fj1ygGJJhcaD85f+hYobC5rT0Df82Qsg0vSI8ZWNO1XgE9IDztYf X-Received: by 2002:a17:902:eb87:b0:186:a27d:8e81 with SMTP id q7-20020a170902eb8700b00186a27d8e81mr13071172plg.133.1668419293257; Mon, 14 Nov 2022 01:48:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668419293; cv=none; d=google.com; s=arc-20160816; b=EyJjRsLoTfTx32o1ItTU31g9EryOgz6KhDOkHyfmNu1Y/b0B9wJ18d8S3UTEZC0Sw8 PVNqHAt59EvdXRJaTc+xyQfgsSPftJPDVow9iKx4N7QXQvmAu93XgdeTa0cw3yk/qM7T FbvteZLnjRZQaNaWxTe01N9iuV8aGvCMlpeV54LhdDPjJLR6dAwlFnweWgMqM/9hFGq7 Tt8gx4OthsB6O8m4HyfZhzsjUDpI5eK9VIRre+S78HNI3XkPGw+9UIcLvwaSkRS3eDmo IfiBKC13WjYOXfA8tw6dHh/ICgWNSKucfaw1Q31KSp+sgzCZsIBdVstqiv6F8GozAh03 rDHg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a056a0015c700b005612b15a927si9991618pfu.181.2022.11.14.01.48.01; Mon, 14 Nov 2022 01:48:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; 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 + 88 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 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 -- 1.8.3.1