From patchwork Mon Nov 14 07:41:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 19564 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2019762wru; Sun, 13 Nov 2022 23:51:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf6MZUQJuMXC4/LkerGIxGlQP9luHMSH2sZQx3P2GbJBigkyf9IWB+es8kb2eD6a3nsFTLHl X-Received: by 2002:a63:fd41:0:b0:45c:59e9:a0a8 with SMTP id m1-20020a63fd41000000b0045c59e9a0a8mr10967719pgj.531.1668412291936; Sun, 13 Nov 2022 23:51:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668412291; cv=none; d=google.com; s=arc-20160816; b=DEo+2tF6/BZOYT/ccqwSHiV/bc9uIqe2CJnXal8TUNec/64s5mtwiefaV4ohBwPapW 3bg07tL4YQSLz9NvYNZ1Az9rlS5K3ZQcrPRydEeZDrAkqv6zCF+zZkJC/oJETW/YqfN3 uxFEB+HvKfuhVV9hhiIzHSdOcJHGB68wLEbvsMro3irkCTOraDPc/JmDH4aE4Ln75wsM V+XgGCj1usxlFmKzO5lieiu8Eekjxe9t+pmI1A9oO1DXQlvuQS3QRFCy79T5UIjTOblw 4E9Fj7B++AQgNKY2z0P5mxiYHYTLUGm4W+a/MhLG7s4gW3ch4feTMXdGs8wfpW90pAam GRVQ== 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:references:in-reply-to :message-id:date:subject:cc:to:from; bh=IBlgLpmUDWmXdMJwyP/5qwcGN0N7GJndbp5RDn/XPn0=; b=A+mz70iy2uJIJvyxvDMEwTWyzRkt6DLM/c8okcG3cofPWPoY5U/G4ASxcAN/qwkC3g Cqhu/+Cl+Jq/2gGng/4KVsfIF0o84M5N39KVG+84yGzJlwWGiu4GojhTnILQLoA3+fFw GujaeFJdX9HoxxXA+mZ7Z5u/aktjh5AGTBc3rxQ0n6GyTtk8Po4gD+R0fuOs+zGWnggj DABpQIfoKwegqaTr4Hj9ptitdTMRokXNWY7ZXiUsSmbbVw7MQ1vXNJiW7/n5ba3B6QcM BilgqbbFE2BZjblVVLwNAj89of9nyVgkBZFKySpTI/CGezTwXyBHnmM/2wmrateoEFB5 OHFA== 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 c19-20020a63d153000000b00438854c876esi8940847pgj.419.2022.11.13.23.51.19; Sun, 13 Nov 2022 23:51:31 -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 S235979AbiKNHnC (ORCPT + 99 others); Mon, 14 Nov 2022 02:43:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235967AbiKNHmr (ORCPT ); Mon, 14 Nov 2022 02:42:47 -0500 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BBA5186F9; Sun, 13 Nov 2022 23:42:44 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R411e4;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=19;SR=0;TI=SMTPD_---0VUjWi2J_1668411760; Received: from j66e01291.sqa.eu95.tbsite.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VUjWi2J_1668411760) by smtp.aliyun-inc.com; Mon, 14 Nov 2022 15:42:41 +0800 From: Jing Zhang To: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan Cc: 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: [RFC PATCH v2 4/6] perf vendor events arm64: Add branch metrics for neoverse-n2 Date: Mon, 14 Nov 2022 15:41:58 +0800 Message-Id: <1668411720-3581-5-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1668411720-3581-1-git-send-email-renyu.zj@linux.alibaba.com> 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,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?1748201524772435101?= X-GMAIL-MSGID: =?utf-8?q?1749457087498215996?= Add branch related metrics. Signed-off-by: Jing Zhang --- .../arch/arm64/arm/neoverse-n2/metrics.json | 21 +++++++++++++++++++++ 1 file changed, 21 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 1690ef6..e960a66 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 @@ -131,5 +131,26 @@ "BriefDescription": "The rate of LL Cache read hit to the overall LL Cache read", "MetricGroup": "Cache", "MetricName": "ll_cache_read_hit_rate" + }, + { + "MetricExpr": "BR_MIS_PRED / INST_RETIRED * 1000", + "PublicDescription": "The rate of branches mis-predicted per kilo instructions", + "BriefDescription": "The rate of branches mis-predicted per kilo instructions", + "MetricGroup": "Branch", + "MetricName": "branch_mpki" + }, + { + "MetricExpr": "(BR_PRED - BR_MIS_PRED) / INST_RETIRED * 1000", + "PublicDescription": "The rate of branches retired per kilo instructions", + "BriefDescription": "The rate of branches retired per kilo instructions", + "MetricGroup": "Branch", + "MetricName": "branch_pki" + }, + { + "MetricExpr": "BR_MIS_PRED / BR_PRED", + "PublicDescription": "The rate of branches mis-predited to the overall branches", + "BriefDescription": "The rate of branches mis-predited to the overall branches", + "MetricGroup": "Branch", + "MetricName": "branch_miss_pred_rate" } ] \ No newline at end of file