Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11720936rwl; Tue, 3 Jan 2023 03:52:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXvjZab7neDwSQISNirn9gF2+ES0tM906+bR/aDnviLEVSHpKMQ8oj08UGJlCk0gXBHWM3lJ X-Received: by 2002:a17:907:8b17:b0:7c1:8ba6:6eaf with SMTP id sz23-20020a1709078b1700b007c18ba66eafmr39704680ejc.5.1672746771344; Tue, 03 Jan 2023 03:52:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672746771; cv=none; d=google.com; s=arc-20160816; b=xgIDieQvzuRQAfTRaAk6rpDLmVHsu0Z/CS0lb4GhRGcRBY2r7ao+aBR/hsB6o6ULu3 DxmXXM0lR8FSGXAuVusxCOne28tmfsvn/HC7qziA2e6VzUCKkrsL86BKyhBEmN2sKh6v Jks+poRDJOk/1wt06ZnyQ3tmPGvKJ1pRYT9TB3/3064JJFpbOj0fPfEGVkr+OWzvquxV STKZ0+rhTbAcs0yFgaPoOSK1vkA9G1aOMG255d5Nu//pn8ntjEjLt4lmT4txI57hY7H/ quQ5nMAIzNsRcW1vKX7tLgnODtji69VolD6Q00VAs/WxeDLssnART2KzGQvnDzVCL/QM JIcg== 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=FKVuCAcyecAdRZ/33De96eujuvC1vKfqSUpv0o4WVWY=; b=c7WswWdVdFbtNQXYvK1ylqQukY1BvKwYLb+otzqAbUwf90AXl+2K011oCcwLIAmPcc PplNZfy/HBD8qneyJjqtUCFjPlVlmrosZWBlkr+KN6w9gj+Vce0XvYLbtU30laMmonzR HymBLII0/JP6rYxgKA5UXph39nIyHXp6Bo/5MBREBZ0rofT370fPjX/0X9yHyYCxgxBM IpbWrHsXAnUn9TEfgM+/RsTec5FAwFzjr21a/W1/C6BRi85K3qtDmU0dX9r/sD1f1aL6 myTDAemiT0DZVzEUEO+wXmmbpz5i2K+NATuhh1h3sb0N2DHv94FyEaXC+l0ZcjUi4YIT 3pCA== 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 nd5-20020a170907628500b0084c85491fabsi15934224ejc.207.2023.01.03.03.52.37; Tue, 03 Jan 2023 03:52:51 -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 S236652AbjACLkX (ORCPT + 60 others); Tue, 3 Jan 2023 06:40:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233358AbjACLkC (ORCPT ); Tue, 3 Jan 2023 06:40:02 -0500 Received: from out199-7.us.a.mail.aliyun.com (out199-7.us.a.mail.aliyun.com [47.90.199.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30753E5F; Tue, 3 Jan 2023 03:40:00 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;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_---0VYn6leD_1672745994; Received: from srmbuffer011165236051.sqa.eu95(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VYn6leD_1672745994) by smtp.aliyun-inc.com; Tue, 03 Jan 2023 19:39:55 +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 v5 5/6] perf vendor events arm64: Add PE utilization metrics for neoverse-n2 Date: Tue, 3 Jan 2023 19:39:35 +0800 Message-Id: <1672745976-2800146-6-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1672745976-2800146-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1672745976-2800146-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 Add PE utilization related metrics. In cpu_utilization metric, stall_slot minus cpu_cycles is a correction to the stall_slot error count. Signed-off-by: Jing Zhang Acked-by: Ian Rogers --- .../arch/arm64/arm/neoverse-n2/metrics.json | 46 ++++++++++++++++++++++ 1 file changed, 46 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 35e3710..94ca91f 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 @@ -173,5 +173,51 @@ "MetricGroup": "Branch", "MetricName": "branch_miss_pred_rate", "ScaleUnit": "100%" + }, + { + "MetricExpr": "instructions / CPU_CYCLES", + "BriefDescription": "The average number of instructions executed for each cycle.", + "MetricGroup": "PEutilization", + "MetricName": "ipc" + }, + { + "MetricExpr": "ipc / 5", + "BriefDescription": "IPC percentage of peak. The peak of IPC is 5.", + "MetricGroup": "PEutilization", + "MetricName": "ipc_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "INST_RETIRED / CPU_CYCLES", + "BriefDescription": "Architecturally executed Instructions Per Cycle (IPC)", + "MetricGroup": "PEutilization", + "MetricName": "retired_ipc" + }, + { + "MetricExpr": "INST_SPEC / CPU_CYCLES", + "BriefDescription": "Speculatively executed Instructions Per Cycle (IPC)", + "MetricGroup": "PEutilization", + "MetricName": "spec_ipc" + }, + { + "MetricExpr": "OP_RETIRED / OP_SPEC", + "BriefDescription": "Of all the micro-operations issued, what percentage are retired(committed)", + "MetricGroup": "PEutilization", + "MetricName": "retired_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "1 - OP_RETIRED / OP_SPEC", + "BriefDescription": "Of all the micro-operations issued, what percentage are not retired(committed)", + "MetricGroup": "PEutilization", + "MetricName": "wasted_rate", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "OP_RETIRED / OP_SPEC * (1 - (STALL_SLOT - CPU_CYCLES) / (CPU_CYCLES * 5))", + "BriefDescription": "The truly effective ratio of micro-operations executed by the CPU, which means that misprediction and stall are not included", + "MetricGroup": "PEutilization", + "MetricName": "cpu_utilization", + "ScaleUnit": "100%" } ] -- 1.8.3.1