Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp373593rwr; Wed, 26 Apr 2023 00:03:51 -0700 (PDT) X-Google-Smtp-Source: AKy350ZYUXtjRijjdYIF55U9/BuYblb4ibjWpK9TIwGouTipwiRtsOXmxxi3hSE5Awk9QbXDlFSw X-Received: by 2002:a17:90b:a53:b0:246:aebf:21f5 with SMTP id gw19-20020a17090b0a5300b00246aebf21f5mr19411864pjb.41.1682492631276; Wed, 26 Apr 2023 00:03:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682492631; cv=none; d=google.com; s=arc-20160816; b=aLCUeSxWAGW0JCWmEuvb8iEEfpaMdgrGXLgjgsKEfkGWTwXTumpcfx3CVpOX7eY1yE k4Y7NLYoTSlGZUgY16cYmpCUC/BBAEg5hdtQPMtpREPOfB//ip5o/fiZarClQpVakqBI MSd08Yw1BJ+ZnIUEFwp2/WWHTCSaYKsVfv99V1dAallaFY8hrportGVRklTgEj3MHs7u u3MImrSl0JwXapgIm/d2g5Ed8pXwZ36knsXmf1rlpjfHUIL2YgWjsXYNpdze8ETut6DM EX9gW3XDLqIAqEJ/yDauFXC8TS4jUtX+/cMCZaVmcJvtCffdRjTs0jD9iXJVEzDCh0zA l+mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:from:subject :references:mime-version:message-id:in-reply-to:date:dkim-signature; bh=HKRXjgqbYIqcrQXTW2urd+62tTNfVoWhxwwe/l1W4zU=; b=tg9q0+eI/cTkjoJsEZ8ST+OWUYAA4fOdBTNIDQB9jonVyOX1n2kKjMay4mzX41GP11 MNi7LYeqwMoRoGGSqzXlJihNCtt7KqPBMhSDyLp+/IzAWIAbJzcS5nOAbmgzl9TabMxi uLTeP+PQHIgwJj+WRF1+FKA0ES84XAiHSW0kM16dyfxmG0TWmFvvPlPC0GGMj1DjdP07 VsTKAWnsrCbLVC/zhoum67Ne1tO4z8PnRqoPJ5pNQ/hL3Bf1oP0tmiAgcOG2x5qz0JKw gxYEF7TOHCMUG0aj1b6ZGIDT5BzowWJyXq5j4RsxTnhQCz5i60t6KDZAmGxoOVVg9jOY wwMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=BQxyfn11; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e13-20020a65688d000000b0050c06b2361dsi15287607pgt.72.2023.04.26.00.03.39; Wed, 26 Apr 2023 00:03:51 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20221208 header.b=BQxyfn11; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239777AbjDZHC6 (ORCPT + 99 others); Wed, 26 Apr 2023 03:02:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239737AbjDZHCV (ORCPT ); Wed, 26 Apr 2023 03:02:21 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFC6F4214 for ; Wed, 26 Apr 2023 00:01:53 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-b8f4c437ce5so11495546276.3 for ; Wed, 26 Apr 2023 00:01:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682492513; x=1685084513; h=content-transfer-encoding:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:from:to:cc:subject:date :message-id:reply-to; bh=HKRXjgqbYIqcrQXTW2urd+62tTNfVoWhxwwe/l1W4zU=; b=BQxyfn11M/2bPMIUzaGIhi8OabHP6kgfi3nIu2lrCumQw7DU02534mLLTz2waQlu2J iZ2tYuWfC9Yr93gK5BEuLt42eamkBJKW0o1kGtryRG+RBNjH8hCaot56l9fdjnfANlye R4DzFOypCGsyunoCERfBU/LJHEfl2ftL7BX8QuZxvNvVWMPQxZbqR1GoIM2gOnfIunBI JNWNdvU6ctvY7ijkSpOExGYt66eqm0Znb4xTbXYSGIXG8I7XUGH8kC3lGHzaJ62L9vO7 TCBMF1h7naEv0TmFW9zlMvlM8h0bNBTN2MWJKkmvytSUE6CI9donzJHy6xdqt8EqrkIT Z2xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682492513; x=1685084513; h=content-transfer-encoding:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=HKRXjgqbYIqcrQXTW2urd+62tTNfVoWhxwwe/l1W4zU=; b=k86Ed6eAKZ1jLsmSq+BF5O1pXkAfIEYsg6sQIyNtXjrV/UntH79hI7373qOxokSdtT XkgUKlAwAE9rL4k5zgjFXNV/Eu9/2IyxfhP3sh8pDgFXV8NeYxOnAbnYkdkoU7bk/r3y FK+cmbu555rJkksg1nQfWCp4edB6EW8sS+ep1MidILI6qUqhZCG9PfB/fqrmstcuGAt6 Ja8CFWG/S68Pc+9TDEoJNYWxhYgA4o2+ih6UEeMw3xwxHCgUoVt82VG4PbWyn4z3IC4L nZEWLLoWmlQwO7y4SgHy6BBtatYL3yxm5hUTNI+d1WmwN3l7R0hr/cL7YcGoIL9i+ci9 w+Kg== X-Gm-Message-State: AAQBX9caDUzh+x84h072riHV43PRRSo3DYxKxpvJl1EaZk+6xU1WQFV8 TA4n2h6NSHsuydunQWF7GJYsKLYTklIm X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:144f:e890:2b29:48d9]) (user=irogers job=sendgmr) by 2002:a25:d796:0:b0:b90:3342:9154 with SMTP id o144-20020a25d796000000b00b9033429154mr7314263ybg.3.1682492512836; Wed, 26 Apr 2023 00:01:52 -0700 (PDT) Date: Wed, 26 Apr 2023 00:00:16 -0700 In-Reply-To: <20230426070050.1315519-1-irogers@google.com> Message-Id: <20230426070050.1315519-7-irogers@google.com> Mime-Version: 1.0 References: <20230426070050.1315519-1-irogers@google.com> X-Mailer: git-send-email 2.40.1.495.gc816e09b53d-goog Subject: [PATCH v1 06/40] perf vendor events intel: Add tigerlake metric constraints From: Ian Rogers To: Arnaldo Carvalho de Melo , Kan Liang , Ahmad Yasin , Peter Zijlstra , Ingo Molnar , Stephane Eranian , Andi Kleen , Perry Taylor , Samantha Alt , Caleb Biggers , Weilin Wang , Edward Baker , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Florian Fischer , Rob Herring , Zhengjun Xing , John Garry , Kajol Jain , Sumanth Korikkar , Thomas Richter , Tiezhu Yang , Ravi Bangoria , Leo Yan , Yang Jihong , James Clark , Suzuki Poulouse , Kang Minchul , Athira Rajeev , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ian Rogers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_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 Previously these constraints were disabled as they contained topdown events. Since: https://lore.kernel.org/all/20230312021543.3060328-9-irogers@google.com/ the topdown events are correctly grouped even if no group exists. This change was created by PR: https://github.com/intel/perfmon/pull/71 Signed-off-by: Ian Rogers --- .../pmu-events/arch/x86/tigerlake/tgl-metrics.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/perf/pmu-events/arch/x86/tigerlake/tgl-metrics.json b/to= ols/perf/pmu-events/arch/x86/tigerlake/tgl-metrics.json index 4c80d6be6cf1..6ac4a9e5d013 100644 --- a/tools/perf/pmu-events/arch/x86/tigerlake/tgl-metrics.json +++ b/tools/perf/pmu-events/arch/x86/tigerlake/tgl-metrics.json @@ -305,6 +305,7 @@ }, { "BriefDescription": "This metric represents overall arithmetic flo= ating-point (FP) operations fraction the CPU has executed (retired)", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "tma_x87_use + tma_fp_scalar + tma_fp_vector", "MetricGroup": "HPC;TopdownL3;tma_L3_group;tma_light_operations_gr= oup", "MetricName": "tma_fp_arith", @@ -407,6 +408,7 @@ }, { "BriefDescription": "Branch Misprediction Cost: Fraction of TMA sl= ots wasted per non-speculative branch misprediction (retired JEClear)", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "(tma_branch_mispredicts + tma_fetch_latency * tma_m= ispredicts_resteers / (tma_branch_resteers + tma_dsb_switches + tma_icache_= misses + tma_itlb_misses + tma_lcp + tma_ms_switches)) * tma_info_slots / B= R_MISP_RETIRED.ALL_BRANCHES", "MetricGroup": "Bad;BrMispredicts;tma_issueBM", "MetricName": "tma_info_branch_misprediction_cost", @@ -452,6 +454,7 @@ }, { "BriefDescription": "Probability of Core Bound bottleneck hidden b= y SMT-profiling artifacts", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "(100 * (1 - tma_core_bound / tma_ports_utilization = if tma_core_bound < tma_ports_utilization else 1) if tma_info_smt_2t_utiliz= ation > 0.5 else 0)", "MetricGroup": "Cor;SMT", "MetricName": "tma_info_core_bound_likely", @@ -504,6 +507,7 @@ }, { "BriefDescription": "Total pipeline cost of DSB (uop cache) misses= - subset of the Instruction_Fetch_BW Bottleneck", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "100 * (tma_fetch_latency * tma_dsb_switches / (tma_= branch_resteers + tma_dsb_switches + tma_icache_misses + tma_itlb_misses + = tma_lcp + tma_ms_switches) + tma_fetch_bandwidth * tma_mite / (tma_dsb + tm= a_lsd + tma_mite))", "MetricGroup": "DSBmiss;Fed;tma_issueFB", "MetricName": "tma_info_dsb_misses", @@ -585,6 +589,7 @@ }, { "BriefDescription": "Total pipeline cost of instruction fetch band= width related bottlenecks", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "100 * (tma_frontend_bound - tma_fetch_latency * tma= _mispredicts_resteers / (tma_branch_resteers + tma_dsb_switches + tma_icach= e_misses + tma_itlb_misses + tma_lcp + tma_ms_switches)) - tma_info_big_cod= e", "MetricGroup": "Fed;FetchBW;Frontend", "MetricName": "tma_info_instruction_fetch_bw", @@ -949,6 +954,7 @@ }, { "BriefDescription": "Total pipeline cost of Memory Address Transla= tion related bottlenecks (data-side TLBs)", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "100 * tma_memory_bound * (tma_l1_bound / max(tma_me= mory_bound, tma_dram_bound + tma_l1_bound + tma_l2_bound + tma_l3_bound + t= ma_store_bound) * (tma_dtlb_load / max(tma_l1_bound, tma_4k_aliasing + tma_= dtlb_load + tma_fb_full + tma_lock_latency + tma_split_loads + tma_store_fw= d_blk)) + tma_store_bound / (tma_dram_bound + tma_l1_bound + tma_l2_bound += tma_l3_bound + tma_store_bound) * (tma_dtlb_store / (tma_dtlb_store + tma_= false_sharing + tma_split_stores + tma_store_latency + tma_streaming_stores= )))", "MetricGroup": "Mem;MemoryTLB;Offcore;tma_issueTLB", "MetricName": "tma_info_memory_data_tlbs", @@ -957,6 +963,7 @@ }, { "BriefDescription": "Total pipeline cost of Memory Latency related= bottlenecks (external memory and off-core caches)", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "100 * tma_memory_bound * (tma_dram_bound / (tma_dra= m_bound + tma_l1_bound + tma_l2_bound + tma_l3_bound + tma_store_bound) * (= tma_mem_latency / (tma_mem_bandwidth + tma_mem_latency)) + tma_l3_bound / (= tma_dram_bound + tma_l1_bound + tma_l2_bound + tma_l3_bound + tma_store_bou= nd) * (tma_l3_hit_latency / (tma_contested_accesses + tma_data_sharing + tm= a_l3_hit_latency + tma_sq_full)) + tma_l2_bound / (tma_dram_bound + tma_l1_= bound + tma_l2_bound + tma_l3_bound + tma_store_bound))", "MetricGroup": "Mem;MemoryLat;Offcore;tma_issueLat", "MetricName": "tma_info_memory_latency", @@ -965,6 +972,7 @@ }, { "BriefDescription": "Total pipeline cost of Branch Misprediction r= elated bottlenecks", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "100 * (tma_branch_mispredicts + tma_fetch_latency *= tma_mispredicts_resteers / (tma_branch_resteers + tma_dsb_switches + tma_i= cache_misses + tma_itlb_misses + tma_lcp + tma_ms_switches))", "MetricGroup": "Bad;BadSpec;BrMispredicts;tma_issueBM", "MetricName": "tma_info_mispredictions", @@ -1016,6 +1024,7 @@ }, { "BriefDescription": "Average number of Uops retired in cycles wher= e at least one uop has retired.", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "tma_retiring * tma_info_slots / cpu@UOPS_RETIRED.SL= OTS\\,cmask\\=3D1@", "MetricGroup": "Pipeline;Ret", "MetricName": "tma_info_retire" @@ -1210,6 +1219,7 @@ }, { "BriefDescription": "This metric represents fraction of slots wher= e the CPU was retiring memory operations -- uops for memory load or store a= ccesses.", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "tma_light_operations * MEM_INST_RETIRED.ANY / INST_= RETIRED.ANY", "MetricGroup": "Pipeline;TopdownL3;tma_L3_group;tma_light_operatio= ns_group", "MetricName": "tma_memory_operations", @@ -1280,6 +1290,7 @@ }, { "BriefDescription": "This metric represents the remaining light uo= ps fraction the CPU has executed - remaining means not covered by other sib= ling nodes", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "max(0, tma_light_operations - (tma_fp_arith + tma_m= emory_operations + tma_branch_instructions + tma_nop_instructions))", "MetricGroup": "Pipeline;TopdownL3;tma_L3_group;tma_light_operatio= ns_group", "MetricName": "tma_other_light_ops", --=20 2.40.1.495.gc816e09b53d-goog