Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4406875rwb; Mon, 16 Jan 2023 23:53:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXvu/NoaAypwADCcYUQc0Mcn1Xpcr7R61Fn9yhI60CUaElLLa6kjOulS/s5evRcykTPtFhmH X-Received: by 2002:a05:6a00:1585:b0:578:8864:b25c with SMTP id u5-20020a056a00158500b005788864b25cmr3366804pfk.25.1673941999080; Mon, 16 Jan 2023 23:53:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673941999; cv=none; d=google.com; s=arc-20160816; b=f79h57YuFSU5BVR01EUDo+QdR9LArbVkNojYPdhAMA+p+8f7aUes3skLzOv8j9m9sr NlsiAiIpLrD/iuSGfgfrZYCMghn8oUYnEtWDdH5YgptZ0bCdpBy4izuThUArqG7BZK2w /KxXOqI0O3QfUXrvCpCZhRC17NmVrP+byJl0gAa/SFPMFVno+NWlP30Os4O7mKx2BNeP UvgpimKg9d/kIgHHAsaDENITJ7Y+yon93yeMSHZXsYvzC0/o+N39uJ3qFtylumJTsw+q TbecRVQo0FDmXld21N5Ebf0kVNPro30BCQ33RoBCWfOKWuQ7vuxY8EkCs0ITQFmwuGYw hcRg== 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=5vZWT+EAYDX42NtYpXwsSi3yaUGjXrYJ4gqPoihKTso=; b=yu0yl/ixnBpM0SEd8bAT5PfoQFe7vf9D2VJ/klsVZJYaLnG5TVZgFxjRbIgLwCfifH O1EUD6viHLZAffc2uiN0qDdG0/3BDr9RV1TGLCykGgsX/VSgf1ETp0CoIdyrLxbdGkc4 sq0vfp1ufVWT3fHrrqLjjT0i5IOyX4E88mFi43Us4rYlMZVl5IucfR/NpVe5a/rR7zax F+sFXHUvQwUBbxm72orE46UwTlDTTCnacSJuyJxvM8ZwRXIecQ3Ks+Mt5z5M/9jBImkR yo6dhWrB1OwcUo7KHuMRpweA+3gm5eTkn228XH7d17aoewaxLw7p3X1tRh/rpPnijWUN OgHg== 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 s6-20020a056a0008c600b00576dee77c98si34535272pfu.299.2023.01.16.23.53.13; Mon, 16 Jan 2023 23:53:19 -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 S235892AbjAQHaQ (ORCPT + 49 others); Tue, 17 Jan 2023 02:30:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235686AbjAQH37 (ORCPT ); Tue, 17 Jan 2023 02:29:59 -0500 Received: from out30-101.freemail.mail.aliyun.com (out30-101.freemail.mail.aliyun.com [115.124.30.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB9E62385E; Mon, 16 Jan 2023 23:29:56 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0VZm6e3K_1673940591; Received: from srmbuffer011165236051.sqa.eu95(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VZm6e3K_1673940591) by smtp.aliyun-inc.com; Tue, 17 Jan 2023 15:29:51 +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 v8 3/9] perf vendor events arm64: Add common topdown L1 metrics Date: Tue, 17 Jan 2023 15:29:27 +0800 Message-Id: <1673940573-90503-4-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1673940573-90503-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1673940573-90503-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 Reviewed-by: John Garry Acked-by: Ian Rogers --- 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