Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp617760rwb; Fri, 13 Jan 2023 01:58:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXs3Zd6PNFSUyTHeylWvcgSRRb8xOxjR/InOEdBa9bQou40ZkNhW98PlIyPt2Dzq3GuQa8sG X-Received: by 2002:a05:6a20:b91c:b0:b2:4327:fa6c with SMTP id fe28-20020a056a20b91c00b000b24327fa6cmr79798286pzb.18.1673603881300; Fri, 13 Jan 2023 01:58:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673603881; cv=none; d=google.com; s=arc-20160816; b=cwNBHb78DRzC1cJRHyd+DTBasHxMR2TEh9qUvQT/YxMitCpEUKlsMpjHh4KauXowQv PrSGO2YjneR6bJ/MaddHvgWw9G10CoK7QG8WLYgVZfOotIwR66sE1Ev9H1AKvytOAZlS x+NrRvCMLylNMC1G1MvSM6pCcydiGd7F2MLNP490CZqpJfvl63OmeIT/jZSsKsx5CN4m WkMz64FmwolukVP1FYC6DVFSMYqEBYU2rJmmlXpFBLXo8mHx3eBcBPPXqeUjMZYnuFzg MOlLA3m0LiqkhjLmvRwRupUVsqWJN6wGoC8pGwhEZkv2ZTdMhsL9DMP8yCAlW0oVCFVx nduQ== 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=nDhHLP36g/nLnhW++SOE5UQFtfghw2iRNO9Nob0fOIQ=; b=dnw4y6iDMLGWNAAYBjUHjl0/ipbq4+qRvikyFRuYvsYP6TnlDnmsxMHVA/dRE9fJLb ePV/1gy9vECzV6q4VCUN1uySFjCYIAI1A5BwY+D5vZKsupWBRaMGAUlKtEGOJb9fcDgr WrnsymCtT0DrXCiXhgEHlMBVQGIzY8WeE1ofl5GVaqZ4n2KC7Td85E7bIy8CobKDy86p 0JPWPrIFnMa+vHFD3F8uMrYWzPzKG0w8DLCJxYI2CfIiA6pOygwuq9e7Gxv7V0emm4/Q WtA9ZEw8wMmvPeo+mifzDyRFiJ37G1CjTEvwOcPXf8y7zHLJaEEn+XgqztqpxQ60lquL 2aiw== 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 bk13-20020a056a02028d00b004bef62f9edesi3683189pgb.19.2023.01.13.01.57.52; Fri, 13 Jan 2023 01:58:01 -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 S240584AbjAMJ2y (ORCPT + 51 others); Fri, 13 Jan 2023 04:28:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240986AbjAMJ1V (ORCPT ); Fri, 13 Jan 2023 04:27:21 -0500 Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A389B4318C; Fri, 13 Jan 2023 01:22:44 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;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_---0VZUDRTd_1673601755; Received: from srmbuffer011165236051.sqa.eu95(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VZUDRTd_1673601755) by smtp.aliyun-inc.com; Fri, 13 Jan 2023 17:22:36 +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 v7 3/9] perf vendor events arm64: Add common topdown L1 metrics Date: Fri, 13 Jan 2023 17:22:14 +0800 Message-Id: <1673601740-122788-4-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1673601740-122788-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1673601740-122788-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 The metrics of topdown L1 are from ARM sbsa7.0 platform design doc[0], D37-38, which are standard. So put them in the common file sbsa.json of arm64, so that other cores besides n2/v2 can also be reused. [0] https://documentation-service.arm.com/static/60250c7395978b529036da86?token= Signed-off-by: Jing Zhang --- tools/perf/pmu-events/arch/arm64/sbsa.json | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/sbsa.json diff --git a/tools/perf/pmu-events/arch/arm64/sbsa.json b/tools/perf/pmu-events/arch/arm64/sbsa.json new file mode 100644 index 0000000..f678c37e --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/sbsa.json @@ -0,0 +1,30 @@ +[ + { + "MetricExpr": "stall_slot_frontend / (#slots * cpu_cycles)", + "BriefDescription": "Frontend bound L1 topdown metric", + "MetricGroup": "TopdownL1", + "MetricName": "frontend_bound", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "(1 - op_retired / op_spec) * (1 - stall_slot / (#slots * cpu_cycles))", + "BriefDescription": "Bad speculation L1 topdown metric", + "MetricGroup": "TopdownL1", + "MetricName": "bad_speculation", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "(op_retired / op_spec) * (1 - stall_slot / (#slots * cpu_cycles))", + "BriefDescription": "Retiring L1 topdown metric", + "MetricGroup": "TopdownL1", + "MetricName": "retiring", + "ScaleUnit": "100%" + }, + { + "MetricExpr": "stall_slot_backend / (#slots * cpu_cycles)", + "BriefDescription": "Backend Bound L1 topdown metric", + "MetricGroup": "TopdownL1", + "MetricName": "backend_bound", + "ScaleUnit": "100%" + } +] -- 1.8.3.1