Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4401572rwb; Mon, 16 Jan 2023 23:47:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXtf9rKveWlUviqp5RpigSee2BjhBN9gbkUbFyvHLwmntA6IejIcdskCZkPHWntHDQ5qbf21 X-Received: by 2002:a05:6a00:3025:b0:58d:a683:bb2f with SMTP id ay37-20020a056a00302500b0058da683bb2fmr2674536pfb.23.1673941659770; Mon, 16 Jan 2023 23:47:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673941659; cv=none; d=google.com; s=arc-20160816; b=OTYAl4AA2u391WBlnEeDiKvVVeFdvNQOcFDmKDirHxi13k1ZZg4jmXIpxKmjGVOKn7 LXb4+bNT7lld0ZMvLD0hZGX4hPblf545/ICjT9ruYUDXpJK2K1Piz2jPfBYR7nbs5Qv3 rfB9MkioIXHBCcrRU7x00XMRO99YBHwmg1vcWNKVSi+qOfqxMmN8MuOcOrzbz0wLP+U9 G32UsWrLZOiD4cN0YSTYgeVtqtBn4E9SSlGELuQmlXV6yfQiLeYbLtmlcRcHsvDllZFs 6d7IVbNEgzzuKSPCXbrLqjRt4/5u0O6kWdgC30+ZuXkVmdJEYmMH9XkGCqrXxXG9CiOM KlMQ== 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=DVPe9UfmtFTS71vYZ1Bh+7ztRndu0nOmHcHVTT9jHg8=; b=sgB1sExZe8r1lYfr21aohUHtlIWntEO1trkMS+xWdYvsAEh+HAV1vEgdArY1mJ+zBq z406mphr0MMGSnhLm2wW14FusdUEXenMLMP+pRC4TJwmzhcTh+CTmnue6BXFFb+b3IoF 5khU1Pk1e8Ja44+dzoiw7pv2LGjVLYN2+IiXm07ulvWo3S2KEOH13aXNbSVJm9FKpXqx TvC4Py9R5ekvZoPad4sIh+Zx2CPbXh/71v7uhlsGadvmHTXf3c7U7IH59D0unWBw//UD HADpyYf1pYGChS106Ewtim64uVF1+S6aMO3Fxc/apZsQiv6NASJX2Q4fUF7/xYTj5vna NHsg== 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 r132-20020a632b8a000000b00478a09699f8si3755333pgr.126.2023.01.16.23.47.32; Mon, 16 Jan 2023 23:47: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 S235919AbjAQHaZ (ORCPT + 49 others); Tue, 17 Jan 2023 02:30:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235698AbjAQH37 (ORCPT ); Tue, 17 Jan 2023 02:29:59 -0500 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D57F24110; Mon, 16 Jan 2023 23:29:57 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R651e4;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_---0VZm6e3a_1673940592; Received: from srmbuffer011165236051.sqa.eu95(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VZm6e3a_1673940592) by smtp.aliyun-inc.com; Tue, 17 Jan 2023 15:29:52 +0800 From: Jing Zhang To: John Garry , Ian Rogers Cc: Xing Zhengjun , Will Deacon , James Clark , Mike Leach , Leo Yan , 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 v8 4/9] perf vendor events arm64: Add topdown L1 metrics for neoverse-n2-v2 Date: Tue, 17 Jan 2023 15:29:28 +0800 Message-Id: <1673940573-90503-5-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1673940573-90503-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1673940573-90503-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 Add general topdown L1 metrics for neoverse-n2-v2. 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 overwrite the "MetricExpr" for neoverse-n2 which slots are 5. Reference from ARM neoverse-n2 errata notice [0], D117. Since neoverse-n2/neoverse-v2 does not yet support topdown L2, metric groups 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 [1][2]. [0] https://documentation-service.arm.com/static/636a66a64e6cf12278ad89cb?token= [1] https://documentation-service.arm.com/static/628f8fa3dfaf015c2b76eae8?token= [2] https://documentation-service.arm.com/static/62cfe21e31ea212bb6627393?token= Signed-off-by: Jing Zhang Reviewed-by: John Garry Acked-by: Ian Rogers --- .../arch/arm64/arm/neoverse-n2-v2/metrics.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/metrics.json diff --git a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/metrics.json new file mode 100644 index 0000000..4e7417f --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2-v2/metrics.json @@ -0,0 +1,17 @@ +[ + { + "ArchStdEvent": "FRONTEND_BOUND", + "MetricExpr": "((stall_slot_frontend) if (#slots - 5) else (stall_slot_frontend - cpu_cycles)) / (#slots * cpu_cycles)" + }, + { + "ArchStdEvent": "BAD_SPECULATION", + "MetricExpr": "(1 - op_retired / op_spec) * (1 - (stall_slot if (#slots - 5) else (stall_slot - cpu_cycles)) / (#slots * cpu_cycles))" + }, + { + "ArchStdEvent": "RETIRING", + "MetricExpr": "(op_retired / op_spec) * (1 - (stall_slot if (#slots - 5) else (stall_slot - cpu_cycles)) / (#slots * cpu_cycles))" + }, + { + "ArchStdEvent": "BACKEND_BOUND" + } +] -- 1.8.3.1