Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp536615rwj; Fri, 23 Dec 2022 05:04:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXsfM7xhXe7AAyP/kZwwKmASQzqVyLwXc7sihaSAayuDOGYuq7aiFai7zDEmHTOxvuQc4vjp X-Received: by 2002:a05:6a20:d2c7:b0:ac:a26a:dae7 with SMTP id ir7-20020a056a20d2c700b000aca26adae7mr12721907pzb.36.1671800653546; Fri, 23 Dec 2022 05:04:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671800653; cv=none; d=google.com; s=arc-20160816; b=VYyZyeGfsDsEf0khjVpVe4c+zZCO0Bud5tGnVcaM6rJuM5vkhGBJ6CpNUYe+4sjp+u c+QUD73sjVIUFoGN4W6bxMRQOOzAgU1Ku+rQB79ZAHI2qFhGH5f4mSD5/0lYGFW50uU+ uMa1iTXTNqvCjzSyUwvGwI+VNL8n75coOurTdJln2pMpPY5TOF0RmByMmzMDIfHCJXqG xZBuXXNbopqxG0w47AAXCQe4GgBnxCirfxvED9NKf6OUS/faT5vVXymWUdDU0FBa3HJS 7bXqUPP0lERQ5o1towWPHRgoa+Tp1k8iGYfrJHgcQ0fGiTzB7q/9g/oaIfi//flT7u4w QnXQ== 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=H2b9SdSkKnRYVwYgF1QB6qCgqENbAcZ9wr2nhw3qg9I=; b=pj0PMnEvmedGcH5QphA8ToWe1KfL/79Llp74n34jsEJRzw1wje2rc6UhxSXs65pIf5 SyNVuZUGcGDID2ni6sQe7lNGG6MOsoFHZK96DNLmhBylJMUBtGZEZk5F8G3g99ja/Gmn tIiODMU7Bqn22ZznbOf6kNoSioWk8oVw6ySYMlBgePeknpqirL/vb6nwF8gZdr7R/+hu X/W9RO0Z5xYBfP8/D0AkjBeT0XIDngMhn8IOLi3xDYGJlHs3y0mxEZCGQBkfGIEUw0JB 19Trcezm+TBKA00r9Hh+hSEn7Egq/25nTpB1NuImmZUk9kD+9r8SHnDYb+4Z+563UhWb H7Kg== 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 15-20020a63164f000000b004769246309dsi3527759pgw.501.2022.12.23.05.04.04; Fri, 23 Dec 2022 05:04: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 S236322AbiLWMkI (ORCPT + 65 others); Fri, 23 Dec 2022 07:40:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235954AbiLWMjm (ORCPT ); Fri, 23 Dec 2022 07:39:42 -0500 Received: from out30-8.freemail.mail.aliyun.com (out30-8.freemail.mail.aliyun.com [115.124.30.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF7261B78A; Fri, 23 Dec 2022 04:39:40 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R781e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0VXwwMZY_1671799174; Received: from srmbuffer011165236051.sqa.eu95(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VXwwMZY_1671799174) by smtp.aliyun-inc.com; Fri, 23 Dec 2022 20:39:34 +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 v4 5/6] perf vendor events arm64: Add PE utilization metrics for neoverse-n2 Date: Fri, 23 Dec 2022 20:37:24 +0800 Message-Id: <1671799045-1108027-6-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1671799045-1108027-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1671799045-1108027-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_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 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 --- .../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 73d50f6..2c85e86 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 @@ -164,5 +164,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