Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1177201rwr; Thu, 27 Apr 2023 13:35:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4cQgFCzW8dyWq/NtI44ZAGPMPO5aKMTvXPtj6+CCThMWtcoFA1FOSd1R3Zf0VgZYaUeoyB X-Received: by 2002:a05:6a00:21cf:b0:63d:2382:4948 with SMTP id t15-20020a056a0021cf00b0063d23824948mr4309104pfj.25.1682627713453; Thu, 27 Apr 2023 13:35:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682627713; cv=none; d=google.com; s=arc-20160816; b=rmS5UnujaABksgjvQjU/F2qtGavRqLRgcLlkoClOycbhZQ5cVczdmU940OL2u5P/kL pNvKsulzu3dTpqhuG9HghKLMa2Wu+dXgw4J57jv37XWkiUfRhvJ2us5DEJC/orr6xHz/ Prs7pNcfyj40kE/wa7IrHRhki/r71kJvyULz1Q4fQ4amj3ceWG5PAFkgT75k7sybCq5e Ja4/i8iEz+lMtpMWbHNOxFaWts2VCKeXhUeqgcZU/D1oDEqoYU2kYtzTeaicOHu27f0f c3crvDx8wHxmMnHBewi4fSAiF8hKbkNX0D5WnCvqHnlYNgeNbaJSwCRZbcYhx5AjfOsP pJWg== 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:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=6HAS9Sjys4o5xRDIJ3TABZcGs5bn9+R6GoOuNEpEwLY=; b=ZK+dS0+hiOIEtciKElJOjjHNYD4/13I1xaKKlxb5VsHdjBntxaS5mJMCPbsfJoP0m0 n4ACt8iTmKIuZhKC3rsW1Fvo+lMVKDZm1zqAHaLlLfQdpR+hccZA1wUp/w2gwLjFcwGY oFKGvXWzpEmqTZqY6ALniQcuyClaZAJntlvGXhA0o7H+ab3rk4RuuDB13LtL1Ip2briI AtYG5SuSxaOnPXtJGsL5/Hfx8RlP2JoZr702fMIrb/MHW8YlCMCCD4iVKIFbRA49PUZX 2W21rOkTU81qNjFPkwFsODrMyfpWfYlH0c1d6E8GVs4OS8XdhXCwtPWQlKSCI66v/eQv Fpng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="AH/1FXFO"; 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 a1-20020aa794a1000000b0063d2561a285si19801264pfl.152.2023.04.27.13.35.00; Thu, 27 Apr 2023 13:35:13 -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="AH/1FXFO"; 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 S244992AbjD0UWq (ORCPT + 99 others); Thu, 27 Apr 2023 16:22:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344210AbjD0UWp (ORCPT ); Thu, 27 Apr 2023 16:22:45 -0400 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C039140C9 for ; Thu, 27 Apr 2023 13:22:42 -0700 (PDT) Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-3f0a2f8216fso823101cf.0 for ; Thu, 27 Apr 2023 13:22:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682626962; x=1685218962; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6HAS9Sjys4o5xRDIJ3TABZcGs5bn9+R6GoOuNEpEwLY=; b=AH/1FXFOeVbaxFFZtyjllNI1DbtQC/7rWXv8gj8KH0O9GF5lGBoUIx1FhPJSncHo62 t8C0YgX2ARLdHuk0R687ELRmg05Js5pPpRqoIGe8SC7JER7zqUPIA1aYhfzf9p+i7oum qg8m93g3y+ULdF//2DVtdqnUicM9bMeLfTtDiJyDR09IurNJL4MfFeVJYI7AbKrisEgL HBuFB3T4tdqtGnd49KaWkIIFADg1FYvFog3eAdJqzOryXasmoEO2df83uR67Xio9moJz dmAGfyA9Pm9/zkMgNoFlHYkh6tVrYZGohXCiZAyDaNzKyGMMnhWZx9U4sZRHlA5aNMZ4 a+9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682626962; x=1685218962; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6HAS9Sjys4o5xRDIJ3TABZcGs5bn9+R6GoOuNEpEwLY=; b=fNjB6uBOP+GoofOEyDOyzkfe7tn4Pf/DfWQ3yiSxwfLNDShPc3u4yLMZNDbYevFK+R LQt6hiKXmUlVuproXq36MYBynyfCAcrBv2RFCD6ljG4mJuq1Ab9B9lExK0NMgiZfbMuu zTE4vR5TdN/PKILKWReenZoio1/SVSPt0j70wdtqljQ0LwEFBVzjofGE42w1FQkzza8K uRcuiitwP/pDnzh/2tn9ywBVU8FPcSHMAg8k2JyKnYojVmX3j352V96wCP3cOuKbgGrD vbu52TfeRdZg/2LlndNx2tb2U1BTGKQKdv3auXHLOn12kcz3WjfOsoJFC3NnPGYd0onJ G5IA== X-Gm-Message-State: AC+VfDwhmH8ySr0+7Elf4/MQutkAkgX/juUJBC8LvMoY5tTpqfnioAM0 VNXTIhs9j0lEVKFAKQFdJr81lfAWWHF6aBcdGxXqwg== X-Received: by 2002:a05:622a:1ba3:b0:3ef:330c:8f9e with SMTP id bp35-20020a05622a1ba300b003ef330c8f9emr95753qtb.10.1682626961661; Thu, 27 Apr 2023 13:22:41 -0700 (PDT) MIME-Version: 1.0 References: <20230426070050.1315519-1-irogers@google.com> <20230426070050.1315519-4-irogers@google.com> <23a15658-e3f7-59f2-24b3-cfafe87f4145@linux.intel.com> In-Reply-To: <23a15658-e3f7-59f2-24b3-cfafe87f4145@linux.intel.com> From: Ian Rogers Date: Thu, 27 Apr 2023 13:22:29 -0700 Message-ID: Subject: Re: [PATCH v1 03/40] perf vendor events intel: Add icelake metric constraints To: "Liang, Kan" Cc: Arnaldo Carvalho de Melo , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 On Thu, Apr 27, 2023 at 12:06=E2=80=AFPM Liang, Kan wrote: > > > > On 2023-04-26 3:00 a.m., Ian Rogers wrote: > > 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 > > --- > > .../perf/pmu-events/arch/x86/icelake/icl-metrics.json | 11 +++++++++++ > > Since it targets fixing the hybrid issues, could you please move the > unrelated patch out of the series? A huge series is realy hard to be > reviewed. I have done. The independent patches are at the front while the dependencies are in the later patches. This is covered in the cover letter. Thanks, Ian > Thanks, > Kan > > > 1 file changed, 11 insertions(+) > > > > diff --git a/tools/perf/pmu-events/arch/x86/icelake/icl-metrics.json b/= tools/perf/pmu-events/arch/x86/icelake/icl-metrics.json > > index f45ae3483df4..cb58317860ea 100644 > > --- a/tools/perf/pmu-events/arch/x86/icelake/icl-metrics.json > > +++ b/tools/perf/pmu-events/arch/x86/icelake/icl-metrics.json > > @@ -311,6 +311,7 @@ > > }, > > { > > "BriefDescription": "This metric represents overall arithmetic= floating-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_operation= s_group", > > "MetricName": "tma_fp_arith", > > @@ -413,6 +414,7 @@ > > }, > > { > > "BriefDescription": "Branch Misprediction Cost: Fraction of TM= A slots wasted per non-speculative branch misprediction (retired JEClear)", > > + "MetricConstraint": "NO_GROUP_EVENTS", > > "MetricExpr": "(tma_branch_mispredicts + tma_fetch_latency * t= ma_mispredicts_resteers / (tma_branch_resteers + tma_dsb_switches + tma_ica= che_misses + tma_itlb_misses + tma_lcp + tma_ms_switches)) * tma_info_slots= / BR_MISP_RETIRED.ALL_BRANCHES", > > "MetricGroup": "Bad;BrMispredicts;tma_issueBM", > > "MetricName": "tma_info_branch_misprediction_cost", > > @@ -458,6 +460,7 @@ > > }, > > { > > "BriefDescription": "Probability of Core Bound bottleneck hidd= en by SMT-profiling artifacts", > > + "MetricConstraint": "NO_GROUP_EVENTS", > > "MetricExpr": "(100 * (1 - tma_core_bound / tma_ports_utilizat= ion if tma_core_bound < tma_ports_utilization else 1) if tma_info_smt_2t_ut= ilization > 0.5 else 0)", > > "MetricGroup": "Cor;SMT", > > "MetricName": "tma_info_core_bound_likely", > > @@ -510,6 +513,7 @@ > > }, > > { > > "BriefDescription": "Total pipeline cost of DSB (uop cache) mi= sses - 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_misse= s + tma_lcp + tma_ms_switches) + tma_fetch_bandwidth * tma_mite / (tma_dsb = + tma_lsd + tma_mite))", > > "MetricGroup": "DSBmiss;Fed;tma_issueFB", > > "MetricName": "tma_info_dsb_misses", > > @@ -591,6 +595,7 @@ > > }, > > { > > "BriefDescription": "Total pipeline cost of instruction fetch = bandwidth related bottlenecks", > > + "MetricConstraint": "NO_GROUP_EVENTS", > > "MetricExpr": "100 * (tma_frontend_bound - tma_fetch_latency *= tma_mispredicts_resteers / (tma_branch_resteers + tma_dsb_switches + tma_i= cache_misses + tma_itlb_misses + tma_lcp + tma_ms_switches)) - tma_info_big= _code", > > "MetricGroup": "Fed;FetchBW;Frontend", > > "MetricName": "tma_info_instruction_fetch_bw", > > @@ -929,6 +934,7 @@ > > }, > > { > > "BriefDescription": "Total pipeline cost of Memory Address Tra= nslation related bottlenecks (data-side TLBs)", > > + "MetricConstraint": "NO_GROUP_EVENTS", > > "MetricExpr": "100 * tma_memory_bound * (tma_l1_bound / max(tm= a_memory_bound, tma_dram_bound + tma_l1_bound + tma_l2_bound + tma_l3_bound= + tma_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_stor= e_fwd_blk)) + tma_store_bound / (tma_dram_bound + tma_l1_bound + tma_l2_bou= nd + tma_l3_bound + tma_store_bound) * (tma_dtlb_store / (tma_dtlb_store + = tma_false_sharing + tma_split_stores + tma_store_latency + tma_streaming_st= ores)))", > > "MetricGroup": "Mem;MemoryTLB;Offcore;tma_issueTLB", > > "MetricName": "tma_info_memory_data_tlbs", > > @@ -937,6 +943,7 @@ > > }, > > { > > "BriefDescription": "Total pipeline cost of Memory Latency rel= ated bottlenecks (external memory and off-core caches)", > > + "MetricConstraint": "NO_GROUP_EVENTS", > > "MetricExpr": "100 * tma_memory_bound * (tma_dram_bound / (tma= _dram_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= _bound) * (tma_l3_hit_latency / (tma_contested_accesses + tma_data_sharing = + tma_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", > > @@ -945,6 +952,7 @@ > > }, > > { > > "BriefDescription": "Total pipeline cost of Branch Mispredicti= on related bottlenecks", > > + "MetricConstraint": "NO_GROUP_EVENTS", > > "MetricExpr": "100 * (tma_branch_mispredicts + tma_fetch_laten= cy * tma_mispredicts_resteers / (tma_branch_resteers + tma_dsb_switches + t= ma_icache_misses + tma_itlb_misses + tma_lcp + tma_ms_switches))", > > "MetricGroup": "Bad;BadSpec;BrMispredicts;tma_issueBM", > > "MetricName": "tma_info_mispredictions", > > @@ -996,6 +1004,7 @@ > > }, > > { > > "BriefDescription": "Average number of Uops retired in cycles = where at least one uop has retired.", > > + "MetricConstraint": "NO_GROUP_EVENTS", > > "MetricExpr": "tma_retiring * tma_info_slots / cpu@UOPS_RETIRE= D.SLOTS\\,cmask\\=3D1@", > > "MetricGroup": "Pipeline;Ret", > > "MetricName": "tma_info_retire" > > @@ -1196,6 +1205,7 @@ > > }, > > { > > "BriefDescription": "This metric represents fraction of slots = where the CPU was retiring memory operations -- uops for memory load or sto= re accesses.", > > + "MetricConstraint": "NO_GROUP_EVENTS", > > "MetricExpr": "tma_light_operations * MEM_INST_RETIRED.ANY / I= NST_RETIRED.ANY", > > "MetricGroup": "Pipeline;TopdownL3;tma_L3_group;tma_light_oper= ations_group", > > "MetricName": "tma_memory_operations", > > @@ -1266,6 +1276,7 @@ > > }, > > { > > "BriefDescription": "This metric represents the remaining ligh= t uops fraction the CPU has executed - remaining means not covered by other= sibling nodes", > > + "MetricConstraint": "NO_GROUP_EVENTS", > > "MetricExpr": "max(0, tma_light_operations - (tma_fp_arith + t= ma_memory_operations + tma_branch_instructions + tma_nop_instructions))", > > "MetricGroup": "Pipeline;TopdownL3;tma_L3_group;tma_light_oper= ations_group", > > "MetricName": "tma_other_light_ops",