12099f51dSAndi Kleen[
22099f51dSAndi Kleen    {
32f244993SIan Rogers        "BriefDescription": "C2 residency percent per package",
42f244993SIan Rogers        "MetricExpr": "cstate_pkg@c2\\-residency@ / TSC",
52099f51dSAndi Kleen        "MetricGroup": "Power",
62f244993SIan Rogers        "MetricName": "C2_Pkg_Residency",
72f244993SIan Rogers        "ScaleUnit": "100%"
887493110SIan Rogers    },
987493110SIan Rogers    {
1061ec07f5SHaiyan Song        "BriefDescription": "C3 residency percent per core",
1187493110SIan Rogers        "MetricExpr": "cstate_core@c3\\-residency@ / TSC",
122099f51dSAndi Kleen        "MetricGroup": "Power",
1387493110SIan Rogers        "MetricName": "C3_Core_Residency",
1487493110SIan Rogers        "ScaleUnit": "100%"
152099f51dSAndi Kleen    },
162099f51dSAndi Kleen    {
1761ec07f5SHaiyan Song        "BriefDescription": "C3 residency percent per package",
1887493110SIan Rogers        "MetricExpr": "cstate_pkg@c3\\-residency@ / TSC",
192099f51dSAndi Kleen        "MetricGroup": "Power",
2087493110SIan Rogers        "MetricName": "C3_Pkg_Residency",
2187493110SIan Rogers        "ScaleUnit": "100%"
222099f51dSAndi Kleen    },
232099f51dSAndi Kleen    {
242f244993SIan Rogers        "BriefDescription": "C6 residency percent per core",
252f244993SIan Rogers        "MetricExpr": "cstate_core@c6\\-residency@ / TSC",
262f244993SIan Rogers        "MetricGroup": "Power",
272f244993SIan Rogers        "MetricName": "C6_Core_Residency",
282f244993SIan Rogers        "ScaleUnit": "100%"
292f244993SIan Rogers    },
302f244993SIan Rogers    {
3161ec07f5SHaiyan Song        "BriefDescription": "C6 residency percent per package",
3287493110SIan Rogers        "MetricExpr": "cstate_pkg@c6\\-residency@ / TSC",
332099f51dSAndi Kleen        "MetricGroup": "Power",
3487493110SIan Rogers        "MetricName": "C6_Pkg_Residency",
3587493110SIan Rogers        "ScaleUnit": "100%"
362099f51dSAndi Kleen    },
372099f51dSAndi Kleen    {
382f244993SIan Rogers        "BriefDescription": "C7 residency percent per core",
392f244993SIan Rogers        "MetricExpr": "cstate_core@c7\\-residency@ / TSC",
402f244993SIan Rogers        "MetricGroup": "Power",
412f244993SIan Rogers        "MetricName": "C7_Core_Residency",
422f244993SIan Rogers        "ScaleUnit": "100%"
432f244993SIan Rogers    },
442f244993SIan Rogers    {
4561ec07f5SHaiyan Song        "BriefDescription": "C7 residency percent per package",
4687493110SIan Rogers        "MetricExpr": "cstate_pkg@c7\\-residency@ / TSC",
472099f51dSAndi Kleen        "MetricGroup": "Power",
4887493110SIan Rogers        "MetricName": "C7_Pkg_Residency",
4987493110SIan Rogers        "ScaleUnit": "100%"
502f244993SIan Rogers    },
512f244993SIan Rogers    {
522f244993SIan Rogers        "BriefDescription": "Uncore frequency per die [GHZ]",
53*c9e7771fSIan Rogers        "MetricExpr": "tma_info_system_socket_clks / #num_dies / duration_time / 1e9",
542f244993SIan Rogers        "MetricGroup": "SoC",
552f244993SIan Rogers        "MetricName": "UNCORE_FREQ"
562f244993SIan Rogers    },
572f244993SIan Rogers    {
582f244993SIan Rogers        "BriefDescription": "Percentage of cycles spent in System Management Interrupts.",
592f244993SIan Rogers        "MetricExpr": "((msr@aperf@ - cycles) / msr@aperf@ if msr@smi@ > 0 else 0)",
602f244993SIan Rogers        "MetricGroup": "smi",
612f244993SIan Rogers        "MetricName": "smi_cycles",
622f244993SIan Rogers        "MetricThreshold": "smi_cycles > 0.1",
632f244993SIan Rogers        "ScaleUnit": "100%"
642f244993SIan Rogers    },
652f244993SIan Rogers    {
662f244993SIan Rogers        "BriefDescription": "Number of SMI interrupts.",
672f244993SIan Rogers        "MetricExpr": "msr@smi@",
682f244993SIan Rogers        "MetricGroup": "smi",
692f244993SIan Rogers        "MetricName": "smi_num",
702f244993SIan Rogers        "ScaleUnit": "1SMI#"
712f244993SIan Rogers    },
722f244993SIan Rogers    {
732f244993SIan Rogers        "BriefDescription": "This metric estimates how often memory load accesses were aliased by preceding stores (in program order) with a 4K address offset",
74*c9e7771fSIan Rogers        "MetricExpr": "LD_BLOCKS_PARTIAL.ADDRESS_ALIAS / tma_info_thread_clks",
752f244993SIan Rogers        "MetricGroup": "TopdownL4;tma_L4_group;tma_l1_bound_group",
762f244993SIan Rogers        "MetricName": "tma_4k_aliasing",
772f244993SIan Rogers        "MetricThreshold": "tma_4k_aliasing > 0.2 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
782f244993SIan Rogers        "PublicDescription": "This metric estimates how often memory load accesses were aliased by preceding stores (in program order) with a 4K address offset. False match is possible; which incur a few cycles load re-issue. However; the short re-issue duration is often hidden by the out-of-order core and HW optimizations; hence a user may safely ignore a high value of this metric unless it manages to propagate up into parent nodes of the hierarchy (e.g. to L1_Bound).",
792f244993SIan Rogers        "ScaleUnit": "100%"
802f244993SIan Rogers    },
812f244993SIan Rogers    {
822f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution ports for ALU operations.",
832f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS_NMI",
84*c9e7771fSIan Rogers        "MetricExpr": "(UOPS_DISPATCHED_PORT.PORT_0 + UOPS_DISPATCHED_PORT.PORT_1 + UOPS_DISPATCHED_PORT.PORT_5 + UOPS_DISPATCHED_PORT.PORT_6) / tma_info_thread_slots",
852f244993SIan Rogers        "MetricGroup": "TopdownL5;tma_L5_group;tma_ports_utilized_3m_group",
862f244993SIan Rogers        "MetricName": "tma_alu_op_utilization",
872f244993SIan Rogers        "MetricThreshold": "tma_alu_op_utilization > 0.6",
882f244993SIan Rogers        "ScaleUnit": "100%"
892f244993SIan Rogers    },
902f244993SIan Rogers    {
912f244993SIan Rogers        "BriefDescription": "This metric estimates fraction of slots the CPU retired uops delivered by the Microcode_Sequencer as a result of Assists",
92*c9e7771fSIan Rogers        "MetricExpr": "100 * OTHER_ASSISTS.ANY_WB_ASSIST / tma_info_thread_slots",
932f244993SIan Rogers        "MetricGroup": "TopdownL4;tma_L4_group;tma_microcode_sequencer_group",
942f244993SIan Rogers        "MetricName": "tma_assists",
952f244993SIan Rogers        "MetricThreshold": "tma_assists > 0.1 & (tma_microcode_sequencer > 0.05 & tma_heavy_operations > 0.1)",
962f244993SIan Rogers        "PublicDescription": "This metric estimates fraction of slots the CPU retired uops delivered by the Microcode_Sequencer as a result of Assists. Assists are long sequences of uops that are required in certain corner-cases for operations that cannot be handled natively by the execution pipeline. For example; when working with very small floating point values (so-called Denormals); the FP units are not set up to perform these operations natively. Instead; a sequence of instructions to perform the computation on the Denormals is injected into the pipeline. Since these microcode sequences might be dozens of uops long; Assists can be extremely deleterious to performance and they can be avoided in many cases. Sample with: OTHER_ASSISTS.ANY",
972f244993SIan Rogers        "ScaleUnit": "100%"
982f244993SIan Rogers    },
992f244993SIan Rogers    {
1002f244993SIan Rogers        "BriefDescription": "This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend",
1012f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS_NMI",
1022f244993SIan Rogers        "MetricExpr": "1 - (tma_frontend_bound + tma_bad_speculation + tma_retiring)",
1032f244993SIan Rogers        "MetricGroup": "TmaL1;TopdownL1;tma_L1_group",
1042f244993SIan Rogers        "MetricName": "tma_backend_bound",
1052f244993SIan Rogers        "MetricThreshold": "tma_backend_bound > 0.2",
106ccc66c60SIan Rogers        "MetricgroupNoGroup": "TopdownL1",
1072f244993SIan Rogers        "PublicDescription": "This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend. Backend is the portion of the processor core where the out-of-order scheduler dispatches ready uops into their respective execution units; and once completed these uops get retired according to program order. For example; stalls due to data-cache misses or stalls due to the divider unit being overloaded are both categorized under Backend Bound. Backend Bound is further divided into two main categories: Memory Bound and Core Bound.",
1082f244993SIan Rogers        "ScaleUnit": "100%"
1092f244993SIan Rogers    },
1102f244993SIan Rogers    {
1112f244993SIan Rogers        "BriefDescription": "This category represents fraction of slots wasted due to incorrect speculations",
112*c9e7771fSIan Rogers        "MetricExpr": "(UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (INT_MISC.RECOVERY_CYCLES_ANY / 2 if #SMT_on else INT_MISC.RECOVERY_CYCLES)) / tma_info_thread_slots",
1132f244993SIan Rogers        "MetricGroup": "TmaL1;TopdownL1;tma_L1_group",
1142f244993SIan Rogers        "MetricName": "tma_bad_speculation",
1152f244993SIan Rogers        "MetricThreshold": "tma_bad_speculation > 0.15",
116ccc66c60SIan Rogers        "MetricgroupNoGroup": "TopdownL1",
1172f244993SIan Rogers        "PublicDescription": "This category represents fraction of slots wasted due to incorrect speculations. This include slots used to issue uops that do not eventually get retired and slots for which the issue-pipeline was blocked due to recovery from earlier incorrect speculation. For example; wasted work due to miss-predicted branches are categorized under Bad Speculation category. Incorrect data speculation followed by Memory Ordering Nukes is another example.",
1182f244993SIan Rogers        "ScaleUnit": "100%"
1192f244993SIan Rogers    },
1202f244993SIan Rogers    {
1212f244993SIan Rogers        "BriefDescription": "This metric represents fraction of slots the CPU has wasted due to Branch Misprediction",
1222f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
1232f244993SIan Rogers        "MetricExpr": "BR_MISP_RETIRED.ALL_BRANCHES / (BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT) * tma_bad_speculation",
1242f244993SIan Rogers        "MetricGroup": "BadSpec;BrMispredicts;TmaL2;TopdownL2;tma_L2_group;tma_bad_speculation_group;tma_issueBM",
1252f244993SIan Rogers        "MetricName": "tma_branch_mispredicts",
1262f244993SIan Rogers        "MetricThreshold": "tma_branch_mispredicts > 0.1 & tma_bad_speculation > 0.15",
127ccc66c60SIan Rogers        "MetricgroupNoGroup": "TopdownL2",
128*c9e7771fSIan Rogers        "PublicDescription": "This metric represents fraction of slots the CPU has wasted due to Branch Misprediction.  These slots are either wasted by uops fetched from an incorrectly speculated program path; or stalls when the out-of-order part of the machine needs to recover its state from a speculative path. Sample with: BR_MISP_RETIRED.ALL_BRANCHES. Related metrics: tma_info_bad_spec_branch_misprediction_cost, tma_mispredicts_resteers",
1292f244993SIan Rogers        "ScaleUnit": "100%"
1302f244993SIan Rogers    },
1312f244993SIan Rogers    {
1322f244993SIan Rogers        "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to Branch Resteers",
133*c9e7771fSIan Rogers        "MetricExpr": "12 * (BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY) / tma_info_thread_clks",
1342f244993SIan Rogers        "MetricGroup": "FetchLat;TopdownL3;tma_L3_group;tma_fetch_latency_group",
1352f244993SIan Rogers        "MetricName": "tma_branch_resteers",
1362f244993SIan Rogers        "MetricThreshold": "tma_branch_resteers > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)",
1372f244993SIan Rogers        "PublicDescription": "This metric represents fraction of cycles the CPU was stalled due to Branch Resteers. Branch Resteers estimates the Frontend delay in fetching operations from corrected path; following all sorts of miss-predicted branches. For example; branchy code with lots of miss-predictions might get categorized under Branch Resteers. Note the value of this node may overlap with its siblings. Sample with: BR_MISP_RETIRED.ALL_BRANCHES",
1382f244993SIan Rogers        "ScaleUnit": "100%"
1392f244993SIan Rogers    },
1402f244993SIan Rogers    {
1412f244993SIan Rogers        "BriefDescription": "This metric estimates fraction of cycles the CPU retired uops originated from CISC (complex instruction set computer) instruction",
1422f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS_NMI",
1432f244993SIan Rogers        "MetricExpr": "max(0, tma_microcode_sequencer - tma_assists)",
1442f244993SIan Rogers        "MetricGroup": "TopdownL4;tma_L4_group;tma_microcode_sequencer_group",
1452f244993SIan Rogers        "MetricName": "tma_cisc",
1462f244993SIan Rogers        "MetricThreshold": "tma_cisc > 0.1 & (tma_microcode_sequencer > 0.05 & tma_heavy_operations > 0.1)",
1472f244993SIan Rogers        "PublicDescription": "This metric estimates fraction of cycles the CPU retired uops originated from CISC (complex instruction set computer) instruction. A CISC instruction has multiple uops that are required to perform the instruction's functionality as in the case of read-modify-write as an example. Since these instructions require multiple uops they may or may not imply sub-optimal use of machine resources.",
1482f244993SIan Rogers        "ScaleUnit": "100%"
1492f244993SIan Rogers    },
1502f244993SIan Rogers    {
1512f244993SIan Rogers        "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling synchronizations due to contested accesses",
1522f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
153*c9e7771fSIan Rogers        "MetricExpr": "(60 * (MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.L3_HIT + MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_RETIRED.L3_MISS))) + 43 * (MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_MISS * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.L3_HIT + MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_RETIRED.L3_MISS)))) / tma_info_thread_clks",
1542f244993SIan Rogers        "MetricGroup": "DataSharing;Offcore;Snoop;TopdownL4;tma_L4_group;tma_issueSyncxn;tma_l3_bound_group",
1552f244993SIan Rogers        "MetricName": "tma_contested_accesses",
1562f244993SIan Rogers        "MetricThreshold": "tma_contested_accesses > 0.05 & (tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
1572f244993SIan Rogers        "PublicDescription": "This metric estimates fraction of cycles while the memory subsystem was handling synchronizations due to contested accesses. Contested accesses occur when data written by one Logical Processor are read by another Logical Processor on a different Physical Core. Examples of contested accesses include synchronizations such as locks; true data sharing such as modified locked variables; and false sharing. Sample with: MEM_LOAD_L3_HIT_RETIRED.XSNP_HITM_PS;MEM_LOAD_L3_HIT_RETIRED.XSNP_MISS_PS. Related metrics: tma_data_sharing, tma_false_sharing, tma_machine_clears, tma_remote_cache",
1582f244993SIan Rogers        "ScaleUnit": "100%"
1592f244993SIan Rogers    },
1602f244993SIan Rogers    {
1612f244993SIan Rogers        "BriefDescription": "This metric represents fraction of slots where Core non-memory issues were of a bottleneck",
1622f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
1632f244993SIan Rogers        "MetricExpr": "tma_backend_bound - tma_memory_bound",
1642f244993SIan Rogers        "MetricGroup": "Backend;Compute;TmaL2;TopdownL2;tma_L2_group;tma_backend_bound_group",
1652f244993SIan Rogers        "MetricName": "tma_core_bound",
1662f244993SIan Rogers        "MetricThreshold": "tma_core_bound > 0.1 & tma_backend_bound > 0.2",
167ccc66c60SIan Rogers        "MetricgroupNoGroup": "TopdownL2",
1682f244993SIan Rogers        "PublicDescription": "This metric represents fraction of slots where Core non-memory issues were of a bottleneck.  Shortage in hardware compute resources; or dependencies in software's instructions are both categorized under Core Bound. Hence it may indicate the machine ran out of an out-of-order resource; certain execution units are overloaded or dependencies in program's data- or instruction-flow are limiting the performance (e.g. FP-chained long-latency arithmetic operations).",
1692f244993SIan Rogers        "ScaleUnit": "100%"
1702f244993SIan Rogers    },
1712f244993SIan Rogers    {
1722f244993SIan Rogers        "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling synchronizations due to data-sharing accesses",
1732f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
174*c9e7771fSIan Rogers        "MetricExpr": "43 * (MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.L3_HIT + MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_RETIRED.L3_MISS))) / tma_info_thread_clks",
1752f244993SIan Rogers        "MetricGroup": "Offcore;Snoop;TopdownL4;tma_L4_group;tma_issueSyncxn;tma_l3_bound_group",
1762f244993SIan Rogers        "MetricName": "tma_data_sharing",
1772f244993SIan Rogers        "MetricThreshold": "tma_data_sharing > 0.05 & (tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
1782f244993SIan Rogers        "PublicDescription": "This metric estimates fraction of cycles while the memory subsystem was handling synchronizations due to data-sharing accesses. Data shared by multiple Logical Processors (even just read shared) may cause increased access latency due to cache coherency. Excessive data sharing can drastically harm multithreaded performance. Sample with: MEM_LOAD_L3_HIT_RETIRED.XSNP_HIT_PS. Related metrics: tma_contested_accesses, tma_false_sharing, tma_machine_clears, tma_remote_cache",
1792f244993SIan Rogers        "ScaleUnit": "100%"
1802f244993SIan Rogers    },
1812f244993SIan Rogers    {
1822f244993SIan Rogers        "BriefDescription": "This metric represents fraction of cycles where the Divider unit was active",
183*c9e7771fSIan Rogers        "MetricExpr": "10 * ARITH.DIVIDER_UOPS / tma_info_core_core_clks",
1842f244993SIan Rogers        "MetricGroup": "TopdownL3;tma_L3_group;tma_core_bound_group",
1852f244993SIan Rogers        "MetricName": "tma_divider",
1862f244993SIan Rogers        "MetricThreshold": "tma_divider > 0.2 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2)",
1872f244993SIan Rogers        "PublicDescription": "This metric represents fraction of cycles where the Divider unit was active. Divide and square root instructions are performed by the Divider unit and can take considerably longer latency than integer or Floating Point addition; subtraction; or multiplication. Sample with: ARITH.DIVIDER_UOPS",
1882f244993SIan Rogers        "ScaleUnit": "100%"
1892f244993SIan Rogers    },
1902f244993SIan Rogers    {
1912f244993SIan Rogers        "BriefDescription": "This metric estimates how often the CPU was stalled on accesses to external memory (DRAM) by loads",
1922f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS_SMT",
193*c9e7771fSIan Rogers        "MetricExpr": "(1 - MEM_LOAD_UOPS_RETIRED.L3_HIT / (MEM_LOAD_UOPS_RETIRED.L3_HIT + 7 * MEM_LOAD_UOPS_RETIRED.L3_MISS)) * CYCLE_ACTIVITY.STALLS_L2_PENDING / tma_info_thread_clks",
1942f244993SIan Rogers        "MetricGroup": "MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_memory_bound_group",
1952f244993SIan Rogers        "MetricName": "tma_dram_bound",
1962f244993SIan Rogers        "MetricThreshold": "tma_dram_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)",
1972f244993SIan Rogers        "PublicDescription": "This metric estimates how often the CPU was stalled on accesses to external memory (DRAM) by loads. Better caching can improve the latency and increase performance. Sample with: MEM_LOAD_UOPS_RETIRED.L3_MISS_PS",
1982f244993SIan Rogers        "ScaleUnit": "100%"
1992f244993SIan Rogers    },
2002f244993SIan Rogers    {
2012f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles in which CPU was likely limited due to DSB (decoded uop cache) fetch pipeline",
202*c9e7771fSIan Rogers        "MetricExpr": "(IDQ.ALL_DSB_CYCLES_ANY_UOPS - IDQ.ALL_DSB_CYCLES_4_UOPS) / tma_info_core_core_clks / 2",
2032f244993SIan Rogers        "MetricGroup": "DSB;FetchBW;TopdownL3;tma_L3_group;tma_fetch_bandwidth_group",
2042f244993SIan Rogers        "MetricName": "tma_dsb",
205*c9e7771fSIan Rogers        "MetricThreshold": "tma_dsb > 0.15 & (tma_fetch_bandwidth > 0.1 & tma_frontend_bound > 0.15 & tma_info_thread_ipc / 4 > 0.35)",
2062f244993SIan Rogers        "PublicDescription": "This metric represents Core fraction of cycles in which CPU was likely limited due to DSB (decoded uop cache) fetch pipeline.  For example; inefficient utilization of the DSB cache structure or bank conflict when reading from it; are categorized here.",
2072f244993SIan Rogers        "ScaleUnit": "100%"
2082f244993SIan Rogers    },
2092f244993SIan Rogers    {
2102f244993SIan Rogers        "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to switches from DSB to MITE pipelines",
211*c9e7771fSIan Rogers        "MetricExpr": "DSB2MITE_SWITCHES.PENALTY_CYCLES / tma_info_thread_clks",
2122f244993SIan Rogers        "MetricGroup": "DSBmiss;FetchLat;TopdownL3;tma_L3_group;tma_fetch_latency_group;tma_issueFB",
2132f244993SIan Rogers        "MetricName": "tma_dsb_switches",
2142f244993SIan Rogers        "MetricThreshold": "tma_dsb_switches > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)",
215*c9e7771fSIan Rogers        "PublicDescription": "This metric represents fraction of cycles the CPU was stalled due to switches from DSB to MITE pipelines. The DSB (decoded i-cache) is a Uop Cache where the front-end directly delivers Uops (micro operations) avoiding heavy x86 decoding. The DSB pipeline has shorter latency and delivered higher bandwidth than the MITE (legacy instruction decode pipeline). Switching between the two pipelines can cause penalties hence this metric measures the exposed penalty. Related metrics: tma_fetch_bandwidth, tma_info_frontend_dsb_coverage, tma_info_inst_mix_iptb, tma_lcp",
2162f244993SIan Rogers        "ScaleUnit": "100%"
2172f244993SIan Rogers    },
2182f244993SIan Rogers    {
2192f244993SIan Rogers        "BriefDescription": "This metric roughly estimates the fraction of cycles where the Data TLB (DTLB) was missed by load accesses",
220*c9e7771fSIan Rogers        "MetricExpr": "(8 * DTLB_LOAD_MISSES.STLB_HIT + DTLB_LOAD_MISSES.WALK_DURATION) / tma_info_thread_clks",
2212f244993SIan Rogers        "MetricGroup": "MemoryTLB;TopdownL4;tma_L4_group;tma_issueTLB;tma_l1_bound_group",
2222f244993SIan Rogers        "MetricName": "tma_dtlb_load",
2232f244993SIan Rogers        "MetricThreshold": "tma_dtlb_load > 0.1 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
2242f244993SIan Rogers        "PublicDescription": "This metric roughly estimates the fraction of cycles where the Data TLB (DTLB) was missed by load accesses. TLBs (Translation Look-aside Buffers) are processor caches for recently used entries out of the Page Tables that are used to map virtual- to physical-addresses by the operating system. This metric approximates the potential delay of demand loads missing the first-level data TLB (assuming worst case scenario with back to back misses to different pages). This includes hitting in the second-level TLB (STLB) as well as performing a hardware page walk on an STLB miss. Sample with: MEM_UOPS_RETIRED.STLB_MISS_LOADS_PS. Related metrics: tma_dtlb_store",
2252f244993SIan Rogers        "ScaleUnit": "100%"
2262f244993SIan Rogers    },
2272f244993SIan Rogers    {
2282f244993SIan Rogers        "BriefDescription": "This metric roughly estimates the fraction of cycles spent handling first-level data TLB store misses",
229*c9e7771fSIan Rogers        "MetricExpr": "(8 * DTLB_STORE_MISSES.STLB_HIT + DTLB_STORE_MISSES.WALK_DURATION) / tma_info_thread_clks",
2302f244993SIan Rogers        "MetricGroup": "MemoryTLB;TopdownL4;tma_L4_group;tma_issueTLB;tma_store_bound_group",
2312f244993SIan Rogers        "MetricName": "tma_dtlb_store",
2322f244993SIan Rogers        "MetricThreshold": "tma_dtlb_store > 0.05 & (tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
2332f244993SIan Rogers        "PublicDescription": "This metric roughly estimates the fraction of cycles spent handling first-level data TLB store misses.  As with ordinary data caching; focus on improving data locality and reducing working-set size to reduce DTLB overhead.  Additionally; consider using profile-guided optimization (PGO) to collocate frequently-used data on the same page.  Try using larger page sizes for large amounts of frequently-used data. Sample with: MEM_UOPS_RETIRED.STLB_MISS_STORES_PS. Related metrics: tma_dtlb_load",
2342f244993SIan Rogers        "ScaleUnit": "100%"
2352f244993SIan Rogers    },
2362f244993SIan Rogers    {
2372f244993SIan Rogers        "BriefDescription": "This metric roughly estimates how often CPU was handling synchronizations due to False Sharing",
238*c9e7771fSIan Rogers        "MetricExpr": "60 * OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.HITM_OTHER_CORE / tma_info_thread_clks",
2392f244993SIan Rogers        "MetricGroup": "DataSharing;Offcore;Snoop;TopdownL4;tma_L4_group;tma_issueSyncxn;tma_store_bound_group",
2402f244993SIan Rogers        "MetricName": "tma_false_sharing",
2412f244993SIan Rogers        "MetricThreshold": "tma_false_sharing > 0.05 & (tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
2422f244993SIan Rogers        "PublicDescription": "This metric roughly estimates how often CPU was handling synchronizations due to False Sharing. False Sharing is a multithreading hiccup; where multiple Logical Processors contend on different data-elements mapped into the same cache line. Sample with: MEM_LOAD_L3_HIT_RETIRED.XSNP_HITM_PS;OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_HITM. Related metrics: tma_contested_accesses, tma_data_sharing, tma_machine_clears, tma_remote_cache",
2432f244993SIan Rogers        "ScaleUnit": "100%"
2442f244993SIan Rogers    },
2452f244993SIan Rogers    {
2462f244993SIan Rogers        "BriefDescription": "This metric does a *rough estimation* of how often L1D Fill Buffer unavailability limited additional L1D miss memory access requests to proceed",
2472f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
248*c9e7771fSIan Rogers        "MetricExpr": "tma_info_memory_load_miss_real_latency * cpu@L1D_PEND_MISS.REQUEST_FB_FULL\\,cmask\\=1@ / tma_info_thread_clks",
2492f244993SIan Rogers        "MetricGroup": "MemoryBW;TopdownL4;tma_L4_group;tma_issueBW;tma_issueSL;tma_issueSmSt;tma_l1_bound_group",
2502f244993SIan Rogers        "MetricName": "tma_fb_full",
2512f244993SIan Rogers        "MetricThreshold": "tma_fb_full > 0.3",
252*c9e7771fSIan Rogers        "PublicDescription": "This metric does a *rough estimation* of how often L1D Fill Buffer unavailability limited additional L1D miss memory access requests to proceed. The higher the metric value; the deeper the memory hierarchy level the misses are satisfied from (metric values >1 are valid). Often it hints on approaching bandwidth limits (to L2 cache; L3 cache or external memory). Related metrics: tma_info_system_dram_bw_use, tma_mem_bandwidth, tma_sq_full, tma_store_latency, tma_streaming_stores",
2532f244993SIan Rogers        "ScaleUnit": "100%"
2542f244993SIan Rogers    },
2552f244993SIan Rogers    {
2562f244993SIan Rogers        "BriefDescription": "This metric represents fraction of slots the CPU was stalled due to Frontend bandwidth issues",
2572f244993SIan Rogers        "MetricExpr": "tma_frontend_bound - tma_fetch_latency",
2582f244993SIan Rogers        "MetricGroup": "FetchBW;Frontend;TmaL2;TopdownL2;tma_L2_group;tma_frontend_bound_group;tma_issueFB",
2592f244993SIan Rogers        "MetricName": "tma_fetch_bandwidth",
260*c9e7771fSIan Rogers        "MetricThreshold": "tma_fetch_bandwidth > 0.1 & tma_frontend_bound > 0.15 & tma_info_thread_ipc / 4 > 0.35",
261ccc66c60SIan Rogers        "MetricgroupNoGroup": "TopdownL2",
262*c9e7771fSIan Rogers        "PublicDescription": "This metric represents fraction of slots the CPU was stalled due to Frontend bandwidth issues.  For example; inefficiencies at the instruction decoders; or restrictions for caching in the DSB (decoded uops cache) are categorized under Fetch Bandwidth. In such cases; the Frontend typically delivers suboptimal amount of uops to the Backend. Related metrics: tma_dsb_switches, tma_info_frontend_dsb_coverage, tma_info_inst_mix_iptb, tma_lcp",
2632f244993SIan Rogers        "ScaleUnit": "100%"
2642f244993SIan Rogers    },
2652f244993SIan Rogers    {
2662f244993SIan Rogers        "BriefDescription": "This metric represents fraction of slots the CPU was stalled due to Frontend latency issues",
267*c9e7771fSIan Rogers        "MetricExpr": "4 * min(CPU_CLK_UNHALTED.THREAD, IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE) / tma_info_thread_slots",
2682f244993SIan Rogers        "MetricGroup": "Frontend;TmaL2;TopdownL2;tma_L2_group;tma_frontend_bound_group",
2692f244993SIan Rogers        "MetricName": "tma_fetch_latency",
2702f244993SIan Rogers        "MetricThreshold": "tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15",
271ccc66c60SIan Rogers        "MetricgroupNoGroup": "TopdownL2",
2722f244993SIan Rogers        "PublicDescription": "This metric represents fraction of slots the CPU was stalled due to Frontend latency issues.  For example; instruction-cache misses; iTLB misses or fetch stalls after a branch misprediction are categorized under Frontend Latency. In such cases; the Frontend eventually delivers no uops for some period. Sample with: RS_EVENTS.EMPTY_END",
2732f244993SIan Rogers        "ScaleUnit": "100%"
2742f244993SIan Rogers    },
2752f244993SIan Rogers    {
2762f244993SIan Rogers        "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend",
277*c9e7771fSIan Rogers        "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / tma_info_thread_slots",
2782f244993SIan Rogers        "MetricGroup": "PGO;TmaL1;TopdownL1;tma_L1_group",
2792f244993SIan Rogers        "MetricName": "tma_frontend_bound",
2802f244993SIan Rogers        "MetricThreshold": "tma_frontend_bound > 0.15",
281ccc66c60SIan Rogers        "MetricgroupNoGroup": "TopdownL1",
2822f244993SIan Rogers        "PublicDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend. Frontend denotes the first part of the processor core responsible to fetch operations that are executed later on by the Backend part. Within the Frontend; a branch predictor predicts the next address to fetch; cache-lines are fetched from the memory subsystem; parsed into instructions; and lastly decoded into micro-operations (uops). Ideally the Frontend can issue Pipeline_Width uops every cycle to the Backend. Frontend Bound denotes unutilized issue-slots when there is no Backend stall; i.e. bubbles where Frontend delivered no uops while Backend could have accepted them. For example; stalls due to instruction-cache misses would be categorized under Frontend Bound.",
2832f244993SIan Rogers        "ScaleUnit": "100%"
2842f244993SIan Rogers    },
2852f244993SIan Rogers    {
2862f244993SIan Rogers        "BriefDescription": "This metric represents fraction of slots where the CPU was retiring heavy-weight operations -- instructions that require two or more uops or micro-coded sequences",
2872f244993SIan Rogers        "MetricExpr": "tma_microcode_sequencer",
2882f244993SIan Rogers        "MetricGroup": "Retire;TmaL2;TopdownL2;tma_L2_group;tma_retiring_group",
2892f244993SIan Rogers        "MetricName": "tma_heavy_operations",
2902f244993SIan Rogers        "MetricThreshold": "tma_heavy_operations > 0.1",
291ccc66c60SIan Rogers        "MetricgroupNoGroup": "TopdownL2",
2922f244993SIan Rogers        "PublicDescription": "This metric represents fraction of slots where the CPU was retiring heavy-weight operations -- instructions that require two or more uops or micro-coded sequences. This highly-correlates with the uop length of these instructions/sequences.",
2932f244993SIan Rogers        "ScaleUnit": "100%"
2942f244993SIan Rogers    },
2952f244993SIan Rogers    {
2962f244993SIan Rogers        "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to instruction cache misses.",
297*c9e7771fSIan Rogers        "MetricExpr": "ICACHE.IFDATA_STALL / tma_info_thread_clks",
2982f244993SIan Rogers        "MetricGroup": "BigFoot;FetchLat;IcMiss;TopdownL3;tma_L3_group;tma_fetch_latency_group",
2992f244993SIan Rogers        "MetricName": "tma_icache_misses",
3002f244993SIan Rogers        "MetricThreshold": "tma_icache_misses > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)",
3012f244993SIan Rogers        "ScaleUnit": "100%"
3022f244993SIan Rogers    },
3032f244993SIan Rogers    {
304*c9e7771fSIan Rogers        "BriefDescription": "Instructions per retired mispredicts for indirect CALL or JMP branches (lower number means higher occurrence rate).",
305*c9e7771fSIan Rogers        "MetricExpr": "tma_info_inst_mix_instructions / (UOPS_RETIRED.RETIRE_SLOTS / UOPS_ISSUED.ANY * cpu@BR_MISP_EXEC.ALL_BRANCHES\\,umask\\=0xE4@)",
306*c9e7771fSIan Rogers        "MetricGroup": "Bad;BrMispredicts",
307*c9e7771fSIan Rogers        "MetricName": "tma_info_bad_spec_ipmisp_indirect",
308*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_bad_spec_ipmisp_indirect < 1e3"
3092f244993SIan Rogers    },
3102f244993SIan Rogers    {
311*c9e7771fSIan Rogers        "BriefDescription": "Number of Instructions per non-speculative Branch Misprediction (JEClear) (lower number means higher occurrence rate)",
312*c9e7771fSIan Rogers        "MetricExpr": "INST_RETIRED.ANY / BR_MISP_RETIRED.ALL_BRANCHES",
313*c9e7771fSIan Rogers        "MetricGroup": "Bad;BadSpec;BrMispredicts",
314*c9e7771fSIan Rogers        "MetricName": "tma_info_bad_spec_ipmispredict",
315*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_bad_spec_ipmispredict < 200"
3162f244993SIan Rogers    },
3172f244993SIan Rogers    {
3182f244993SIan Rogers        "BriefDescription": "Core actual clocks when any Logical Processor is active on the Physical Core",
319*c9e7771fSIan Rogers        "MetricExpr": "(CPU_CLK_UNHALTED.THREAD / 2 * (1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK) if #core_wide < 1 else (CPU_CLK_UNHALTED.THREAD_ANY / 2 if #SMT_on else tma_info_thread_clks))",
3202f244993SIan Rogers        "MetricGroup": "SMT",
321*c9e7771fSIan Rogers        "MetricName": "tma_info_core_core_clks"
3222f244993SIan Rogers    },
3232f244993SIan Rogers    {
3242f244993SIan Rogers        "BriefDescription": "Instructions Per Cycle across hyper-threads (per physical core)",
325*c9e7771fSIan Rogers        "MetricExpr": "INST_RETIRED.ANY / tma_info_core_core_clks",
3262f244993SIan Rogers        "MetricGroup": "Ret;SMT;TmaL1;tma_L1_group",
327*c9e7771fSIan Rogers        "MetricName": "tma_info_core_coreipc"
3282f244993SIan Rogers    },
3292f244993SIan Rogers    {
3302f244993SIan Rogers        "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is execution) per-core",
3312f244993SIan Rogers        "MetricExpr": "(UOPS_EXECUTED.CORE / 2 / (cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2 if #SMT_on else cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@) if #SMT_on else UOPS_EXECUTED.CORE / (cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2 if #SMT_on else cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@))",
3322f244993SIan Rogers        "MetricGroup": "Backend;Cor;Pipeline;PortsUtil",
333*c9e7771fSIan Rogers        "MetricName": "tma_info_core_ilp"
334*c9e7771fSIan Rogers    },
335*c9e7771fSIan Rogers    {
336*c9e7771fSIan Rogers        "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache)",
337*c9e7771fSIan Rogers        "MetricExpr": "IDQ.DSB_UOPS / (IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS)",
338*c9e7771fSIan Rogers        "MetricGroup": "DSB;Fed;FetchBW;tma_issueFB",
339*c9e7771fSIan Rogers        "MetricName": "tma_info_frontend_dsb_coverage",
340*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_frontend_dsb_coverage < 0.7 & tma_info_thread_ipc / 4 > 0.35",
341*c9e7771fSIan Rogers        "PublicDescription": "Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache). Related metrics: tma_dsb_switches, tma_fetch_bandwidth, tma_info_inst_mix_iptb, tma_lcp"
342*c9e7771fSIan Rogers    },
343*c9e7771fSIan Rogers    {
344*c9e7771fSIan Rogers        "BriefDescription": "Instructions per speculative Unknown Branch Misprediction (BAClear) (lower number means higher occurrence rate)",
345*c9e7771fSIan Rogers        "MetricExpr": "tma_info_inst_mix_instructions / BACLEARS.ANY",
346*c9e7771fSIan Rogers        "MetricGroup": "Fed",
347*c9e7771fSIan Rogers        "MetricName": "tma_info_frontend_ipunknown_branch"
348*c9e7771fSIan Rogers    },
349*c9e7771fSIan Rogers    {
350*c9e7771fSIan Rogers        "BriefDescription": "Branch instructions per taken branch.",
351*c9e7771fSIan Rogers        "MetricExpr": "BR_INST_RETIRED.ALL_BRANCHES / BR_INST_RETIRED.NEAR_TAKEN",
352*c9e7771fSIan Rogers        "MetricGroup": "Branches;Fed;PGO",
353*c9e7771fSIan Rogers        "MetricName": "tma_info_inst_mix_bptkbranch"
3542f244993SIan Rogers    },
3552f244993SIan Rogers    {
3562f244993SIan Rogers        "BriefDescription": "Total number of retired Instructions",
3572f244993SIan Rogers        "MetricExpr": "INST_RETIRED.ANY",
3582f244993SIan Rogers        "MetricGroup": "Summary;TmaL1;tma_L1_group",
359*c9e7771fSIan Rogers        "MetricName": "tma_info_inst_mix_instructions",
3602f244993SIan Rogers        "PublicDescription": "Total number of retired Instructions. Sample with: INST_RETIRED.PREC_DIST"
3612f244993SIan Rogers    },
3622f244993SIan Rogers    {
3632f244993SIan Rogers        "BriefDescription": "Instructions per Branch (lower number means higher occurrence rate)",
3642f244993SIan Rogers        "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.ALL_BRANCHES",
3652f244993SIan Rogers        "MetricGroup": "Branches;Fed;InsType",
366*c9e7771fSIan Rogers        "MetricName": "tma_info_inst_mix_ipbranch",
367*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_inst_mix_ipbranch < 8"
3682f244993SIan Rogers    },
3692f244993SIan Rogers    {
3702f244993SIan Rogers        "BriefDescription": "Instructions per (near) call (lower number means higher occurrence rate)",
3712f244993SIan Rogers        "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_CALL",
3722f244993SIan Rogers        "MetricGroup": "Branches;Fed;PGO",
373*c9e7771fSIan Rogers        "MetricName": "tma_info_inst_mix_ipcall",
374*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_inst_mix_ipcall < 200"
3752f244993SIan Rogers    },
3762f244993SIan Rogers    {
3772f244993SIan Rogers        "BriefDescription": "Instructions per Load (lower number means higher occurrence rate)",
3782f244993SIan Rogers        "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_LOADS",
3792f244993SIan Rogers        "MetricGroup": "InsType",
380*c9e7771fSIan Rogers        "MetricName": "tma_info_inst_mix_ipload",
381*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_inst_mix_ipload < 3"
3822f244993SIan Rogers    },
3832f244993SIan Rogers    {
3842f244993SIan Rogers        "BriefDescription": "Instructions per Store (lower number means higher occurrence rate)",
3852f244993SIan Rogers        "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_STORES",
3862f244993SIan Rogers        "MetricGroup": "InsType",
387*c9e7771fSIan Rogers        "MetricName": "tma_info_inst_mix_ipstore",
388*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_inst_mix_ipstore < 8"
3892f244993SIan Rogers    },
3902f244993SIan Rogers    {
3912f244993SIan Rogers        "BriefDescription": "Instruction per taken branch",
3922f244993SIan Rogers        "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_TAKEN",
3932f244993SIan Rogers        "MetricGroup": "Branches;Fed;FetchBW;Frontend;PGO;tma_issueFB",
394*c9e7771fSIan Rogers        "MetricName": "tma_info_inst_mix_iptb",
395*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_inst_mix_iptb < 9",
396*c9e7771fSIan Rogers        "PublicDescription": "Instruction per taken branch. Related metrics: tma_dsb_switches, tma_fetch_bandwidth, tma_info_frontend_dsb_coverage, tma_lcp"
3972f244993SIan Rogers    },
3982f244993SIan Rogers    {
3992f244993SIan Rogers        "BriefDescription": "Average per-core data fill bandwidth to the L1 data cache [GB / sec]",
4002f244993SIan Rogers        "MetricExpr": "64 * L1D.REPLACEMENT / 1e9 / duration_time",
4012f244993SIan Rogers        "MetricGroup": "Mem;MemoryBW",
402*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_core_l1d_cache_fill_bw"
4032f244993SIan Rogers    },
4042f244993SIan Rogers    {
4052f244993SIan Rogers        "BriefDescription": "Average per-core data fill bandwidth to the L2 cache [GB / sec]",
4062f244993SIan Rogers        "MetricExpr": "64 * L2_LINES_IN.ALL / 1e9 / duration_time",
4072f244993SIan Rogers        "MetricGroup": "Mem;MemoryBW",
408*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_core_l2_cache_fill_bw"
4092f244993SIan Rogers    },
4102f244993SIan Rogers    {
4112f244993SIan Rogers        "BriefDescription": "Average per-core data fill bandwidth to the L3 cache [GB / sec]",
4122f244993SIan Rogers        "MetricExpr": "64 * LONGEST_LAT_CACHE.MISS / 1e9 / duration_time",
4132f244993SIan Rogers        "MetricGroup": "Mem;MemoryBW",
414*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_core_l3_cache_fill_bw"
4152f244993SIan Rogers    },
4162f244993SIan Rogers    {
417*c9e7771fSIan Rogers        "BriefDescription": "L1 cache true misses per kilo instruction for retired demand loads",
418*c9e7771fSIan Rogers        "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.L1_MISS / INST_RETIRED.ANY",
419*c9e7771fSIan Rogers        "MetricGroup": "CacheMisses;Mem",
420*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_l1mpki"
421*c9e7771fSIan Rogers    },
422*c9e7771fSIan Rogers    {
423*c9e7771fSIan Rogers        "BriefDescription": "L2 cache true misses per kilo instruction for retired demand loads",
424*c9e7771fSIan Rogers        "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.L2_MISS / INST_RETIRED.ANY",
425*c9e7771fSIan Rogers        "MetricGroup": "Backend;CacheMisses;Mem",
426*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_l2mpki"
4272f244993SIan Rogers    },
4282f244993SIan Rogers    {
4292f244993SIan Rogers        "BriefDescription": "L3 cache true misses per kilo instruction for retired demand loads",
4302f244993SIan Rogers        "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.L3_MISS / INST_RETIRED.ANY",
4312f244993SIan Rogers        "MetricGroup": "CacheMisses;Mem",
432*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_l3mpki"
4332f244993SIan Rogers    },
4342f244993SIan Rogers    {
4352f244993SIan Rogers        "BriefDescription": "Actual Average Latency for L1 data-cache miss demand load operations (in core cycles)",
4362f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
4372f244993SIan Rogers        "MetricExpr": "L1D_PEND_MISS.PENDING / (MEM_LOAD_UOPS_RETIRED.L1_MISS + MEM_LOAD_UOPS_RETIRED.HIT_LFB)",
4382f244993SIan Rogers        "MetricGroup": "Mem;MemoryBound;MemoryLat",
439*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_load_miss_real_latency"
4402f244993SIan Rogers    },
4412f244993SIan Rogers    {
4422f244993SIan Rogers        "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss",
4432f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
4442f244993SIan Rogers        "MetricExpr": "L1D_PEND_MISS.PENDING / L1D_PEND_MISS.PENDING_CYCLES",
4452f244993SIan Rogers        "MetricGroup": "Mem;MemoryBW;MemoryBound",
446*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_mlp",
4472f244993SIan Rogers        "PublicDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss. Per-Logical Processor)"
4482f244993SIan Rogers    },
4492f244993SIan Rogers    {
450*c9e7771fSIan Rogers        "BriefDescription": "Average Parallel L2 cache miss data reads",
451*c9e7771fSIan Rogers        "MetricExpr": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD / OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD",
452*c9e7771fSIan Rogers        "MetricGroup": "Memory_BW;Offcore",
453*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_oro_data_l2_mlp"
454*c9e7771fSIan Rogers    },
455*c9e7771fSIan Rogers    {
456*c9e7771fSIan Rogers        "BriefDescription": "Average Latency for L2 cache miss demand Loads",
457*c9e7771fSIan Rogers        "MetricExpr": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD / OFFCORE_REQUESTS.DEMAND_DATA_RD",
458*c9e7771fSIan Rogers        "MetricGroup": "Memory_Lat;Offcore",
459*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_oro_load_l2_miss_latency"
460*c9e7771fSIan Rogers    },
461*c9e7771fSIan Rogers    {
462*c9e7771fSIan Rogers        "BriefDescription": "Average Parallel L2 cache miss demand Loads",
463*c9e7771fSIan Rogers        "MetricExpr": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD / OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD",
464*c9e7771fSIan Rogers        "MetricGroup": "Memory_BW;Offcore",
465*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_oro_load_l2_mlp"
466*c9e7771fSIan Rogers    },
467*c9e7771fSIan Rogers    {
468*c9e7771fSIan Rogers        "BriefDescription": "Average per-thread data fill bandwidth to the L1 data cache [GB / sec]",
469*c9e7771fSIan Rogers        "MetricExpr": "tma_info_memory_core_l1d_cache_fill_bw",
470*c9e7771fSIan Rogers        "MetricGroup": "Mem;MemoryBW",
471*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_thread_l1d_cache_fill_bw_1t"
472*c9e7771fSIan Rogers    },
473*c9e7771fSIan Rogers    {
474*c9e7771fSIan Rogers        "BriefDescription": "Average per-thread data fill bandwidth to the L2 cache [GB / sec]",
475*c9e7771fSIan Rogers        "MetricExpr": "tma_info_memory_core_l2_cache_fill_bw",
476*c9e7771fSIan Rogers        "MetricGroup": "Mem;MemoryBW",
477*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_thread_l2_cache_fill_bw_1t"
478*c9e7771fSIan Rogers    },
479*c9e7771fSIan Rogers    {
480*c9e7771fSIan Rogers        "BriefDescription": "Average per-thread data access bandwidth to the L3 cache [GB / sec]",
481*c9e7771fSIan Rogers        "MetricExpr": "0",
482*c9e7771fSIan Rogers        "MetricGroup": "Mem;MemoryBW;Offcore",
483*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_thread_l3_cache_access_bw_1t"
484*c9e7771fSIan Rogers    },
485*c9e7771fSIan Rogers    {
486*c9e7771fSIan Rogers        "BriefDescription": "Average per-thread data fill bandwidth to the L3 cache [GB / sec]",
487*c9e7771fSIan Rogers        "MetricExpr": "tma_info_memory_core_l3_cache_fill_bw",
488*c9e7771fSIan Rogers        "MetricGroup": "Mem;MemoryBW",
489*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_thread_l3_cache_fill_bw_1t"
490*c9e7771fSIan Rogers    },
491*c9e7771fSIan Rogers    {
4922f244993SIan Rogers        "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
493*c9e7771fSIan Rogers        "MetricExpr": "(ITLB_MISSES.WALK_DURATION + DTLB_LOAD_MISSES.WALK_DURATION + DTLB_STORE_MISSES.WALK_DURATION) / tma_info_core_core_clks",
4942f244993SIan Rogers        "MetricGroup": "Mem;MemoryTLB",
495*c9e7771fSIan Rogers        "MetricName": "tma_info_memory_tlb_page_walks_utilization",
496*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_memory_tlb_page_walks_utilization > 0.5"
4972f244993SIan Rogers    },
4982f244993SIan Rogers    {
4992f244993SIan Rogers        "BriefDescription": "Average number of Uops retired in cycles where at least one uop has retired.",
5002f244993SIan Rogers        "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / cpu@UOPS_RETIRED.RETIRE_SLOTS\\,cmask\\=1@",
5012f244993SIan Rogers        "MetricGroup": "Pipeline;Ret",
502*c9e7771fSIan Rogers        "MetricName": "tma_info_pipeline_retire"
5032f244993SIan Rogers    },
5042f244993SIan Rogers    {
505*c9e7771fSIan Rogers        "BriefDescription": "Measured Average Frequency for unhalted processors [GHz]",
506*c9e7771fSIan Rogers        "MetricExpr": "tma_info_system_turbo_utilization * TSC / 1e9 / duration_time",
507*c9e7771fSIan Rogers        "MetricGroup": "Power;Summary",
508*c9e7771fSIan Rogers        "MetricName": "tma_info_system_average_frequency"
509*c9e7771fSIan Rogers    },
510*c9e7771fSIan Rogers    {
511*c9e7771fSIan Rogers        "BriefDescription": "Average CPU Utilization",
512*c9e7771fSIan Rogers        "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / TSC",
513*c9e7771fSIan Rogers        "MetricGroup": "HPC;Summary",
514*c9e7771fSIan Rogers        "MetricName": "tma_info_system_cpu_utilization"
515*c9e7771fSIan Rogers    },
516*c9e7771fSIan Rogers    {
517*c9e7771fSIan Rogers        "BriefDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]",
518*c9e7771fSIan Rogers        "MetricExpr": "64 * (UNC_ARB_TRK_REQUESTS.ALL + UNC_ARB_COH_TRK_REQUESTS.ALL) / 1e6 / duration_time / 1e3",
519*c9e7771fSIan Rogers        "MetricGroup": "HPC;Mem;MemoryBW;SoC;tma_issueBW",
520*c9e7771fSIan Rogers        "MetricName": "tma_info_system_dram_bw_use",
521*c9e7771fSIan Rogers        "PublicDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]. Related metrics: tma_fb_full, tma_mem_bandwidth, tma_sq_full"
522*c9e7771fSIan Rogers    },
523*c9e7771fSIan Rogers    {
524*c9e7771fSIan Rogers        "BriefDescription": "Instructions per Far Branch ( Far Branches apply upon transition from application to operating system, handling interrupts, exceptions) [lower number means higher occurrence rate]",
525*c9e7771fSIan Rogers        "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.FAR_BRANCH:u",
526*c9e7771fSIan Rogers        "MetricGroup": "Branches;OS",
527*c9e7771fSIan Rogers        "MetricName": "tma_info_system_ipfarbranch",
528*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_system_ipfarbranch < 1e6"
529*c9e7771fSIan Rogers    },
530*c9e7771fSIan Rogers    {
531*c9e7771fSIan Rogers        "BriefDescription": "Cycles Per Instruction for the Operating System (OS) Kernel mode",
532*c9e7771fSIan Rogers        "MetricExpr": "CPU_CLK_UNHALTED.THREAD_P:k / INST_RETIRED.ANY_P:k",
533*c9e7771fSIan Rogers        "MetricGroup": "OS",
534*c9e7771fSIan Rogers        "MetricName": "tma_info_system_kernel_cpi"
535*c9e7771fSIan Rogers    },
536*c9e7771fSIan Rogers    {
537*c9e7771fSIan Rogers        "BriefDescription": "Fraction of cycles spent in the Operating System (OS) Kernel mode",
538*c9e7771fSIan Rogers        "MetricExpr": "CPU_CLK_UNHALTED.THREAD_P:k / CPU_CLK_UNHALTED.THREAD",
539*c9e7771fSIan Rogers        "MetricGroup": "OS",
540*c9e7771fSIan Rogers        "MetricName": "tma_info_system_kernel_utilization",
541*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_system_kernel_utilization > 0.05"
542*c9e7771fSIan Rogers    },
543*c9e7771fSIan Rogers    {
544*c9e7771fSIan Rogers        "BriefDescription": "Average number of parallel requests to external memory",
545*c9e7771fSIan Rogers        "MetricExpr": "UNC_ARB_TRK_OCCUPANCY.ALL / UNC_ARB_TRK_OCCUPANCY.CYCLES_WITH_ANY_REQUEST",
546*c9e7771fSIan Rogers        "MetricGroup": "Mem;SoC",
547*c9e7771fSIan Rogers        "MetricName": "tma_info_system_mem_parallel_requests",
548*c9e7771fSIan Rogers        "PublicDescription": "Average number of parallel requests to external memory. Accounts for all requests"
549*c9e7771fSIan Rogers    },
550*c9e7771fSIan Rogers    {
551*c9e7771fSIan Rogers        "BriefDescription": "Average latency of all requests to external memory (in Uncore cycles)",
552*c9e7771fSIan Rogers        "MetricExpr": "UNC_ARB_TRK_OCCUPANCY.ALL / UNC_ARB_TRK_REQUESTS.ALL",
553*c9e7771fSIan Rogers        "MetricGroup": "Mem;SoC",
554*c9e7771fSIan Rogers        "MetricName": "tma_info_system_mem_request_latency"
5552f244993SIan Rogers    },
5562f244993SIan Rogers    {
5572f244993SIan Rogers        "BriefDescription": "Fraction of cycles where both hardware Logical Processors were active",
5582f244993SIan Rogers        "MetricExpr": "(1 - CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / (CPU_CLK_UNHALTED.REF_XCLK_ANY / 2) if #SMT_on else 0)",
5592f244993SIan Rogers        "MetricGroup": "SMT",
560*c9e7771fSIan Rogers        "MetricName": "tma_info_system_smt_2t_utilization"
5612f244993SIan Rogers    },
5622f244993SIan Rogers    {
5632f244993SIan Rogers        "BriefDescription": "Socket actual clocks when any core is active on that socket",
5642f244993SIan Rogers        "MetricExpr": "UNC_CLOCK.SOCKET",
5652f244993SIan Rogers        "MetricGroup": "SoC",
566*c9e7771fSIan Rogers        "MetricName": "tma_info_system_socket_clks"
5672f244993SIan Rogers    },
5682f244993SIan Rogers    {
5692f244993SIan Rogers        "BriefDescription": "Average Frequency Utilization relative nominal frequency",
570*c9e7771fSIan Rogers        "MetricExpr": "tma_info_thread_clks / CPU_CLK_UNHALTED.REF_TSC",
5712f244993SIan Rogers        "MetricGroup": "Power",
572*c9e7771fSIan Rogers        "MetricName": "tma_info_system_turbo_utilization"
573*c9e7771fSIan Rogers    },
574*c9e7771fSIan Rogers    {
575*c9e7771fSIan Rogers        "BriefDescription": "Per-Logical Processor actual clocks when the Logical Processor is active.",
576*c9e7771fSIan Rogers        "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
577*c9e7771fSIan Rogers        "MetricGroup": "Pipeline",
578*c9e7771fSIan Rogers        "MetricName": "tma_info_thread_clks"
579*c9e7771fSIan Rogers    },
580*c9e7771fSIan Rogers    {
581*c9e7771fSIan Rogers        "BriefDescription": "Cycles Per Instruction (per Logical Processor)",
582*c9e7771fSIan Rogers        "MetricExpr": "1 / tma_info_thread_ipc",
583*c9e7771fSIan Rogers        "MetricGroup": "Mem;Pipeline",
584*c9e7771fSIan Rogers        "MetricName": "tma_info_thread_cpi"
585*c9e7771fSIan Rogers    },
586*c9e7771fSIan Rogers    {
587*c9e7771fSIan Rogers        "BriefDescription": "Instructions Per Cycle (per Logical Processor)",
588*c9e7771fSIan Rogers        "MetricExpr": "INST_RETIRED.ANY / tma_info_thread_clks",
589*c9e7771fSIan Rogers        "MetricGroup": "Ret;Summary",
590*c9e7771fSIan Rogers        "MetricName": "tma_info_thread_ipc"
591*c9e7771fSIan Rogers    },
592*c9e7771fSIan Rogers    {
593*c9e7771fSIan Rogers        "BriefDescription": "Total issue-pipeline slots (per-Physical Core till ICL; per-Logical Processor ICL onward)",
594*c9e7771fSIan Rogers        "MetricExpr": "4 * tma_info_core_core_clks",
595*c9e7771fSIan Rogers        "MetricGroup": "TmaL1;tma_L1_group",
596*c9e7771fSIan Rogers        "MetricName": "tma_info_thread_slots"
5972f244993SIan Rogers    },
5982f244993SIan Rogers    {
5992f244993SIan Rogers        "BriefDescription": "Uops Per Instruction",
6002f244993SIan Rogers        "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
6012f244993SIan Rogers        "MetricGroup": "Pipeline;Ret;Retire",
602*c9e7771fSIan Rogers        "MetricName": "tma_info_thread_uoppi",
603*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_thread_uoppi > 1.05"
6042f244993SIan Rogers    },
6052f244993SIan Rogers    {
6062f244993SIan Rogers        "BriefDescription": "Instruction per taken branch",
6072f244993SIan Rogers        "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / BR_INST_RETIRED.NEAR_TAKEN",
6082f244993SIan Rogers        "MetricGroup": "Branches;Fed;FetchBW",
609*c9e7771fSIan Rogers        "MetricName": "tma_info_thread_uptb",
610*c9e7771fSIan Rogers        "MetricThreshold": "tma_info_thread_uptb < 6"
6112f244993SIan Rogers    },
6122f244993SIan Rogers    {
6132f244993SIan Rogers        "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to Instruction TLB (ITLB) misses",
614*c9e7771fSIan Rogers        "MetricExpr": "(14 * ITLB_MISSES.STLB_HIT + ITLB_MISSES.WALK_DURATION) / tma_info_thread_clks",
6152f244993SIan Rogers        "MetricGroup": "BigFoot;FetchLat;MemoryTLB;TopdownL3;tma_L3_group;tma_fetch_latency_group",
6162f244993SIan Rogers        "MetricName": "tma_itlb_misses",
6172f244993SIan Rogers        "MetricThreshold": "tma_itlb_misses > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)",
6182f244993SIan Rogers        "PublicDescription": "This metric represents fraction of cycles the CPU was stalled due to Instruction TLB (ITLB) misses. Sample with: ITLB_MISSES.WALK_COMPLETED",
6192f244993SIan Rogers        "ScaleUnit": "100%"
6202f244993SIan Rogers    },
6212f244993SIan Rogers    {
6222f244993SIan Rogers        "BriefDescription": "This metric estimates how often the CPU was stalled without loads missing the L1 data cache",
623*c9e7771fSIan Rogers        "MetricExpr": "max((min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING) - CYCLE_ACTIVITY.STALLS_L1D_PENDING) / tma_info_thread_clks, 0)",
6242f244993SIan Rogers        "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_issueL1;tma_issueMC;tma_memory_bound_group",
6252f244993SIan Rogers        "MetricName": "tma_l1_bound",
6262f244993SIan Rogers        "MetricThreshold": "tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)",
6272f244993SIan Rogers        "PublicDescription": "This metric estimates how often the CPU was stalled without loads missing the L1 data cache.  The L1 data cache typically has the shortest latency.  However; in certain cases like loads blocked on older stores; a load might suffer due to high latency even though it is being satisfied by the L1. Another example is loads who miss in the TLB. These cases are characterized by execution unit stalls; while some non-completed demand load lives in the machine without having that demand load missing the L1 cache. Sample with: MEM_LOAD_UOPS_RETIRED.L1_HIT_PS;MEM_LOAD_UOPS_RETIRED.HIT_LFB_PS. Related metrics: tma_clears_resteers, tma_machine_clears, tma_microcode_sequencer, tma_ms_switches, tma_ports_utilized_1",
6282f244993SIan Rogers        "ScaleUnit": "100%"
6292f244993SIan Rogers    },
6302f244993SIan Rogers    {
6312f244993SIan Rogers        "BriefDescription": "This metric estimates how often the CPU was stalled due to L2 cache accesses by loads",
632*c9e7771fSIan Rogers        "MetricExpr": "(CYCLE_ACTIVITY.STALLS_L1D_PENDING - CYCLE_ACTIVITY.STALLS_L2_PENDING) / tma_info_thread_clks",
6332f244993SIan Rogers        "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_memory_bound_group",
6342f244993SIan Rogers        "MetricName": "tma_l2_bound",
6352f244993SIan Rogers        "MetricThreshold": "tma_l2_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)",
6362f244993SIan Rogers        "PublicDescription": "This metric estimates how often the CPU was stalled due to L2 cache accesses by loads.  Avoiding cache misses (i.e. L1 misses/L2 hits) can improve the latency and increase performance. Sample with: MEM_LOAD_UOPS_RETIRED.L2_HIT_PS",
6372f244993SIan Rogers        "ScaleUnit": "100%"
6382f244993SIan Rogers    },
6392f244993SIan Rogers    {
6402f244993SIan Rogers        "BriefDescription": "This metric estimates how often the CPU was stalled due to loads accesses to L3 cache or contended with a sibling Core",
6412f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS_SMT",
642*c9e7771fSIan Rogers        "MetricExpr": "MEM_LOAD_UOPS_RETIRED.L3_HIT / (MEM_LOAD_UOPS_RETIRED.L3_HIT + 7 * MEM_LOAD_UOPS_RETIRED.L3_MISS) * CYCLE_ACTIVITY.STALLS_L2_PENDING / tma_info_thread_clks",
6432f244993SIan Rogers        "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_memory_bound_group",
6442f244993SIan Rogers        "MetricName": "tma_l3_bound",
6452f244993SIan Rogers        "MetricThreshold": "tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)",
6462f244993SIan Rogers        "PublicDescription": "This metric estimates how often the CPU was stalled due to loads accesses to L3 cache or contended with a sibling Core.  Avoiding cache misses (i.e. L2 misses/L3 hits) can improve the latency and increase performance. Sample with: MEM_LOAD_UOPS_RETIRED.L3_HIT_PS",
6472f244993SIan Rogers        "ScaleUnit": "100%"
6482f244993SIan Rogers    },
6492f244993SIan Rogers    {
6502f244993SIan Rogers        "BriefDescription": "This metric represents fraction of cycles with demand load accesses that hit the L3 cache under unloaded scenarios (possibly L3 latency limited)",
6512f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
652*c9e7771fSIan Rogers        "MetricExpr": "29 * (MEM_LOAD_UOPS_RETIRED.L3_HIT * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.L3_HIT + MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_RETIRED.L3_MISS))) / tma_info_thread_clks",
6532f244993SIan Rogers        "MetricGroup": "MemoryLat;TopdownL4;tma_L4_group;tma_issueLat;tma_l3_bound_group",
6542f244993SIan Rogers        "MetricName": "tma_l3_hit_latency",
6552f244993SIan Rogers        "MetricThreshold": "tma_l3_hit_latency > 0.1 & (tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
6562f244993SIan Rogers        "PublicDescription": "This metric represents fraction of cycles with demand load accesses that hit the L3 cache under unloaded scenarios (possibly L3 latency limited).  Avoiding private cache misses (i.e. L2 misses/L3 hits) will improve the latency; reduce contention with sibling physical cores and increase performance.  Note the value of this node may overlap with its siblings. Sample with: MEM_LOAD_UOPS_RETIRED.L3_HIT_PS. Related metrics: tma_mem_latency",
6572f244993SIan Rogers        "ScaleUnit": "100%"
6582f244993SIan Rogers    },
6592f244993SIan Rogers    {
6602f244993SIan Rogers        "BriefDescription": "This metric represents fraction of cycles CPU was stalled due to Length Changing Prefixes (LCPs)",
661*c9e7771fSIan Rogers        "MetricExpr": "ILD_STALL.LCP / tma_info_thread_clks",
6622f244993SIan Rogers        "MetricGroup": "FetchLat;TopdownL3;tma_L3_group;tma_fetch_latency_group;tma_issueFB",
6632f244993SIan Rogers        "MetricName": "tma_lcp",
6642f244993SIan Rogers        "MetricThreshold": "tma_lcp > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)",
665*c9e7771fSIan Rogers        "PublicDescription": "This metric represents fraction of cycles CPU was stalled due to Length Changing Prefixes (LCPs). Using proper compiler flags or Intel Compiler by default will certainly avoid this. #Link: Optimization Guide about LCP BKMs. Related metrics: tma_dsb_switches, tma_fetch_bandwidth, tma_info_frontend_dsb_coverage, tma_info_inst_mix_iptb",
6662f244993SIan Rogers        "ScaleUnit": "100%"
6672f244993SIan Rogers    },
6682f244993SIan Rogers    {
6692f244993SIan Rogers        "BriefDescription": "This metric represents fraction of slots where the CPU was retiring light-weight operations -- instructions that require no more than one uop (micro-operation)",
6702f244993SIan Rogers        "MetricExpr": "tma_retiring - tma_heavy_operations",
6712f244993SIan Rogers        "MetricGroup": "Retire;TmaL2;TopdownL2;tma_L2_group;tma_retiring_group",
6722f244993SIan Rogers        "MetricName": "tma_light_operations",
6732f244993SIan Rogers        "MetricThreshold": "tma_light_operations > 0.6",
674ccc66c60SIan Rogers        "MetricgroupNoGroup": "TopdownL2",
6752f244993SIan Rogers        "PublicDescription": "This metric represents fraction of slots where the CPU was retiring light-weight operations -- instructions that require no more than one uop (micro-operation). This correlates with total number of instructions used by the program. A uops-per-instruction (see UopPI metric) ratio of 1 or less should be expected for decently optimized software running on Intel Core/Xeon products. While this often indicates efficient X86 instructions were executed; high value does not necessarily mean better performance cannot be achieved. Sample with: INST_RETIRED.PREC_DIST",
6762f244993SIan Rogers        "ScaleUnit": "100%"
6772f244993SIan Rogers    },
6782f244993SIan Rogers    {
6792f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Load operations",
6802f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS_NMI",
681*c9e7771fSIan Rogers        "MetricExpr": "(UOPS_DISPATCHED_PORT.PORT_2 + UOPS_DISPATCHED_PORT.PORT_3 + UOPS_DISPATCHED_PORT.PORT_7 - UOPS_DISPATCHED_PORT.PORT_4) / (2 * tma_info_core_core_clks)",
6822f244993SIan Rogers        "MetricGroup": "TopdownL5;tma_L5_group;tma_ports_utilized_3m_group",
6832f244993SIan Rogers        "MetricName": "tma_load_op_utilization",
6842f244993SIan Rogers        "MetricThreshold": "tma_load_op_utilization > 0.6",
6852f244993SIan Rogers        "PublicDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Load operations. Sample with: UOPS_DISPATCHED.PORT_2_3",
6862f244993SIan Rogers        "ScaleUnit": "100%"
6872f244993SIan Rogers    },
6882f244993SIan Rogers    {
6892f244993SIan Rogers        "BriefDescription": "This metric represents fraction of cycles the CPU spent handling cache misses due to lock operations",
6902f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
691*c9e7771fSIan Rogers        "MetricExpr": "MEM_UOPS_RETIRED.LOCK_LOADS / MEM_UOPS_RETIRED.ALL_STORES * min(CPU_CLK_UNHALTED.THREAD, OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO) / tma_info_thread_clks",
6922f244993SIan Rogers        "MetricGroup": "Offcore;TopdownL4;tma_L4_group;tma_issueRFO;tma_l1_bound_group",
6932f244993SIan Rogers        "MetricName": "tma_lock_latency",
6942f244993SIan Rogers        "MetricThreshold": "tma_lock_latency > 0.2 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
6952f244993SIan Rogers        "PublicDescription": "This metric represents fraction of cycles the CPU spent handling cache misses due to lock operations. Due to the microarchitecture handling of locks; they are classified as L1_Bound regardless of what memory source satisfied them. Sample with: MEM_UOPS_RETIRED.LOCK_LOADS_PS. Related metrics: tma_store_latency",
6962f244993SIan Rogers        "ScaleUnit": "100%"
6972f244993SIan Rogers    },
6982f244993SIan Rogers    {
6992f244993SIan Rogers        "BriefDescription": "This metric represents fraction of slots the CPU has wasted due to Machine Clears",
7002f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
7012f244993SIan Rogers        "MetricExpr": "tma_bad_speculation - tma_branch_mispredicts",
7022f244993SIan Rogers        "MetricGroup": "BadSpec;MachineClears;TmaL2;TopdownL2;tma_L2_group;tma_bad_speculation_group;tma_issueMC;tma_issueSyncxn",
7032f244993SIan Rogers        "MetricName": "tma_machine_clears",
7042f244993SIan Rogers        "MetricThreshold": "tma_machine_clears > 0.1 & tma_bad_speculation > 0.15",
705ccc66c60SIan Rogers        "MetricgroupNoGroup": "TopdownL2",
7062f244993SIan Rogers        "PublicDescription": "This metric represents fraction of slots the CPU has wasted due to Machine Clears.  These slots are either wasted by uops fetched prior to the clear; or stalls the out-of-order portion of the machine needs to recover its state after the clear. For example; this can happen due to memory ordering Nukes (e.g. Memory Disambiguation) or Self-Modifying-Code (SMC) nukes. Sample with: MACHINE_CLEARS.COUNT. Related metrics: tma_clears_resteers, tma_contested_accesses, tma_data_sharing, tma_false_sharing, tma_l1_bound, tma_microcode_sequencer, tma_ms_switches, tma_remote_cache",
7072f244993SIan Rogers        "ScaleUnit": "100%"
7082f244993SIan Rogers    },
7092f244993SIan Rogers    {
7102f244993SIan Rogers        "BriefDescription": "This metric estimates fraction of cycles where the core's performance was likely hurt due to approaching bandwidth limits of external memory (DRAM)",
711*c9e7771fSIan Rogers        "MetricExpr": "min(CPU_CLK_UNHALTED.THREAD, cpu@OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD\\,cmask\\=6@) / tma_info_thread_clks",
7122f244993SIan Rogers        "MetricGroup": "MemoryBW;Offcore;TopdownL4;tma_L4_group;tma_dram_bound_group;tma_issueBW",
7132f244993SIan Rogers        "MetricName": "tma_mem_bandwidth",
7142f244993SIan Rogers        "MetricThreshold": "tma_mem_bandwidth > 0.2 & (tma_dram_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
715*c9e7771fSIan Rogers        "PublicDescription": "This metric estimates fraction of cycles where the core's performance was likely hurt due to approaching bandwidth limits of external memory (DRAM).  The underlying heuristic assumes that a similar off-core traffic is generated by all IA cores. This metric does not aggregate non-data-read requests by this logical processor; requests from other IA Logical Processors/Physical Cores/sockets; or other non-IA devices like GPU; hence the maximum external memory bandwidth limits may or may not be approached when this metric is flagged (see Uncore counters for that). Related metrics: tma_fb_full, tma_info_system_dram_bw_use, tma_sq_full",
7162f244993SIan Rogers        "ScaleUnit": "100%"
7172f244993SIan Rogers    },
7182f244993SIan Rogers    {
7192f244993SIan Rogers        "BriefDescription": "This metric estimates fraction of cycles where the performance was likely hurt due to latency from external memory (DRAM)",
720*c9e7771fSIan Rogers        "MetricExpr": "min(CPU_CLK_UNHALTED.THREAD, OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD) / tma_info_thread_clks - tma_mem_bandwidth",
7212f244993SIan Rogers        "MetricGroup": "MemoryLat;Offcore;TopdownL4;tma_L4_group;tma_dram_bound_group;tma_issueLat",
7222f244993SIan Rogers        "MetricName": "tma_mem_latency",
7232f244993SIan Rogers        "MetricThreshold": "tma_mem_latency > 0.1 & (tma_dram_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
7242f244993SIan Rogers        "PublicDescription": "This metric estimates fraction of cycles where the performance was likely hurt due to latency from external memory (DRAM).  This metric does not aggregate requests from other Logical Processors/Physical Cores/sockets (see Uncore counters for that). Related metrics: tma_l3_hit_latency",
7252f244993SIan Rogers        "ScaleUnit": "100%"
7262f244993SIan Rogers    },
7272f244993SIan Rogers    {
7282f244993SIan Rogers        "BriefDescription": "This metric represents fraction of slots the Memory subsystem within the Backend was a bottleneck",
7292f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
730*c9e7771fSIan Rogers        "MetricExpr": "((min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING) + RESOURCE_STALLS.SB) / (min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) + (cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ - (cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@ if tma_info_thread_ipc > 1.8 else cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@)) / 2 - (RS_EVENTS.EMPTY_CYCLES if tma_fetch_latency > 0.1 else 0) + RESOURCE_STALLS.SB) if #SMT_on else min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) + cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ - (cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@ if tma_info_thread_ipc > 1.8 else cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@) - (RS_EVENTS.EMPTY_CYCLES if tma_fetch_latency > 0.1 else 0) + RESOURCE_STALLS.SB) * tma_backend_bound",
7312f244993SIan Rogers        "MetricGroup": "Backend;TmaL2;TopdownL2;tma_L2_group;tma_backend_bound_group",
7322f244993SIan Rogers        "MetricName": "tma_memory_bound",
7332f244993SIan Rogers        "MetricThreshold": "tma_memory_bound > 0.2 & tma_backend_bound > 0.2",
734ccc66c60SIan Rogers        "MetricgroupNoGroup": "TopdownL2",
7352f244993SIan Rogers        "PublicDescription": "This metric represents fraction of slots the Memory subsystem within the Backend was a bottleneck.  Memory Bound estimates fraction of slots where pipeline is likely stalled due to demand load or store instructions. This accounts mainly for (1) non-completed in-flight memory demand loads which coincides with execution units starvation; in addition to (2) cases where stores could impose backpressure on the pipeline when many of them get buffered at the same time (less common out of the two).",
7362f244993SIan Rogers        "ScaleUnit": "100%"
7372f244993SIan Rogers    },
7382f244993SIan Rogers    {
7392f244993SIan Rogers        "BriefDescription": "This metric represents fraction of slots the CPU was retiring uops fetched by the Microcode Sequencer (MS) unit",
740*c9e7771fSIan Rogers        "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / UOPS_ISSUED.ANY * IDQ.MS_UOPS / tma_info_thread_slots",
7412f244993SIan Rogers        "MetricGroup": "MicroSeq;TopdownL3;tma_L3_group;tma_heavy_operations_group;tma_issueMC;tma_issueMS",
7422f244993SIan Rogers        "MetricName": "tma_microcode_sequencer",
7432f244993SIan Rogers        "MetricThreshold": "tma_microcode_sequencer > 0.05 & tma_heavy_operations > 0.1",
7442f244993SIan Rogers        "PublicDescription": "This metric represents fraction of slots the CPU was retiring uops fetched by the Microcode Sequencer (MS) unit.  The MS is used for CISC instructions not supported by the default decoders (like repeat move strings; or CPUID); or by microcode assists used to address some operation modes (like in Floating Point assists). These cases can often be avoided. Sample with: IDQ.MS_UOPS. Related metrics: tma_clears_resteers, tma_l1_bound, tma_machine_clears, tma_ms_switches",
7452f244993SIan Rogers        "ScaleUnit": "100%"
7462f244993SIan Rogers    },
7472f244993SIan Rogers    {
7482f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles in which CPU was likely limited due to the MITE pipeline (the legacy decode pipeline)",
749*c9e7771fSIan Rogers        "MetricExpr": "(IDQ.ALL_MITE_CYCLES_ANY_UOPS - IDQ.ALL_MITE_CYCLES_4_UOPS) / tma_info_core_core_clks / 2",
7502f244993SIan Rogers        "MetricGroup": "DSBmiss;FetchBW;TopdownL3;tma_L3_group;tma_fetch_bandwidth_group",
7512f244993SIan Rogers        "MetricName": "tma_mite",
752*c9e7771fSIan Rogers        "MetricThreshold": "tma_mite > 0.1 & (tma_fetch_bandwidth > 0.1 & tma_frontend_bound > 0.15 & tma_info_thread_ipc / 4 > 0.35)",
7532f244993SIan Rogers        "PublicDescription": "This metric represents Core fraction of cycles in which CPU was likely limited due to the MITE pipeline (the legacy decode pipeline). This pipeline is used for code that was not pre-cached in the DSB or LSD. For example; inefficiencies due to asymmetric decoders; use of long immediate or LCP can manifest as MITE fetch bandwidth bottleneck.",
7542f244993SIan Rogers        "ScaleUnit": "100%"
7552f244993SIan Rogers    },
7562f244993SIan Rogers    {
7572f244993SIan Rogers        "BriefDescription": "This metric estimates the fraction of cycles when the CPU was stalled due to switches of uop delivery to the Microcode Sequencer (MS)",
758*c9e7771fSIan Rogers        "MetricExpr": "2 * IDQ.MS_SWITCHES / tma_info_thread_clks",
7592f244993SIan Rogers        "MetricGroup": "FetchLat;MicroSeq;TopdownL3;tma_L3_group;tma_fetch_latency_group;tma_issueMC;tma_issueMS;tma_issueMV;tma_issueSO",
7602f244993SIan Rogers        "MetricName": "tma_ms_switches",
7612f244993SIan Rogers        "MetricThreshold": "tma_ms_switches > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)",
7622f244993SIan Rogers        "PublicDescription": "This metric estimates the fraction of cycles when the CPU was stalled due to switches of uop delivery to the Microcode Sequencer (MS). Commonly used instructions are optimized for delivery by the DSB (decoded i-cache) or MITE (legacy instruction decode) pipelines. Certain operations cannot be handled natively by the execution pipeline; and must be performed by microcode (small programs injected into the execution stream). Switching to the MS too often can negatively impact performance. The MS is designated to deliver long uop flows required by CISC instructions like CPUID; or uncommon conditions like Floating Point Assists when dealing with Denormals. Sample with: IDQ.MS_SWITCHES. Related metrics: tma_clears_resteers, tma_l1_bound, tma_machine_clears, tma_microcode_sequencer, tma_mixing_vectors, tma_serializing_operation",
7632f244993SIan Rogers        "ScaleUnit": "100%"
7642f244993SIan Rogers    },
7652f244993SIan Rogers    {
7662f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 0 ([SNB+] ALU; [HSW+] ALU and 2nd branch)",
767*c9e7771fSIan Rogers        "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_0 / tma_info_core_core_clks",
7682f244993SIan Rogers        "MetricGroup": "Compute;TopdownL6;tma_L6_group;tma_alu_op_utilization_group;tma_issue2P",
7692f244993SIan Rogers        "MetricName": "tma_port_0",
7702f244993SIan Rogers        "MetricThreshold": "tma_port_0 > 0.6",
7712f244993SIan Rogers        "PublicDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 0 ([SNB+] ALU; [HSW+] ALU and 2nd branch). Sample with: UOPS_DISPATCHED_PORT.PORT_0. Related metrics: tma_fp_scalar, tma_fp_vector, tma_fp_vector_512b, tma_port_1, tma_port_5, tma_port_6, tma_ports_utilized_2",
7722f244993SIan Rogers        "ScaleUnit": "100%"
7732f244993SIan Rogers    },
7742f244993SIan Rogers    {
7752f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 1 (ALU)",
776*c9e7771fSIan Rogers        "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_1 / tma_info_core_core_clks",
7772f244993SIan Rogers        "MetricGroup": "TopdownL6;tma_L6_group;tma_alu_op_utilization_group;tma_issue2P",
7782f244993SIan Rogers        "MetricName": "tma_port_1",
7792f244993SIan Rogers        "MetricThreshold": "tma_port_1 > 0.6",
7802f244993SIan Rogers        "PublicDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 1 (ALU). Sample with: UOPS_DISPATCHED_PORT.PORT_1. Related metrics: tma_fp_scalar, tma_fp_vector, tma_fp_vector_512b, tma_port_0, tma_port_5, tma_port_6, tma_ports_utilized_2",
7812f244993SIan Rogers        "ScaleUnit": "100%"
7822f244993SIan Rogers    },
7832f244993SIan Rogers    {
7842f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 2 ([SNB+]Loads and Store-address; [ICL+] Loads)",
785*c9e7771fSIan Rogers        "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_2 / tma_info_core_core_clks",
7862f244993SIan Rogers        "MetricGroup": "TopdownL6;tma_L6_group;tma_load_op_utilization_group",
7872f244993SIan Rogers        "MetricName": "tma_port_2",
7882f244993SIan Rogers        "MetricThreshold": "tma_port_2 > 0.6",
7892f244993SIan Rogers        "PublicDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 2 ([SNB+]Loads and Store-address; [ICL+] Loads). Sample with: UOPS_DISPATCHED_PORT.PORT_2",
7902f244993SIan Rogers        "ScaleUnit": "100%"
7912f244993SIan Rogers    },
7922f244993SIan Rogers    {
7932f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 3 ([SNB+]Loads and Store-address; [ICL+] Loads)",
794*c9e7771fSIan Rogers        "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_3 / tma_info_core_core_clks",
7952f244993SIan Rogers        "MetricGroup": "TopdownL6;tma_L6_group;tma_load_op_utilization_group",
7962f244993SIan Rogers        "MetricName": "tma_port_3",
7972f244993SIan Rogers        "MetricThreshold": "tma_port_3 > 0.6",
7982f244993SIan Rogers        "PublicDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 3 ([SNB+]Loads and Store-address; [ICL+] Loads). Sample with: UOPS_DISPATCHED_PORT.PORT_3",
7992f244993SIan Rogers        "ScaleUnit": "100%"
8002f244993SIan Rogers    },
8012f244993SIan Rogers    {
8022f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 4 (Store-data)",
8032f244993SIan Rogers        "MetricExpr": "tma_store_op_utilization",
8042f244993SIan Rogers        "MetricGroup": "TopdownL6;tma_L6_group;tma_issueSpSt;tma_store_op_utilization_group",
8052f244993SIan Rogers        "MetricName": "tma_port_4",
8062f244993SIan Rogers        "MetricThreshold": "tma_port_4 > 0.6",
8072f244993SIan Rogers        "PublicDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 4 (Store-data). Sample with: UOPS_DISPATCHED_PORT.PORT_4. Related metrics: tma_split_stores",
8082f244993SIan Rogers        "ScaleUnit": "100%"
8092f244993SIan Rogers    },
8102f244993SIan Rogers    {
8112f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 5 ([SNB+] Branches and ALU; [HSW+] ALU)",
812*c9e7771fSIan Rogers        "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_5 / tma_info_core_core_clks",
8132f244993SIan Rogers        "MetricGroup": "TopdownL6;tma_L6_group;tma_alu_op_utilization_group;tma_issue2P",
8142f244993SIan Rogers        "MetricName": "tma_port_5",
8152f244993SIan Rogers        "MetricThreshold": "tma_port_5 > 0.6",
8162f244993SIan Rogers        "PublicDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 5 ([SNB+] Branches and ALU; [HSW+] ALU). Sample with: UOPS_DISPATCHED.PORT_5. Related metrics: tma_fp_scalar, tma_fp_vector, tma_fp_vector_512b, tma_port_0, tma_port_1, tma_port_6, tma_ports_utilized_2",
8172f244993SIan Rogers        "ScaleUnit": "100%"
8182f244993SIan Rogers    },
8192f244993SIan Rogers    {
8202f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 6 ([HSW+]Primary Branch and simple ALU)",
821*c9e7771fSIan Rogers        "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_6 / tma_info_core_core_clks",
8222f244993SIan Rogers        "MetricGroup": "TopdownL6;tma_L6_group;tma_alu_op_utilization_group;tma_issue2P",
8232f244993SIan Rogers        "MetricName": "tma_port_6",
8242f244993SIan Rogers        "MetricThreshold": "tma_port_6 > 0.6",
8252f244993SIan Rogers        "PublicDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 6 ([HSW+]Primary Branch and simple ALU). Sample with: UOPS_DISPATCHED_PORT.PORT_6. Related metrics: tma_fp_scalar, tma_fp_vector, tma_fp_vector_512b, tma_port_0, tma_port_1, tma_port_5, tma_ports_utilized_2",
8262f244993SIan Rogers        "ScaleUnit": "100%"
8272f244993SIan Rogers    },
8282f244993SIan Rogers    {
8292f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 7 ([HSW+]simple Store-address)",
830*c9e7771fSIan Rogers        "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_7 / tma_info_core_core_clks",
8312f244993SIan Rogers        "MetricGroup": "TopdownL6;tma_L6_group;tma_store_op_utilization_group",
8322f244993SIan Rogers        "MetricName": "tma_port_7",
8332f244993SIan Rogers        "MetricThreshold": "tma_port_7 > 0.6",
8342f244993SIan Rogers        "PublicDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 7 ([HSW+]simple Store-address). Sample with: UOPS_DISPATCHED_PORT.PORT_7",
8352f244993SIan Rogers        "ScaleUnit": "100%"
8362f244993SIan Rogers    },
8372f244993SIan Rogers    {
8382f244993SIan Rogers        "BriefDescription": "This metric estimates fraction of cycles the CPU performance was potentially limited due to Core computation issues (non divider-related)",
8392f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
840*c9e7771fSIan Rogers        "MetricExpr": "(min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) + (cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ - (cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@ if tma_info_thread_ipc > 1.8 else cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@)) / 2 - (RS_EVENTS.EMPTY_CYCLES if tma_fetch_latency > 0.1 else 0) + RESOURCE_STALLS.SB if #SMT_on else min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) + cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ - (cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@ if tma_info_thread_ipc > 1.8 else cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@) - (RS_EVENTS.EMPTY_CYCLES if tma_fetch_latency > 0.1 else 0) + RESOURCE_STALLS.SB - RESOURCE_STALLS.SB - min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING)) / tma_info_thread_clks",
8412f244993SIan Rogers        "MetricGroup": "PortsUtil;TopdownL3;tma_L3_group;tma_core_bound_group",
8422f244993SIan Rogers        "MetricName": "tma_ports_utilization",
8432f244993SIan Rogers        "MetricThreshold": "tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2)",
8442f244993SIan Rogers        "PublicDescription": "This metric estimates fraction of cycles the CPU performance was potentially limited due to Core computation issues (non divider-related).  Two distinct categories can be attributed into this metric: (1) heavy data-dependency among contiguous instructions would manifest in this metric - such cases are often referred to as low Instruction Level Parallelism (ILP). (2) Contention on some hardware execution unit other than Divider. For example; when there are too many multiply operations.",
8452f244993SIan Rogers        "ScaleUnit": "100%"
8462f244993SIan Rogers    },
8472f244993SIan Rogers    {
8482f244993SIan Rogers        "BriefDescription": "This metric represents fraction of cycles CPU executed no uops on any execution port (Logical Processor cycles since ICL, Physical Core cycles otherwise)",
849*c9e7771fSIan Rogers        "MetricExpr": "(cpu@UOPS_EXECUTED.CORE\\,inv\\,cmask\\=1@ / 2 if #SMT_on else (min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) - (RS_EVENTS.EMPTY_CYCLES if tma_fetch_latency > 0.1 else 0)) / tma_info_core_core_clks)",
8502f244993SIan Rogers        "MetricGroup": "PortsUtil;TopdownL4;tma_L4_group;tma_ports_utilization_group",
8512f244993SIan Rogers        "MetricName": "tma_ports_utilized_0",
8522f244993SIan Rogers        "MetricThreshold": "tma_ports_utilized_0 > 0.2 & (tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2))",
8532f244993SIan Rogers        "PublicDescription": "This metric represents fraction of cycles CPU executed no uops on any execution port (Logical Processor cycles since ICL, Physical Core cycles otherwise). Long-latency instructions like divides may contribute to this metric.",
8542f244993SIan Rogers        "ScaleUnit": "100%"
8552f244993SIan Rogers    },
8562f244993SIan Rogers    {
8572f244993SIan Rogers        "BriefDescription": "This metric represents fraction of cycles where the CPU executed total of 1 uop per cycle on all execution ports (Logical Processor cycles since ICL, Physical Core cycles otherwise)",
858*c9e7771fSIan Rogers        "MetricExpr": "((cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ - cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@) / 2 if #SMT_on else (cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ - cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@) / tma_info_core_core_clks)",
8592f244993SIan Rogers        "MetricGroup": "PortsUtil;TopdownL4;tma_L4_group;tma_issueL1;tma_ports_utilization_group",
8602f244993SIan Rogers        "MetricName": "tma_ports_utilized_1",
8612f244993SIan Rogers        "MetricThreshold": "tma_ports_utilized_1 > 0.2 & (tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2))",
8622f244993SIan Rogers        "PublicDescription": "This metric represents fraction of cycles where the CPU executed total of 1 uop per cycle on all execution ports (Logical Processor cycles since ICL, Physical Core cycles otherwise). This can be due to heavy data-dependency among software instructions; or over oversubscribing a particular hardware resource. In some other cases with high 1_Port_Utilized and L1_Bound; this metric can point to L1 data-cache latency bottleneck that may not necessarily manifest with complete execution starvation (due to the short L1 latency e.g. walking a linked list) - looking at the assembly can be helpful. Related metrics: tma_l1_bound",
8632f244993SIan Rogers        "ScaleUnit": "100%"
8642f244993SIan Rogers    },
8652f244993SIan Rogers    {
8662f244993SIan Rogers        "BriefDescription": "This metric represents fraction of cycles CPU executed total of 2 uops per cycle on all execution ports (Logical Processor cycles since ICL, Physical Core cycles otherwise)",
867*c9e7771fSIan Rogers        "MetricExpr": "((cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@ - cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@) / 2 if #SMT_on else (cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@ - cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@) / tma_info_core_core_clks)",
8682f244993SIan Rogers        "MetricGroup": "PortsUtil;TopdownL4;tma_L4_group;tma_issue2P;tma_ports_utilization_group",
8692f244993SIan Rogers        "MetricName": "tma_ports_utilized_2",
8702f244993SIan Rogers        "MetricThreshold": "tma_ports_utilized_2 > 0.15 & (tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2))",
8712f244993SIan Rogers        "PublicDescription": "This metric represents fraction of cycles CPU executed total of 2 uops per cycle on all execution ports (Logical Processor cycles since ICL, Physical Core cycles otherwise).  Loop Vectorization -most compilers feature auto-Vectorization options today- reduces pressure on the execution ports as multiple elements are calculated with same uop. Related metrics: tma_fp_scalar, tma_fp_vector, tma_fp_vector_512b, tma_port_0, tma_port_1, tma_port_5, tma_port_6",
8722f244993SIan Rogers        "ScaleUnit": "100%"
8732f244993SIan Rogers    },
8742f244993SIan Rogers    {
8752f244993SIan Rogers        "BriefDescription": "This metric represents fraction of cycles CPU executed total of 3 or more uops per cycle on all execution ports (Logical Processor cycles since ICL, Physical Core cycles otherwise).",
876*c9e7771fSIan Rogers        "MetricExpr": "(cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@ / 2 if #SMT_on else cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@) / tma_info_core_core_clks",
8772f244993SIan Rogers        "MetricGroup": "PortsUtil;TopdownL4;tma_L4_group;tma_ports_utilization_group",
8782f244993SIan Rogers        "MetricName": "tma_ports_utilized_3m",
8792f244993SIan Rogers        "MetricThreshold": "tma_ports_utilized_3m > 0.7 & (tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2))",
8802f244993SIan Rogers        "ScaleUnit": "100%"
8812f244993SIan Rogers    },
8822f244993SIan Rogers    {
8832f244993SIan Rogers        "BriefDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired",
884*c9e7771fSIan Rogers        "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / tma_info_thread_slots",
8852f244993SIan Rogers        "MetricGroup": "TmaL1;TopdownL1;tma_L1_group",
8862f244993SIan Rogers        "MetricName": "tma_retiring",
8872f244993SIan Rogers        "MetricThreshold": "tma_retiring > 0.7 | tma_heavy_operations > 0.1",
888ccc66c60SIan Rogers        "MetricgroupNoGroup": "TopdownL1",
8892f244993SIan Rogers        "PublicDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired. Ideally; all pipeline slots would be attributed to the Retiring category.  Retiring of 100% would indicate the maximum Pipeline_Width throughput was achieved.  Maximizing Retiring typically increases the Instructions-per-cycle (see IPC metric). Note that a high Retiring value does not necessary mean there is no room for more performance.  For example; Heavy-operations or Microcode Assists are categorized under Retiring. They often indicate suboptimal performance and can often be optimized or avoided. Sample with: UOPS_RETIRED.RETIRE_SLOTS",
8902f244993SIan Rogers        "ScaleUnit": "100%"
8912f244993SIan Rogers    },
8922f244993SIan Rogers    {
8932f244993SIan Rogers        "BriefDescription": "This metric estimates fraction of cycles handling memory load split accesses - load that cross 64-byte cache line boundary",
8942f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
895*c9e7771fSIan Rogers        "MetricExpr": "tma_info_memory_load_miss_real_latency * LD_BLOCKS.NO_SR / tma_info_thread_clks",
8962f244993SIan Rogers        "MetricGroup": "TopdownL4;tma_L4_group;tma_l1_bound_group",
8972f244993SIan Rogers        "MetricName": "tma_split_loads",
8982f244993SIan Rogers        "MetricThreshold": "tma_split_loads > 0.2 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
8992f244993SIan Rogers        "PublicDescription": "This metric estimates fraction of cycles handling memory load split accesses - load that cross 64-byte cache line boundary. Sample with: MEM_UOPS_RETIRED.SPLIT_LOADS_PS",
9002f244993SIan Rogers        "ScaleUnit": "100%"
9012f244993SIan Rogers    },
9022f244993SIan Rogers    {
9032f244993SIan Rogers        "BriefDescription": "This metric represents rate of split store accesses",
904*c9e7771fSIan Rogers        "MetricExpr": "2 * MEM_UOPS_RETIRED.SPLIT_STORES / tma_info_core_core_clks",
9052f244993SIan Rogers        "MetricGroup": "TopdownL4;tma_L4_group;tma_issueSpSt;tma_store_bound_group",
9062f244993SIan Rogers        "MetricName": "tma_split_stores",
9072f244993SIan Rogers        "MetricThreshold": "tma_split_stores > 0.2 & (tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
9082f244993SIan Rogers        "PublicDescription": "This metric represents rate of split store accesses.  Consider aligning your data to the 64-byte cache line granularity. Sample with: MEM_UOPS_RETIRED.SPLIT_STORES_PS. Related metrics: tma_port_4",
9092f244993SIan Rogers        "ScaleUnit": "100%"
9102f244993SIan Rogers    },
9112f244993SIan Rogers    {
9122f244993SIan Rogers        "BriefDescription": "This metric measures fraction of cycles where the Super Queue (SQ) was full taking into account all request-types and both hardware SMT threads (Logical Processors)",
913*c9e7771fSIan Rogers        "MetricExpr": "(OFFCORE_REQUESTS_BUFFER.SQ_FULL / 2 if #SMT_on else OFFCORE_REQUESTS_BUFFER.SQ_FULL) / tma_info_core_core_clks",
9142f244993SIan Rogers        "MetricGroup": "MemoryBW;Offcore;TopdownL4;tma_L4_group;tma_issueBW;tma_l3_bound_group",
9152f244993SIan Rogers        "MetricName": "tma_sq_full",
9162f244993SIan Rogers        "MetricThreshold": "tma_sq_full > 0.3 & (tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
917*c9e7771fSIan Rogers        "PublicDescription": "This metric measures fraction of cycles where the Super Queue (SQ) was full taking into account all request-types and both hardware SMT threads (Logical Processors). Related metrics: tma_fb_full, tma_info_system_dram_bw_use, tma_mem_bandwidth",
9182f244993SIan Rogers        "ScaleUnit": "100%"
9192f244993SIan Rogers    },
9202f244993SIan Rogers    {
9212f244993SIan Rogers        "BriefDescription": "This metric estimates how often CPU was stalled  due to RFO store memory accesses; RFO store issue a read-for-ownership request before the write",
922*c9e7771fSIan Rogers        "MetricExpr": "RESOURCE_STALLS.SB / tma_info_thread_clks",
9232f244993SIan Rogers        "MetricGroup": "MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_memory_bound_group",
9242f244993SIan Rogers        "MetricName": "tma_store_bound",
9252f244993SIan Rogers        "MetricThreshold": "tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)",
9262f244993SIan Rogers        "PublicDescription": "This metric estimates how often CPU was stalled  due to RFO store memory accesses; RFO store issue a read-for-ownership request before the write. Even though store accesses do not typically stall out-of-order CPUs; there are few cases where stores can lead to actual stalls. This metric will be flagged should RFO stores be a bottleneck. Sample with: MEM_UOPS_RETIRED.ALL_STORES_PS",
9272f244993SIan Rogers        "ScaleUnit": "100%"
9282f244993SIan Rogers    },
9292f244993SIan Rogers    {
9302f244993SIan Rogers        "BriefDescription": "This metric roughly estimates fraction of cycles when the memory subsystem had loads blocked since they could not forward data from earlier (in program order) overlapping stores",
931*c9e7771fSIan Rogers        "MetricExpr": "13 * LD_BLOCKS.STORE_FORWARD / tma_info_thread_clks",
9322f244993SIan Rogers        "MetricGroup": "TopdownL4;tma_L4_group;tma_l1_bound_group",
9332f244993SIan Rogers        "MetricName": "tma_store_fwd_blk",
9342f244993SIan Rogers        "MetricThreshold": "tma_store_fwd_blk > 0.1 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
9352f244993SIan Rogers        "PublicDescription": "This metric roughly estimates fraction of cycles when the memory subsystem had loads blocked since they could not forward data from earlier (in program order) overlapping stores. To streamline memory operations in the pipeline; a load can avoid waiting for memory if a prior in-flight store is writing the data that the load wants to read (store forwarding process). However; in some cases the load may be blocked for a significant time pending the store forward. For example; when the prior store is writing a smaller region than the load is reading.",
9362f244993SIan Rogers        "ScaleUnit": "100%"
9372f244993SIan Rogers    },
9382f244993SIan Rogers    {
9392f244993SIan Rogers        "BriefDescription": "This metric estimates fraction of cycles the CPU spent handling L1D store misses",
9402f244993SIan Rogers        "MetricConstraint": "NO_GROUP_EVENTS",
941*c9e7771fSIan Rogers        "MetricExpr": "(L2_RQSTS.RFO_HIT * 9 * (1 - MEM_UOPS_RETIRED.LOCK_LOADS / MEM_UOPS_RETIRED.ALL_STORES) + (1 - MEM_UOPS_RETIRED.LOCK_LOADS / MEM_UOPS_RETIRED.ALL_STORES) * min(CPU_CLK_UNHALTED.THREAD, OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO)) / tma_info_thread_clks",
9422f244993SIan Rogers        "MetricGroup": "MemoryLat;Offcore;TopdownL4;tma_L4_group;tma_issueRFO;tma_issueSL;tma_store_bound_group",
9432f244993SIan Rogers        "MetricName": "tma_store_latency",
9442f244993SIan Rogers        "MetricThreshold": "tma_store_latency > 0.1 & (tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))",
9452f244993SIan Rogers        "PublicDescription": "This metric estimates fraction of cycles the CPU spent handling L1D store misses. Store accesses usually less impact out-of-order core performance; however; holding resources for longer time can lead into undesired implications (e.g. contention on L1D fill-buffer entries - see FB_Full). Related metrics: tma_fb_full, tma_lock_latency",
9462f244993SIan Rogers        "ScaleUnit": "100%"
9472f244993SIan Rogers    },
9482f244993SIan Rogers    {
9492f244993SIan Rogers        "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Store operations",
950*c9e7771fSIan Rogers        "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_4 / tma_info_core_core_clks",
9512f244993SIan Rogers        "MetricGroup": "TopdownL5;tma_L5_group;tma_ports_utilized_3m_group",
9522f244993SIan Rogers        "MetricName": "tma_store_op_utilization",
9532f244993SIan Rogers        "MetricThreshold": "tma_store_op_utilization > 0.6",
9542f244993SIan Rogers        "ScaleUnit": "100%"
9552f244993SIan Rogers    },
9562f244993SIan Rogers    {
9572f244993SIan Rogers        "BriefDescription": "This metric serves as an approximation of legacy x87 usage",
958*c9e7771fSIan Rogers        "MetricExpr": "INST_RETIRED.X87 * tma_info_thread_uoppi / UOPS_RETIRED.RETIRE_SLOTS",
9592f244993SIan Rogers        "MetricGroup": "Compute;TopdownL4;tma_L4_group;tma_fp_arith_group",
9602f244993SIan Rogers        "MetricName": "tma_x87_use",
9612f244993SIan Rogers        "MetricThreshold": "tma_x87_use > 0.1",
9622f244993SIan Rogers        "PublicDescription": "This metric serves as an approximation of legacy x87 usage. It accounts for instructions beyond X87 FP arithmetic operations; hence may be used as a thermometer to avoid X87 high usage and preferably upgrade to modern ISA. See Tip under Tuning Hint.",
9632f244993SIan Rogers        "ScaleUnit": "100%"
9642099f51dSAndi Kleen    }
9652099f51dSAndi Kleen]
966