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