Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2498338rwl; Fri, 6 Jan 2023 07:15:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXtawDTf18Zmefqb+Uv0sNLCVv4e5Ab0McX0En8jY3KttNxMVBQhSh3J8jQKnbR7IM5kc1Xo X-Received: by 2002:a17:906:430a:b0:7c1:54b9:c688 with SMTP id j10-20020a170906430a00b007c154b9c688mr46677560ejm.60.1673018114440; Fri, 06 Jan 2023 07:15:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673018114; cv=none; d=google.com; s=arc-20160816; b=wAWaBE7A7wKj95zSnCM72KRzPJxURNQEbutzBv3xQUTxI8EEp98HtAGWOy3adVav9t Wwjrr/eWOoylrN8Du6wzlWJ8PkByPjZmTCCi8iCn7NLcJLyl1bQ7jRO3M2UyxsyGhkXp KvQXy0ZwegreMWNDFzvPK6941MN5Xzmb1OuS97mt6hKC2cTg7hnOdQXABnJPtF/P1Pbj re+hrdRklB6ruG1GnReSlBiikNae4IBtxh/rxMZl9dunwwHvr8yZPnx9nd3QYVDJbo98 Mlr1J9oG8GNc1Lx7QIYtVwtiB/y8IvBrQ3cpkhth7bF4W+SAct3s3x9nbS/jtAcbRB5d GI3g== 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=1FKmZX0/IoybCtfeCnsICeo03dWBnsmD98IMCQvz8RU=; b=mixYmiowNVZ0OnpRAaxyYdibiM1OcyGM2Fl8Pky2ChwBZ3OzO70sh2icz5RFTOPcQh D8UtZfXfj0vHVRyz8OuaC5+bJx2OpsgVETL1dlt63v3dChtWLKssWigUOHg39Gc2rpuG u3EWFa+6Itj+JtyF3VBLjkwXqozgjOYIsLVRy6WaPmtD1Gc3NjZjeMK5zalyiuCCxLMu 0NvhQ0JoFO1+ZgZWrIVv6xtdO5ZwNU3O71pDb3d3YskOLbfUGguh46vt384YkjZR0jAd TsSFUPCaCpHRyTRVImQ/oUtywxRX3v70wDX9oAg0Dnvne5OJEfEwD1nMMUzZ4GIBO37Q b80w== 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 oz35-20020a1709077da300b008327270a7fesi1579090ejc.538.2023.01.06.07.15.00; Fri, 06 Jan 2023 07:15:14 -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 S235370AbjAFPGY (ORCPT + 56 others); Fri, 6 Jan 2023 10:06:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234786AbjAFPFw (ORCPT ); Fri, 6 Jan 2023 10:05:52 -0500 Received: from out30-42.freemail.mail.aliyun.com (out30-42.freemail.mail.aliyun.com [115.124.30.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 669D653719; Fri, 6 Jan 2023 07:05:50 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0VZ-UXnu_1673017545; Received: from srmbuffer011165236051.sqa.eu95(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VZ-UXnu_1673017545) by smtp.aliyun-inc.com; Fri, 06 Jan 2023 23:05:45 +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 v6 6/7] perf vendor events arm64: Add PE utilization metrics for neoverse-n2-v2 Date: Fri, 6 Jan 2023 23:05:28 +0800 Message-Id: <1673017529-1429208-7-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1673017529-1429208-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1673017529-1429208-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 PE utilization related metrics. In cpu_utilization metric, if it is neoverse-n2 judged by #slot, the real stall_slot need to subtract the cpu_cycles according to the neoverse-n2 errata [0]. [0] https://documentation-service.arm.com/static/636a66a64e6cf12278ad89cb?token= Signed-off-by: Jing Zhang Acked-by: Ian Rogers --- .../arch/arm64/arm/neoverse-n2-v2/metrics.json | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) 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 index afcdb17..3d6ac0c 100644 --- 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 @@ -160,5 +160,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 if (#slots - 5) else (STALL_SLOT - CPU_CYCLES)) / (#slots * CPU_CYCLES))", + "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