shadow metric clean up and improvements
Subsystems (2)
Ian Rogers
reviewerPATCH 21/51 perf vendor events intel: Refresh ivybridge metrics
In reply to Ian RogersUpdate the ivybridge metrics to TMA version 4.5. Generation was done using https://github.com/intel/perfmon.
Notable changes are TMA info metrics are renamed from their node name to be lower case and prefixed by tma_info_, MetricThreshold expressions are added, and the smi_cost metric group is added replicating existing hard coded metrics in stat-shadow.
--- .../arch/x86/ivybridge/ivb-metrics.json | 1270 +++++++++-------- 1 file changed, 712 insertions(+), 558 deletions(-)
tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json +712 -558
@@ -1,842 +1,996 @@ [ { - "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend", - "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / SLOTS", - "MetricGroup": "PGO;TopdownL1;tma_L1_group", - "MetricName": "tma_frontend_bound", - "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 Machine_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.", - "ScaleUnit": "100%" - }, - { - "BriefDescription": "This metric represents fraction of slots the CPU was stalled due to Frontend latency issues", - "MetricExpr": "4 * min(CPU_CLK_UNHALTED.THREAD, IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE) / SLOTS", - "MetricGroup": "Frontend;TopdownL2;tma_L2_group;tma_frontend_bound_group", - "MetricName": "tma_fetch_latency", - "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", + "BriefDescription": "C2 residency percent per package", + "MetricExpr": "cstate_pkg@c2\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C2_Pkg_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to instruction cache misses.", - "MetricExpr": "ICACHE.IFETCH_STALL / CLKS - tma_itlb_misses", - "MetricGroup": "BigFoot;FetchLat;IcMiss;TopdownL3;tma_fetch_latency_group", - "MetricName": "tma_icache_misses", + "BriefDescription": "C3 residency percent per core", + "MetricExpr": "cstate_core@c3\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C3_Core_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to Instruction TLB (ITLB) misses", - "MetricExpr": "(12 * ITLB_MISSES.STLB_HIT + ITLB_MISSES.WALK_DURATION) / CLKS", - "MetricGroup": "BigFoot;FetchLat;MemoryTLB;TopdownL3;tma_fetch_latency_group", - "MetricName": "tma_itlb_misses", - "PublicDescription": "This metric represents fraction of cycles the CPU was stalled due to Instruction TLB (ITLB) misses. Sample with: ITLB_MISSES.WALK_COMPLETED", + "BriefDescription": "C3 residency percent per package", + "MetricExpr": "cstate_pkg@c3\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C3_Pkg_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to Branch Resteers", - "MetricExpr": "12 * (BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY) / CLKS", - "MetricGroup": "FetchLat;TopdownL3;tma_fetch_latency_group", - "MetricName": "tma_branch_resteers", - "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", + "BriefDescription": "C6 residency percent per core", + "MetricExpr": "cstate_core@c6\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C6_Core_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to switches from DSB to MITE pipelines", - "MetricExpr": "DSB2MITE_SWITCHES.PENALTY_CYCLES / CLKS", - "MetricGroup": "DSBmiss;FetchLat;TopdownL3;tma_fetch_latency_group", - "MetricName": "tma_dsb_switches", - "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.", + "BriefDescription": "C6 residency percent per package", + "MetricExpr": "cstate_pkg@c6\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C6_Pkg_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles CPU was stalled due to Length Changing Prefixes (LCPs)", - "MetricExpr": "ILD_STALL.LCP / CLKS", - "MetricGroup": "FetchLat;TopdownL3;tma_fetch_latency_group", - "MetricName": "tma_lcp", - "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.", + "BriefDescription": "C7 residency percent per core", + "MetricExpr": "cstate_core@c7\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C7_Core_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates the fraction of cycles when the CPU was stalled due to switches of uop delivery to the Microcode Sequencer (MS)", - "MetricExpr": "3 * IDQ.MS_SWITCHES / CLKS", - "MetricGroup": "FetchLat;MicroSeq;TopdownL3;tma_fetch_latency_group", - "MetricName": "tma_ms_switches", - "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", + "BriefDescription": "C7 residency percent per package", + "MetricExpr": "cstate_pkg@c7\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C7_Pkg_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of slots the CPU was stalled due to Frontend bandwidth issues", - "MetricExpr": "tma_frontend_bound - tma_fetch_latency", - "MetricGroup": "FetchBW;Frontend;TopdownL2;tma_L2_group;tma_frontend_bound_group", - "MetricName": "tma_fetch_bandwidth", - "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.", - "ScaleUnit": "100%" + "BriefDescription": "Uncore frequency per die [GHZ]", + "MetricExpr": "tma_info_socket_clks / #num_dies / duration_time / 1e9", + "MetricGroup": "SoC", + "MetricName": "UNCORE_FREQ" }, { - "BriefDescription": "This metric represents Core fraction of cycles in which CPU was likely limited due to the MITE pipeline (the legacy decode pipeline)", - "MetricExpr": "(IDQ.ALL_MITE_CYCLES_ANY_UOPS - IDQ.ALL_MITE_CYCLES_4_UOPS) / CORE_CLKS / 2", - "MetricGroup": "DSBmiss;FetchBW;TopdownL3;tma_fetch_bandwidth_group", - "MetricName": "tma_mite", - "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.", + "BriefDescription": "Percentage of cycles spent in System Management Interrupts.", + "MetricExpr": "((msr@aperf@ - cycles) / msr@aperf@ if msr@smi@ > 0 else 0)", + "MetricGroup": "smi", + "MetricName": "smi_cycles", + "MetricThreshold": "smi_cycles > 0.1", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents Core fraction of cycles in which CPU was likely limited due to DSB (decoded uop cache) fetch pipeline", - "MetricExpr": "(IDQ.ALL_DSB_CYCLES_ANY_UOPS - IDQ.ALL_DSB_CYCLES_4_UOPS) / CORE_CLKS / 2", - "MetricGroup": "DSB;FetchBW;TopdownL3;tma_fetch_bandwidth_group", - "MetricName": "tma_dsb", - "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.", - "ScaleUnit": "100%" + "BriefDescription": "Number of SMI interrupts.", + "MetricExpr": "msr@smi@", + "MetricGroup": "smi", + "MetricName": "smi_num", + "ScaleUnit": "1SMI#" }, { - "BriefDescription": "This category represents fraction of slots wasted due to incorrect speculations", - "MetricExpr": "(UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (INT_MISC.RECOVERY_CYCLES_ANY / 2 if #SMT_on else INT_MISC.RECOVERY_CYCLES)) / SLOTS", - "MetricGroup": "TopdownL1;tma_L1_group", - "MetricName": "tma_bad_speculation", - "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.", + "BriefDescription": "This metric estimates how often memory load accesses were aliased by preceding stores (in program order) with a 4K address offset", + "MetricExpr": "LD_BLOCKS_PARTIAL.ADDRESS_ALIAS / tma_info_clks", + "MetricGroup": "TopdownL4;tma_L4_group;tma_l1_bound_group", + "MetricName": "tma_4k_aliasing", + "MetricThreshold": "tma_4k_aliasing > 0.2 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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).", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of slots the CPU has wasted due to Branch Misprediction", - "MetricExpr": "BR_MISP_RETIRED.ALL_BRANCHES / (BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT) * tma_bad_speculation", - "MetricGroup": "BadSpec;BrMispredicts;TopdownL2;tma_L2_group;tma_bad_speculation_group", - "MetricName": "tma_branch_mispredicts", - "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", + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution ports for ALU operations.", + "MetricConstraint": "NO_GROUP_EVENTS_NMI", + "MetricExpr": "(UOPS_DISPATCHED_PORT.PORT_0 + UOPS_DISPATCHED_PORT.PORT_1 + UOPS_DISPATCHED_PORT.PORT_5) / (3 * tma_info_core_clks)", + "MetricGroup": "TopdownL5;tma_L5_group;tma_ports_utilized_3m_group", + "MetricName": "tma_alu_op_utilization", + "MetricThreshold": "tma_alu_op_utilization > 0.6", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of slots the CPU has wasted due to Machine Clears", - "MetricExpr": "tma_bad_speculation - tma_branch_mispredicts", - "MetricGroup": "BadSpec;MachineClears;TopdownL2;tma_L2_group;tma_bad_speculation_group", - "MetricName": "tma_machine_clears", - "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", + "BriefDescription": "This metric estimates fraction of slots the CPU retired uops delivered by the Microcode_Sequencer as a result of Assists", + "MetricExpr": "100 * OTHER_ASSISTS.ANY_WB_ASSIST / tma_info_slots", + "MetricGroup": "TopdownL4;tma_L4_group;tma_microcode_sequencer_group", + "MetricName": "tma_assists", + "MetricThreshold": "tma_assists > 0.1 & (tma_microcode_sequencer > 0.05 & tma_heavy_operations > 0.1)", + "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", "ScaleUnit": "100%" }, { "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", + "MetricConstraint": "NO_GROUP_EVENTS_NMI", "MetricExpr": "1 - (tma_frontend_bound + tma_bad_speculation + tma_retiring)", - "MetricGroup": "TopdownL1;tma_L1_group", + "MetricGroup": "TmaL1;TopdownL1;tma_L1_group", "MetricName": "tma_backend_bound", + "MetricThreshold": "tma_backend_bound > 0.2", "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.", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of slots the Memory subsystem within the Backend was a bottleneck", - "MetricExpr": "(min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING) + RESOURCE_STALLS.SB) / (min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) + UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC - UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC if IPC > 1.8 else (UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC - RS_EVENTS.EMPTY_CYCLES if tma_fetch_latency > 0.1 else RESOURCE_STALLS.SB)) * tma_backend_bound", - "MetricGroup": "Backend;TopdownL2;tma_L2_group;tma_backend_bound_group", - "MetricName": "tma_memory_bound", - "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).", - "ScaleUnit": "100%" - }, - { - "BriefDescription": "This metric estimates how often the CPU was stalled without loads missing the L1 data cache", - "MetricExpr": "max((min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING) - CYCLE_ACTIVITY.STALLS_L1D_PENDING) / CLKS, 0)", - "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_memory_bound_group", - "MetricName": "tma_l1_bound", - "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", - "ScaleUnit": "100%" - }, - { - "BriefDescription": "This metric roughly estimates the fraction of cycles where the Data TLB (DTLB) was missed by load accesses", - "MetricExpr": "(7 * DTLB_LOAD_MISSES.STLB_HIT + DTLB_LOAD_MISSES.WALK_DURATION) / CLKS", - "MetricGroup": "MemoryTLB;TopdownL4;tma_l1_bound_group", - "MetricName": "tma_dtlb_load", - "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", - "ScaleUnit": "100%" - }, - { - "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", - "MetricExpr": "13 * LD_BLOCKS.STORE_FORWARD / CLKS", - "MetricGroup": "TopdownL4;tma_l1_bound_group", - "MetricName": "tma_store_fwd_blk", - "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.", - "ScaleUnit": "100%" - }, - { - "BriefDescription": "This metric represents fraction of cycles the CPU spent handling cache misses due to lock operations", - "MetricExpr": "MEM_UOPS_RETIRED.LOCK_LOADS / MEM_UOPS_RETIRED.ALL_STORES * min(CPU_CLK_UNHALTED.THREAD, OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO) / CLKS", - "MetricGroup": "Offcore;TopdownL4;tma_l1_bound_group", - "MetricName": "tma_lock_latency", - "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", - "ScaleUnit": "100%" - }, - { - "BriefDescription": "This metric estimates fraction of cycles handling memory load split accesses - load that cross 64-byte cache line boundary", - "MetricExpr": "13 * LD_BLOCKS.NO_SR / CLKS", - "MetricGroup": "TopdownL4;tma_l1_bound_group", - "MetricName": "tma_split_loads", - "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", - "ScaleUnit": "100%" - }, - { - "BriefDescription": "This metric estimates how often memory load accesses were aliased by preceding stores (in program order) with a 4K address offset", - "MetricExpr": "LD_BLOCKS_PARTIAL.ADDRESS_ALIAS / CLKS", - "MetricGroup": "TopdownL4;tma_l1_bound_group", - "MetricName": "tma_4k_aliasing", - "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).", + "BriefDescription": "This category represents fraction of slots wasted due to incorrect speculations", + "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_slots", + "MetricGroup": "TmaL1;TopdownL1;tma_L1_group", + "MetricName": "tma_bad_speculation", + "MetricThreshold": "tma_bad_speculation > 0.15", + "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.", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric does a *rough estimation* of how often L1D Fill Buffer unavailability limited additional L1D miss memory access requests to proceed", - "MetricExpr": "Load_Miss_Real_Latency * cpu@L1D_PEND_MISS.FB_FULL\\,cmask\\=1@ / CLKS", - "MetricGroup": "MemoryBW;TopdownL4;tma_l1_bound_group", - "MetricName": "tma_fb_full", - "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).", + "BriefDescription": "This metric represents fraction of slots the CPU has wasted due to Branch Misprediction", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "BR_MISP_RETIRED.ALL_BRANCHES / (BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT) * tma_bad_speculation", + "MetricGroup": "BadSpec;BrMispredicts;TmaL2;TopdownL2;tma_L2_group;tma_bad_speculation_group;tma_issueBM", + "MetricName": "tma_branch_mispredicts", + "MetricThreshold": "tma_branch_mispredicts > 0.1 & tma_bad_speculation > 0.15", + "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_branch_misprediction_cost, tma_mispredicts_resteers", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates how often the CPU was stalled due to L2 cache accesses by loads", - "MetricExpr": "(CYCLE_ACTIVITY.STALLS_L1D_PENDING - CYCLE_ACTIVITY.STALLS_L2_PENDING) / CLKS", - "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_memory_bound_group", - "MetricName": "tma_l2_bound", - "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", + "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to Branch Resteers", + "MetricExpr": "12 * (BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY) / tma_info_clks", + "MetricGroup": "FetchLat;TopdownL3;tma_L3_group;tma_fetch_latency_group", + "MetricName": "tma_branch_resteers", + "MetricThreshold": "tma_branch_resteers > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates how often the CPU was stalled due to loads accesses to L3 cache or contended with a sibling Core", - "MetricExpr": "MEM_LOAD_UOPS_RETIRED.LLC_HIT / (MEM_LOAD_UOPS_RETIRED.LLC_HIT + 7 * MEM_LOAD_UOPS_RETIRED.LLC_MISS) * CYCLE_ACTIVITY.STALLS_L2_PENDING / CLKS", - "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_memory_bound_group", - "MetricName": "tma_l3_bound", - "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", + "BriefDescription": "This metric estimates fraction of cycles the CPU retired uops originated from CISC (complex instruction set computer) instruction", + "MetricConstraint": "NO_GROUP_EVENTS_NMI", + "MetricExpr": "max(0, tma_microcode_sequencer - tma_assists)", + "MetricGroup": "TopdownL4;tma_L4_group;tma_microcode_sequencer_group", + "MetricName": "tma_cisc", + "MetricThreshold": "tma_cisc > 0.1 & (tma_microcode_sequencer > 0.05 & tma_heavy_operations > 0.1)", + "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.", "ScaleUnit": "100%" }, { "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling synchronizations due to contested accesses", - "MetricExpr": "(60 * (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_RETIRED.LLC_MISS))) + 43 * (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_RETIRED.LLC_MISS)))) / CLKS", - "MetricGroup": "DataSharing;Offcore;Snoop;TopdownL4;tma_l3_bound_group", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "(60 * (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_RETIRED.LLC_MISS))) + 43 * (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_RETIRED.LLC_MISS)))) / tma_info_clks", + "MetricGroup": "DataSharing;Offcore;Snoop;TopdownL4;tma_L4_group;tma_issueSyncxn;tma_l3_bound_group", "MetricName": "tma_contested_accesses", - "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", + "MetricThreshold": "tma_contested_accesses > 0.05 & (tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling synchronizations due to data-sharing accesses", - "MetricExpr": "43 * (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_RETIRED.LLC_MISS))) / CLKS", - "MetricGroup": "Offcore;Snoop;TopdownL4;tma_l3_bound_group", - "MetricName": "tma_data_sharing", - "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", + "BriefDescription": "This metric represents fraction of slots where Core non-memory issues were of a bottleneck", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "tma_backend_bound - tma_memory_bound", + "MetricGroup": "Backend;Compute;TmaL2;TopdownL2;tma_L2_group;tma_backend_bound_group", + "MetricName": "tma_core_bound", + "MetricThreshold": "tma_core_bound > 0.1 & tma_backend_bound > 0.2", + "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).", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles with demand load accesses that hit the L3 cache under unloaded scenarios (possibly L3 latency limited)", - "MetricExpr": "29 * (MEM_LOAD_UOPS_RETIRED.LLC_HIT * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_RETIRED.LLC_MISS))) / CLKS", - "MetricGroup": "MemoryLat;TopdownL4;tma_l3_bound_group", - "MetricName": "tma_l3_hit_latency", - "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", + "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling synchronizations due to data-sharing accesses", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "43 * (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_RETIRED.LLC_MISS))) / tma_info_clks", + "MetricGroup": "Offcore;Snoop;TopdownL4;tma_L4_group;tma_issueSyncxn;tma_l3_bound_group", + "MetricName": "tma_data_sharing", + "MetricThreshold": "tma_data_sharing > 0.05 & (tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", "ScaleUnit": "100%" }, { - "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)", - "MetricExpr": "(OFFCORE_REQUESTS_BUFFER.SQ_FULL / 2 if #SMT_on else OFFCORE_REQUESTS_BUFFER.SQ_FULL) / CORE_CLKS", - "MetricGroup": "MemoryBW;Offcore;TopdownL4;tma_l3_bound_group", - "MetricName": "tma_sq_full", - "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). The Super Queue is used for requests to access the L2 cache or to go out to the Uncore.", + "BriefDescription": "This metric represents fraction of cycles where the Divider unit was active", + "MetricExpr": "ARITH.FPU_DIV_ACTIVE / tma_info_core_clks", + "MetricGroup": "TopdownL3;tma_L3_group;tma_core_bound_group", + "MetricName": "tma_divider", + "MetricThreshold": "tma_divider > 0.2 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2)", + "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", "ScaleUnit": "100%" }, { "BriefDescription": "This metric estimates how often the CPU was stalled on accesses to external memory (DRAM) by loads", - "MetricExpr": "(1 - MEM_LOAD_UOPS_RETIRED.LLC_HIT / (MEM_LOAD_UOPS_RETIRED.LLC_HIT + 7 * MEM_LOAD_UOPS_RETIRED.LLC_MISS)) * CYCLE_ACTIVITY.STALLS_L2_PENDING / CLKS", - "MetricGroup": "MemoryBound;TmaL3mem;TopdownL3;tma_memory_bound_group", + "MetricConstraint": "NO_GROUP_EVENTS_SMT", + "MetricExpr": "(1 - MEM_LOAD_UOPS_RETIRED.LLC_HIT / (MEM_LOAD_UOPS_RETIRED.LLC_HIT + 7 * MEM_LOAD_UOPS_RETIRED.LLC_MISS)) * CYCLE_ACTIVITY.STALLS_L2_PENDING / tma_info_clks", + "MetricGroup": "MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_memory_bound_group", "MetricName": "tma_dram_bound", + "MetricThreshold": "tma_dram_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)", "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles where the core's performance was likely hurt due to approaching bandwidth limits of external memory (DRAM)", - "MetricExpr": "min(CPU_CLK_UNHALTED.THREAD, cpu@OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD\\,cmask\\=6@) / CLKS", - "MetricGroup": "MemoryBW;Offcore;TopdownL4;tma_dram_bound_group", - "MetricName": "tma_mem_bandwidth", - "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).", + "BriefDescription": "This metric represents Core fraction of cycles in which CPU was likely limited due to DSB (decoded uop cache) fetch pipeline", + "MetricExpr": "(IDQ.ALL_DSB_CYCLES_ANY_UOPS - IDQ.ALL_DSB_CYCLES_4_UOPS) / tma_info_core_clks / 2", + "MetricGroup": "DSB;FetchBW;TopdownL3;tma_L3_group;tma_fetch_bandwidth_group", + "MetricName": "tma_dsb", + "MetricThreshold": "tma_dsb > 0.15 & (tma_fetch_bandwidth > 0.1 & tma_frontend_bound > 0.15 & tma_info_ipc / 4 > 0.35)", + "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.", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles where the performance was likely hurt due to latency from external memory (DRAM)", - "MetricExpr": "min(CPU_CLK_UNHALTED.THREAD, OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD) / CLKS - tma_mem_bandwidth", - "MetricGroup": "MemoryLat;Offcore;TopdownL4;tma_dram_bound_group", - "MetricName": "tma_mem_latency", - "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).", + "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to switches from DSB to MITE pipelines", + "MetricExpr": "DSB2MITE_SWITCHES.PENALTY_CYCLES / tma_info_clks", + "MetricGroup": "DSBmiss;FetchLat;TopdownL3;tma_L3_group;tma_fetch_latency_group;tma_issueFB", + "MetricName": "tma_dsb_switches", + "MetricThreshold": "tma_dsb_switches > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)", + "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_dsb_coverage, tma_info_iptb, tma_lcp", "ScaleUnit": "100%" }, { - "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", - "MetricExpr": "RESOURCE_STALLS.SB / CLKS", - "MetricGroup": "MemoryBound;TmaL3mem;TopdownL3;tma_memory_bound_group", - "MetricName": "tma_store_bound", - "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", + "BriefDescription": "This metric roughly estimates the fraction of cycles where the Data TLB (DTLB) was missed by load accesses", + "MetricExpr": "(7 * DTLB_LOAD_MISSES.STLB_HIT + DTLB_LOAD_MISSES.WALK_DURATION) / tma_info_clks", + "MetricGroup": "MemoryTLB;TopdownL4;tma_L4_group;tma_issueTLB;tma_l1_bound_group", + "MetricName": "tma_dtlb_load", + "MetricThreshold": "tma_dtlb_load > 0.1 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles the CPU spent handling L1D store misses", - "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)) / CLKS", - "MetricGroup": "MemoryLat;Offcore;TopdownL4;tma_store_bound_group", - "MetricName": "tma_store_latency", - "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)", + "BriefDescription": "This metric roughly estimates the fraction of cycles spent handling first-level data TLB store misses", + "MetricExpr": "(7 * DTLB_STORE_MISSES.STLB_HIT + DTLB_STORE_MISSES.WALK_DURATION) / tma_info_clks", + "MetricGroup": "MemoryTLB;TopdownL4;tma_L4_group;tma_issueTLB;tma_store_bound_group", + "MetricName": "tma_dtlb_store", + "MetricThreshold": "tma_dtlb_store > 0.05 & (tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", "ScaleUnit": "100%" }, { "BriefDescription": "This metric roughly estimates how often CPU was handling synchronizations due to False Sharing", - "MetricExpr": "60 * OFFCORE_RESPONSE.DEMAND_RFO.LLC_HIT.HITM_OTHER_CORE / CLKS", - "MetricGroup": "DataSharing;Offcore;Snoop;TopdownL4;tma_store_bound_group", + "MetricExpr": "60 * OFFCORE_RESPONSE.DEMAND_RFO.LLC_HIT.HITM_OTHER_CORE / tma_info_clks", + "MetricGroup": "DataSharing;Offcore;Snoop;TopdownL4;tma_L4_group;tma_issueSyncxn;tma_store_bound_group", "MetricName": "tma_false_sharing", - "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", + "MetricThreshold": "tma_false_sharing > 0.05 & (tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents rate of split store accesses", - "MetricExpr": "2 * MEM_UOPS_RETIRED.SPLIT_STORES / CORE_CLKS", - "MetricGroup": "TopdownL4;tma_store_bound_group", - "MetricName": "tma_split_stores", - "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", + "BriefDescription": "This metric does a *rough estimation* of how often L1D Fill Buffer unavailability limited additional L1D miss memory access requests to proceed", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "tma_info_load_miss_real_latency * cpu@L1D_PEND_MISS.FB_FULL\\,cmask\\=1@ / tma_info_clks", + "MetricGroup": "MemoryBW;TopdownL4;tma_L4_group;tma_issueBW;tma_issueSL;tma_issueSmSt;tma_l1_bound_group", + "MetricName": "tma_fb_full", + "MetricThreshold": "tma_fb_full > 0.3", + "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_dram_bw_use, tma_mem_bandwidth, tma_sq_full, tma_store_latency, tma_streaming_stores", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric roughly estimates the fraction of cycles spent handling first-level data TLB store misses", - "MetricExpr": "(7 * DTLB_STORE_MISSES.STLB_HIT + DTLB_STORE_MISSES.WALK_DURATION) / CLKS", - "MetricGroup": "MemoryTLB;TopdownL4;tma_store_bound_group", - "MetricName": "tma_dtlb_store", - "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", + "BriefDescription": "This metric represents fraction of slots the CPU was stalled due to Frontend bandwidth issues", + "MetricExpr": "tma_frontend_bound - tma_fetch_latency", + "MetricGroup": "FetchBW;Frontend;TmaL2;TopdownL2;tma_L2_group;tma_frontend_bound_group;tma_issueFB", + "MetricName": "tma_fetch_bandwidth", + "MetricThreshold": "tma_fetch_bandwidth > 0.1 & tma_frontend_bound > 0.15 & tma_info_ipc / 4 > 0.35", + "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_dsb_coverage, tma_info_iptb, tma_lcp", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of slots where Core non-memory issues were of a bottleneck", - "MetricExpr": "tma_backend_bound - tma_memory_bound", - "MetricGroup": "Backend;Compute;TopdownL2;tma_L2_group;tma_backend_bound_group", - "MetricName": "tma_core_bound", - "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).", + "BriefDescription": "This metric represents fraction of slots the CPU was stalled due to Frontend latency issues", + "MetricExpr": "4 * min(CPU_CLK_UNHALTED.THREAD, IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE) / tma_info_slots", + "MetricGroup": "Frontend;TmaL2;TopdownL2;tma_L2_group;tma_frontend_bound_group", + "MetricName": "tma_fetch_latency", + "MetricThreshold": "tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles where the Divider unit was active", - "MetricExpr": "ARITH.FPU_DIV_ACTIVE / CORE_CLKS", - "MetricGroup": "TopdownL3;tma_core_bound_group", - "MetricName": "tma_divider", - "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", + "BriefDescription": "This metric represents overall arithmetic floating-point (FP) operations fraction the CPU has executed (retired)", + "MetricExpr": "tma_x87_use + tma_fp_scalar + tma_fp_vector", + "MetricGroup": "HPC;TopdownL3;tma_L3_group;tma_light_operations_group", + "MetricName": "tma_fp_arith", + "MetricThreshold": "tma_fp_arith > 0.2 & tma_light_operations > 0.6", + "PublicDescription": "This metric represents overall arithmetic floating-point (FP) operations fraction the CPU has executed (retired). Note this metric's value may exceed its parent due to use of \"Uops\" CountDomain and FMA double-counting.", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles the CPU performance was potentially limited due to Core computation issues (non divider-related)", - "MetricExpr": "((min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) + UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC - UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC if IPC > 1.8 else (UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC - RS_EVENTS.EMPTY_CYCLES if tma_fetch_latency > 0.1 else RESOURCE_STALLS.SB)) - RESOURCE_STALLS.SB - min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING)) / CLKS", - "MetricGroup": "PortsUtil;TopdownL3;tma_core_bound_group", - "MetricName": "tma_ports_utilization", - "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.", + "BriefDescription": "This metric approximates arithmetic floating-point (FP) scalar uops fraction the CPU has retired", + "MetricExpr": "(FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE) / UOPS_EXECUTED.THREAD", + "MetricGroup": "Compute;Flops;TopdownL4;tma_L4_group;tma_fp_arith_group;tma_issue2P", + "MetricName": "tma_fp_scalar", + "MetricThreshold": "tma_fp_scalar > 0.1 & (tma_fp_arith > 0.2 & tma_light_operations > 0.6)", + "PublicDescription": "This metric approximates arithmetic floating-point (FP) scalar uops fraction the CPU has retired. May overcount due to FMA double counting. Related metrics: tma_fp_vector, tma_fp_vector_512b, tma_port_0, tma_port_1, tma_port_5, tma_port_6, tma_ports_utilized_2", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles CPU executed no uops on any execution port (Logical Processor cycles since ICL, Physical Core cycles otherwise)", - "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) / CORE_CLKS)", - "MetricGroup": "PortsUtil;TopdownL4;tma_ports_utilization_group", - "MetricName": "tma_ports_utilized_0", - "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.", + "BriefDescription": "This metric approximates arithmetic floating-point (FP) vector uops fraction the CPU has retired aggregated across all vector widths", + "MetricExpr": "(FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE) / UOPS_EXECUTED.THREAD", + "MetricGroup": "Compute;Flops;TopdownL4;tma_L4_group;tma_fp_arith_group;tma_issue2P", + "MetricName": "tma_fp_vector", + "MetricThreshold": "tma_fp_vector > 0.1 & (tma_fp_arith > 0.2 & tma_light_operations > 0.6)", + "PublicDescription": "This metric approximates arithmetic floating-point (FP) vector uops fraction the CPU has retired aggregated across all vector widths. May overcount due to FMA double counting. Related metrics: tma_fp_scalar, tma_fp_vector_512b, tma_port_0, tma_port_1, tma_port_5, tma_port_6, tma_ports_utilized_2", "ScaleUnit": "100%" }, { - "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)", - "MetricExpr": "((cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ - cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@) / 2 if #SMT_on else (UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC - UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC) / CORE_CLKS)", - "MetricGroup": "PortsUtil;TopdownL4;tma_ports_utilization_group", - "MetricName": "tma_ports_utilized_1", - "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.", + "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend", + "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / tma_info_slots", + "MetricGroup": "PGO;TmaL1;TopdownL1;tma_L1_group", + "MetricName": "tma_frontend_bound", + "MetricThreshold": "tma_frontend_bound > 0.15", + "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.", "ScaleUnit": "100%" }, { - "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)", - "MetricExpr": "((cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@ - cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@) / 2 if #SMT_on else (UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC - UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC) / CORE_CLKS)", - "MetricGroup": "PortsUtil;TopdownL4;tma_ports_utilization_group", - "MetricName": "tma_ports_utilized_2", - "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.", + "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", + "MetricExpr": "tma_microcode_sequencer", + "MetricGroup": "Retire;TmaL2;TopdownL2;tma_L2_group;tma_retiring_group", + "MetricName": "tma_heavy_operations", + "MetricThreshold": "tma_heavy_operations > 0.1", + "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.", "ScaleUnit": "100%" }, { - "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).", - "MetricExpr": "(cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@ / 2 if #SMT_on else UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC) / CORE_CLKS", - "MetricGroup": "PortsUtil;TopdownL4;tma_ports_utilization_group", - "MetricName": "tma_ports_utilized_3m", + "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to instruction cache misses.", + "MetricExpr": "ICACHE.IFETCH_STALL / tma_info_clks - tma_itlb_misses", + "MetricGroup": "BigFoot;FetchLat;IcMiss;TopdownL3;tma_L3_group;tma_fetch_latency_group", + "MetricName": "tma_icache_misses", + "MetricThreshold": "tma_icache_misses > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution ports for ALU operations.", - "MetricExpr": "(UOPS_DISPATCHED_PORT.PORT_0 + UOPS_DISPATCHED_PORT.PORT_1 + UOPS_DISPATCHED_PORT.PORT_5) / (3 * CORE_CLKS)", - "MetricGroup": "TopdownL5;tma_ports_utilized_3m_group", - "MetricName": "tma_alu_op_utilization", - "ScaleUnit": "100%" + "BriefDescription": "Measured Average Frequency for unhalted processors [GHz]", + "MetricExpr": "tma_info_turbo_utilization * TSC / 1e9 / duration_time", + "MetricGroup": "Power;Summary", + "MetricName": "tma_info_average_frequency" }, { - "BriefDescription": "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", - "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_0 / CORE_CLKS", - "MetricGroup": "Compute;TopdownL6;tma_alu_op_utilization_group", - "MetricName": "tma_port_0", - "ScaleUnit": "100%" + "BriefDescription": "Branch instructions per taken branch.", + "MetricExpr": "BR_INST_RETIRED.ALL_BRANCHES / BR_INST_RETIRED.NEAR_TAKEN", + "MetricGroup": "Branches;Fed;PGO", + "MetricName": "tma_info_bptkbranch" }, { - "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 1 (ALU) Sample with: UOPS_DISPATCHED_PORT.PORT_1", - "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_1 / CORE_CLKS", - "MetricGroup": "TopdownL6;tma_alu_op_utilization_group", - "MetricName": "tma_port_1", - "ScaleUnit": "100%" + "BriefDescription": "Per-Logical Processor actual clocks when the Logical Processor is active.", + "MetricExpr": "CPU_CLK_UNHALTED.THREAD", + "MetricGroup": "Pipeline", + "MetricName": "tma_info_clks" }, { - "BriefDescription": "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", - "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_5 / CORE_CLKS", - "MetricGroup": "TopdownL6;tma_alu_op_utilization_group", - "MetricName": "tma_port_5", - "ScaleUnit": "100%" + "BriefDescription": "Core actual clocks when any Logical Processor is active on the Physical Core", + "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_clks))", + "MetricGroup": "SMT", + "MetricName": "tma_info_core_clks" }, { - "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Load operations Sample with: UOPS_DISPATCHED.PORT_2_3", - "MetricExpr": "(UOPS_DISPATCHED_PORT.PORT_2 + UOPS_DISPATCHED_PORT.PORT_3 - UOPS_DISPATCHED_PORT.PORT_4) / (2 * CORE_CLKS)", - "MetricGroup": "TopdownL5;tma_ports_utilized_3m_group", - "MetricName": "tma_load_op_utilization", - "ScaleUnit": "100%" + "BriefDescription": "Instructions Per Cycle across hyper-threads (per physical core)", + "MetricExpr": "INST_RETIRED.ANY / tma_info_core_clks", + "MetricGroup": "Ret;SMT;TmaL1;tma_L1_group", + "MetricName": "tma_info_coreipc" }, { - "BriefDescription": "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", - "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_2 / CORE_CLKS", - "MetricGroup": "TopdownL6;tma_load_op_utilization_group", - "MetricName": "tma_port_2", - "ScaleUnit": "100%" + "BriefDescription": "Cycles Per Instruction (per Logical Processor)", + "MetricExpr": "1 / tma_info_ipc", + "MetricGroup": "Mem;Pipeline", + "MetricName": "tma_info_cpi" }, { - "BriefDescription": "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", - "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_3 / CORE_CLKS", - "MetricGroup": "TopdownL6;tma_load_op_utilization_group", - "MetricName": "tma_port_3", - "ScaleUnit": "100%" + "BriefDescription": "Average CPU Utilization", + "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / TSC", + "MetricGroup": "HPC;Summary", + "MetricName": "tma_info_cpu_utilization" }, { - "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Store operations", - "MetricExpr": "tma_port_4", - "MetricGroup": "TopdownL5;tma_ports_utilized_3m_group", - "MetricName": "tma_store_op_utilization", - "ScaleUnit": "100%" + "BriefDescription": "Average Parallel L2 cache miss data reads", + "MetricExpr": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD / OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD", + "MetricGroup": "Memory_BW;Offcore", + "MetricName": "tma_info_data_l2_mlp" }, { - "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 4 (Store-data) Sample with: UOPS_DISPATCHED_PORT.PORT_4", - "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_4 / CORE_CLKS", - "MetricGroup": "TopdownL6;tma_store_op_utilization_group", - "MetricName": "tma_port_4", - "ScaleUnit": "100%" + "BriefDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]", + "MetricExpr": "64 * (UNC_ARB_TRK_REQUESTS.ALL + UNC_ARB_COH_TRK_REQUESTS.ALL) / 1e6 / duration_time / 1e3", + "MetricGroup": "HPC;Mem;MemoryBW;SoC;tma_issueBW", + "MetricName": "tma_info_dram_bw_use", + "PublicDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]. Related metrics: tma_fb_full, tma_mem_bandwidth, tma_sq_full" }, { - "BriefDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired", - "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / SLOTS", - "MetricGroup": "TopdownL1;tma_L1_group", - "MetricName": "tma_retiring", - "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", - "ScaleUnit": "100%" - }, - { - "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)", - "MetricExpr": "tma_retiring - tma_heavy_operations", - "MetricGroup": "Retire;TopdownL2;tma_L2_group;tma_retiring_group", - "MetricName": "tma_light_operations", - "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 UPI 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", - "ScaleUnit": "100%" + "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache)", + "MetricExpr": "IDQ.DSB_UOPS / (IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS)", + "MetricGroup": "DSB;Fed;FetchBW;tma_issueFB", + "MetricName": "tma_info_dsb_coverage", + "MetricThreshold": "tma_info_dsb_coverage < 0.7 & tma_info_ipc / 4 > 0.35", + "PublicDescription": "Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache). Related metrics: tma_dsb_switches, tma_fetch_bandwidth, tma_info_iptb, tma_lcp" }, { - "BriefDescription": "This metric represents overall arithmetic floating-point (FP) operations fraction the CPU has executed (retired)", - "MetricExpr": "tma_x87_use + tma_fp_scalar + tma_fp_vector", - "MetricGroup": "HPC;TopdownL3;tma_light_operations_group", - "MetricName": "tma_fp_arith", - "PublicDescription": "This metric represents overall arithmetic floating-point (FP) operations fraction the CPU has executed (retired). Note this metric's value may exceed its parent due to use of \"Uops\" CountDomain and FMA double-counting.", - "ScaleUnit": "100%" + "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is execution) per-thread", + "MetricExpr": "UOPS_EXECUTED.THREAD / cpu@UOPS_EXECUTED.THREAD\\,cmask\\=1@", + "MetricGroup": "Cor;Pipeline;PortsUtil;SMT", + "MetricName": "tma_info_execute" }, { - "BriefDescription": "This metric serves as an approximation of legacy x87 usage", - "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS * FP_COMP_OPS_EXE.X87 / UOPS_EXECUTED.THREAD", - "MetricGroup": "Compute;TopdownL4;tma_fp_arith_group", - "MetricName": "tma_x87_use", - "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.", - "ScaleUnit": "100%" + "BriefDescription": "The ratio of Executed- by Issued-Uops", + "MetricExpr": "UOPS_EXECUTED.THREAD / UOPS_ISSUED.ANY", + "MetricGroup": "Cor;Pipeline", + "MetricName": "tma_info_execute_per_issue", + "PublicDescription": "The ratio of Executed- by Issued-Uops. Ratio > 1 suggests high rate of uop micro-fusions. Ratio < 1 suggest high rate of \"execute\" at rename stage." }, { - "BriefDescription": "This metric approximates arithmetic floating-point (FP) scalar uops fraction the CPU has retired", - "MetricExpr": "(FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE) / UOPS_EXECUTED.THREAD", - "MetricGroup": "Compute;Flops;TopdownL4;tma_fp_arith_group", - "MetricName": "tma_fp_scalar", - "PublicDescription": "This metric approximates arithmetic floating-point (FP) scalar uops fraction the CPU has retired. May overcount due to FMA double counting.", - "ScaleUnit": "100%" + "BriefDescription": "Floating Point Operations Per Cycle", + "MetricExpr": "(FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE + 2 * FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + 4 * (FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE) + 8 * SIMD_FP_256.PACKED_SINGLE) / tma_info_core_clks", + "MetricGroup": "Flops;Ret", + "MetricName": "tma_info_flopc" }, { - "BriefDescription": "This metric approximates arithmetic floating-point (FP) vector uops fraction the CPU has retired aggregated across all vector widths", - "MetricExpr": "(FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE) / UOPS_EXECUTED.THREAD", - "MetricGroup": "Compute;Flops;TopdownL4;tma_fp_arith_group", - "MetricName": "tma_fp_vector", - "PublicDescription": "This metric approximates arithmetic floating-point (FP) vector uops fraction the CPU has retired aggregated across all vector widths. May overcount due to FMA double counting.", - "ScaleUnit": "100%" + "BriefDescription": "Giga Floating Point Operations Per Second", + "MetricExpr": "(FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE + 2 * FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + 4 * (FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE) + 8 * SIMD_FP_256.PACKED_SINGLE) / 1e9 / duration_time", + "MetricGroup": "Cor;Flops;HPC", + "MetricName": "tma_info_gflops", + "PublicDescription": "Giga Floating Point Operations Per Second. Aggregate across all supported options of: FP precisions, scalar and vector instructions, vector-width and AMX engine." }, { - "BriefDescription": "This metric represents fraction of slots where the CPU was retiring heavy-weight operations -- instructions that require two or more uops or microcoded sequences", - "MetricExpr": "tma_microcode_sequencer", - "MetricGroup": "Retire;TopdownL2;tma_L2_group;tma_retiring_group", - "MetricName": "tma_heavy_operations", - "PublicDescription": "This metric represents fraction of slots where the CPU was retiring heavy-weight operations -- instructions that require two or more uops or microcoded sequences. This highly-correlates with the uop length of these instructions/sequences.", - "ScaleUnit": "100%" + "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is execution) per-core", + "MetricExpr": "UOPS_EXECUTED.THREAD / (cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2 if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)", + "MetricGroup": "Backend;Cor;Pipeline;PortsUtil", + "MetricName": "tma_info_ilp" }, { - "BriefDescription": "This metric represents fraction of slots the CPU was retiring uops fetched by the Microcode Sequencer (MS) unit", - "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / UOPS_ISSUED.ANY * IDQ.MS_UOPS / SLOTS", - "MetricGroup": "MicroSeq;TopdownL3;tma_heavy_operations_group", - "MetricName": "tma_microcode_sequencer", - "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", - "ScaleUnit": "100%" + "BriefDescription": "Total number of retired Instructions", + "MetricExpr": "INST_RETIRED.ANY", + "MetricGroup": "Summary;TmaL1;tma_L1_group", + "MetricName": "tma_info_instructions", + "PublicDescription": "Total number of retired Instructions. Sample with: INST_RETIRED.PREC_DIST" }, { - "BriefDescription": "This metric estimates fraction of slots the CPU retired uops delivered by the Microcode_Sequencer as a result of Assists", - "MetricExpr": "100 * OTHER_ASSISTS.ANY_WB_ASSIST / SLOTS", - "MetricGroup": "TopdownL4;tma_microcode_sequencer_group", - "MetricName": "tma_assists", - "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", - "ScaleUnit": "100%" + "BriefDescription": "Instructions per FP Arithmetic instruction (lower number means higher occurrence rate)", + "MetricExpr": "1 / (tma_fp_scalar + tma_fp_vector)", + "MetricGroup": "Flops;InsType", + "MetricName": "tma_info_iparith", + "MetricThreshold": "tma_info_iparith < 10", + "PublicDescription": "Instructions per FP Arithmetic instruction (lower number means higher occurrence rate). May undercount due to FMA double counting. Approximated prior to BDW." }, { - "BriefDescription": "This metric estimates fraction of cycles the CPU retired uops originated from CISC (complex instruction set computer) instruction", - "MetricExpr": "max(0, tma_microcode_sequencer - tma_assists)", - "MetricGroup": "TopdownL4;tma_microcode_sequencer_group", - "MetricName": "tma_cisc", - "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.", - "ScaleUnit": "100%" + "BriefDescription": "Instructions per Branch (lower number means higher occurrence rate)", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.ALL_BRANCHES", + "MetricGroup": "Branches;Fed;InsType", + "MetricName": "tma_info_ipbranch", + "MetricThreshold": "tma_info_ipbranch < 8" }, { "BriefDescription": "Instructions Per Cycle (per Logical Processor)", - "MetricExpr": "INST_RETIRED.ANY / CLKS", + "MetricExpr": "INST_RETIRED.ANY / tma_info_clks", "MetricGroup": "Ret;Summary", - "MetricName": "IPC" + "MetricName": "tma_info_ipc" }, { - "BriefDescription": "Uops Per Instruction", - "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY", - "MetricGroup": "Pipeline;Ret;Retire", - "MetricName": "UPI" + "BriefDescription": "Instructions per (near) call (lower number means higher occurrence rate)", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_CALL", + "MetricGroup": "Branches;Fed;PGO", + "MetricName": "tma_info_ipcall", + "MetricThreshold": "tma_info_ipcall < 200" }, { - "BriefDescription": "Instruction per taken branch", - "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / BR_INST_RETIRED.NEAR_TAKEN", - "MetricGroup": "Branches;Fed;FetchBW", - "MetricName": "UpTB" + "BriefDescription": "Instructions per Far Branch ( Far Branches apply upon transition from application to operating system, handling interrupts, exceptions) [lower number means higher occurrence rate]", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.FAR_BRANCH:u", + "MetricGroup": "Branches;OS", + "MetricName": "tma_info_ipfarbranch", + "MetricThreshold": "tma_info_ipfarbranch < 1e6" }, { - "BriefDescription": "Cycles Per Instruction (per Logical Processor)", - "MetricExpr": "1 / IPC", - "MetricGroup": "Mem;Pipeline", - "MetricName": "CPI" + "BriefDescription": "Instructions per Load (lower number means higher occurrence rate)", + "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_LOADS", + "MetricGroup": "InsType", + "MetricName": "tma_info_ipload", + "MetricThreshold": "tma_info_ipload < 3" }, { - "BriefDescription": "Per-Logical Processor actual clocks when the Logical Processor is active.", - "MetricExpr": "CPU_CLK_UNHALTED.THREAD", - "MetricGroup": "Pipeline", - "MetricName": "CLKS" + "BriefDescription": "Instructions per retired mispredicts for indirect CALL or JMP branches (lower number means higher occurrence rate).", + "MetricExpr": "tma_info_instructions / (UOPS_RETIRED.RETIRE_SLOTS / UOPS_ISSUED.ANY * cpu@BR_MISP_EXEC.ALL_BRANCHES\\,umask\\=0xE4@)", + "MetricGroup": "Bad;BrMispredicts", + "MetricName": "tma_info_ipmisp_indirect", + "MetricThreshold": "tma_info_ipmisp_indirect < 1e3" }, { - "BriefDescription": "Total issue-pipeline slots (per-Physical Core till ICL; per-Logical Processor ICL onward)", - "MetricExpr": "4 * CORE_CLKS", - "MetricGroup": "tma_L1_group", - "MetricName": "SLOTS" + "BriefDescription": "Number of Instructions per non-speculative Branch Misprediction (JEClear) (lower number means higher occurrence rate)", + "MetricExpr": "INST_RETIRED.ANY / BR_MISP_RETIRED.ALL_BRANCHES", + "MetricGroup": "Bad;BadSpec;BrMispredicts", + "MetricName": "tma_info_ipmispredict", + "MetricThreshold": "tma_info_ipmispredict < 200" }, { - "BriefDescription": "The ratio of Executed- by Issued-Uops", - "MetricExpr": "UOPS_EXECUTED.THREAD / UOPS_ISSUED.ANY", - "MetricGroup": "Cor;Pipeline", - "MetricName": "Execute_per_Issue", - "PublicDescription": "The ratio of Executed- by Issued-Uops. Ratio > 1 suggests high rate of uop micro-fusions. Ratio < 1 suggest high rate of \"execute\" at rename stage." + "BriefDescription": "Instructions per Store (lower number means higher occurrence rate)", + "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_STORES", + "MetricGroup": "InsType", + "MetricName": "tma_info_ipstore", + "MetricThreshold": "tma_info_ipstore < 8" }, { - "BriefDescription": "Instructions Per Cycle across hyper-threads (per physical core)", - "MetricExpr": "INST_RETIRED.ANY / CORE_CLKS", - "MetricGroup": "Ret;SMT;tma_L1_group", - "MetricName": "CoreIPC" + "BriefDescription": "Instruction per taken branch", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_TAKEN", + "MetricGroup": "Branches;Fed;FetchBW;Frontend;PGO;tma_issueFB", + "MetricName": "tma_info_iptb", + "MetricThreshold": "tma_info_iptb < 9", + "PublicDescription": "Instruction per taken branch. Related metrics: tma_dsb_switches, tma_fetch_bandwidth, tma_info_dsb_coverage, tma_lcp" }, { - "BriefDescription": "Floating Point Operations Per Cycle", - "MetricExpr": "(FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE + 2 * FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + 4 * (FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE) + 8 * SIMD_FP_256.PACKED_SINGLE) / CORE_CLKS", - "MetricGroup": "Flops;Ret", - "MetricName": "FLOPc" + "BriefDescription": "Instructions per speculative Unknown Branch Misprediction (BAClear) (lower number means higher occurrence rate)", + "MetricExpr": "tma_info_instructions / BACLEARS.ANY", + "MetricGroup": "Fed", + "MetricName": "tma_info_ipunknown_branch" }, { - "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is execution) per-core", - "MetricExpr": "UOPS_EXECUTED.THREAD / (cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2 if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)", - "MetricGroup": "Backend;Cor;Pipeline;PortsUtil", - "MetricName": "ILP" + "BriefDescription": "Cycles Per Instruction for the Operating System (OS) Kernel mode", + "MetricExpr": "CPU_CLK_UNHALTED.THREAD_P:k / INST_RETIRED.ANY_P:k", + "MetricGroup": "OS", + "MetricName": "tma_info_kernel_cpi" }, { - "BriefDescription": "Core actual clocks when any Logical Processor is active on the Physical Core", - "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 CLKS))", - "MetricGroup": "SMT", - "MetricName": "CORE_CLKS" + "BriefDescription": "Fraction of cycles spent in the Operating System (OS) Kernel mode", + "MetricExpr": "CPU_CLK_UNHALTED.THREAD_P:k / CPU_CLK_UNHALTED.THREAD", + "MetricGroup": "OS", + "MetricName": "tma_info_kernel_utilization", + "MetricThreshold": "tma_info_kernel_utilization > 0.05" }, { - "BriefDescription": "Instructions per Load (lower number means higher occurrence rate)", - "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_LOADS", - "MetricGroup": "InsType", - "MetricName": "IpLoad" + "BriefDescription": "Average per-core data fill bandwidth to the L1 data cache [GB / sec]", + "MetricExpr": "64 * L1D.REPLACEMENT / 1e9 / duration_time", + "MetricGroup": "Mem;MemoryBW", + "MetricName": "tma_info_l1d_cache_fill_bw" }, { - "BriefDescription": "Instructions per Store (lower number means higher occurrence rate)", - "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_STORES", - "MetricGroup": "InsType", - "MetricName": "IpStore" + "BriefDescription": "Average per-thread data fill bandwidth to the L1 data cache [GB / sec]", + "MetricExpr": "tma_info_l1d_cache_fill_bw", + "MetricGroup": "Mem;MemoryBW", + "MetricName": "tma_info_l1d_cache_fill_bw_1t" }, { - "BriefDescription": "Instructions per Branch (lower number means higher occurrence rate)", - "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.ALL_BRANCHES", - "MetricGroup": "Branches;Fed;InsType", - "MetricName": "IpBranch" + "BriefDescription": "L1 cache true misses per kilo instruction for retired demand loads", + "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.L1_MISS / INST_RETIRED.ANY", + "MetricGroup": "CacheMisses;Mem", + "MetricName": "tma_info_l1mpki" }, { - "BriefDescription": "Instructions per (near) call (lower number means higher occurrence rate)", - "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_CALL", - "MetricGroup": "Branches;Fed;PGO", - "MetricName": "IpCall" + "BriefDescription": "Average per-core data fill bandwidth to the L2 cache [GB / sec]", + "MetricExpr": "64 * L2_LINES_IN.ALL / 1e9 / duration_time", + "MetricGroup": "Mem;MemoryBW", + "MetricName": "tma_info_l2_cache_fill_bw" }, { - "BriefDescription": "Instruction per taken branch", - "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_TAKEN", - "MetricGroup": "Branches;Fed;FetchBW;Frontend;PGO", - "MetricName": "IpTB" + "BriefDescription": "Average per-thread data fill bandwidth to the L2 cache [GB / sec]", + "MetricExpr": "tma_info_l2_cache_fill_bw", + "MetricGroup": "Mem;MemoryBW", + "MetricName": "tma_info_l2_cache_fill_bw_1t" }, { - "BriefDescription": "Branch instructions per taken branch. ", - "MetricExpr": "BR_INST_RETIRED.ALL_BRANCHES / BR_INST_RETIRED.NEAR_TAKEN", - "MetricGroup": "Branches;Fed;PGO", - "MetricName": "BpTkBranch" + "BriefDescription": "L2 cache true misses per kilo instruction for retired demand loads", + "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.L2_MISS / INST_RETIRED.ANY", + "MetricGroup": "Backend;CacheMisses;Mem", + "MetricName": "tma_info_l2mpki" }, { - "BriefDescription": "Instructions per FP Arithmetic instruction (lower number means higher occurrence rate)", - "MetricExpr": "1 / (tma_fp_scalar + tma_fp_vector)", - "MetricGroup": "Flops;InsType", - "MetricName": "IpArith", - "PublicDescription": "Instructions per FP Arithmetic instruction (lower number means higher occurrence rate). May undercount due to FMA double counting. Approximated prior to BDW." + "BriefDescription": "Average per-thread data access bandwidth to the L3 cache [GB / sec]", + "MetricExpr": "0", + "MetricGroup": "Mem;MemoryBW;Offcore", + "MetricName": "tma_info_l3_cache_access_bw_1t" }, { - "BriefDescription": "Total number of retired Instructions Sample with: INST_RETIRED.PREC_DIST", - "MetricExpr": "INST_RETIRED.ANY", - "MetricGroup": "Summary;tma_L1_group", - "MetricName": "Instructions" + "BriefDescription": "Average per-core data fill bandwidth to the L3 cache [GB / sec]", + "MetricExpr": "64 * LONGEST_LAT_CACHE.MISS / 1e9 / duration_time", + "MetricGroup": "Mem;MemoryBW", + "MetricName": "tma_info_l3_cache_fill_bw" }, { - "BriefDescription": "Average number of Uops retired in cycles where at least one uop has retired.", - "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / cpu@UOPS_RETIRED.RETIRE_SLOTS\\,cmask\\=1@", - "MetricGroup": "Pipeline;Ret", - "MetricName": "Retire" + "BriefDescription": "Average per-thread data fill bandwidth to the L3 cache [GB / sec]", + "MetricExpr": "tma_info_l3_cache_fill_bw", + "MetricGroup": "Mem;MemoryBW", + "MetricName": "tma_info_l3_cache_fill_bw_1t" }, { - "BriefDescription": "", - "MetricExpr": "UOPS_EXECUTED.THREAD / cpu@UOPS_EXECUTED.THREAD\\,cmask\\=1@", - "MetricGroup": "Cor;Pipeline;PortsUtil;SMT", - "MetricName": "Execute" + "BriefDescription": "L3 cache true misses per kilo instruction for retired demand loads", + "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.LLC_MISS / INST_RETIRED.ANY", + "MetricGroup": "CacheMisses;Mem", + "MetricName": "tma_info_l3mpki" }, { - "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache)", - "MetricExpr": "IDQ.DSB_UOPS / (IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS)", - "MetricGroup": "DSB;Fed;FetchBW", - "MetricName": "DSB_Coverage" + "BriefDescription": "Average Latency for L2 cache miss demand Loads", + "MetricExpr": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD / OFFCORE_REQUESTS.DEMAND_DATA_RD", + "MetricGroup": "Memory_Lat;Offcore", + "MetricName": "tma_info_load_l2_miss_latency" }, { - "BriefDescription": "Number of Instructions per non-speculative Branch Misprediction (JEClear) (lower number means higher occurrence rate)", - "MetricExpr": "INST_RETIRED.ANY / BR_MISP_RETIRED.ALL_BRANCHES", - "MetricGroup": "Bad;BadSpec;BrMispredicts", - "MetricName": "IpMispredict" + "BriefDescription": "Average Parallel L2 cache miss demand Loads", + "MetricExpr": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD / OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD", + "MetricGroup": "Memory_BW;Offcore", + "MetricName": "tma_info_load_l2_mlp" }, { "BriefDescription": "Actual Average Latency for L1 data-cache miss demand load operations (in core cycles)", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "L1D_PEND_MISS.PENDING / (MEM_LOAD_UOPS_RETIRED.L1_MISS + MEM_LOAD_UOPS_RETIRED.HIT_LFB)", "MetricGroup": "Mem;MemoryBound;MemoryLat", - "MetricName": "Load_Miss_Real_Latency" + "MetricName": "tma_info_load_miss_real_latency" + }, + { + "BriefDescription": "Average number of parallel requests to external memory", + "MetricExpr": "UNC_ARB_TRK_OCCUPANCY.ALL / UNC_ARB_TRK_OCCUPANCY.CYCLES_WITH_ANY_REQUEST", + "MetricGroup": "Mem;SoC", + "MetricName": "tma_info_mem_parallel_requests", + "PublicDescription": "Average number of parallel requests to external memory. Accounts for all requests" }, { - "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss. Per-Logical Processor)", + "BriefDescription": "Average latency of all requests to external memory (in Uncore cycles)", + "MetricExpr": "UNC_ARB_TRK_OCCUPANCY.ALL / UNC_ARB_TRK_REQUESTS.ALL", + "MetricGroup": "Mem;SoC", + "MetricName": "tma_info_mem_request_latency" + }, + { + "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricExpr": "L1D_PEND_MISS.PENDING / L1D_PEND_MISS.PENDING_CYCLES", "MetricGroup": "Mem;MemoryBW;MemoryBound", - "MetricName": "MLP" + "MetricName": "tma_info_mlp", + "PublicDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss. Per-Logical Processor)" }, { - "BriefDescription": "L1 cache true misses per kilo instruction for retired demand loads", - "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.L1_MISS / INST_RETIRED.ANY", - "MetricGroup": "CacheMisses;Mem", - "MetricName": "L1MPKI" + "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses", + "MetricExpr": "(ITLB_MISSES.WALK_DURATION + DTLB_LOAD_MISSES.WALK_DURATION + DTLB_STORE_MISSES.WALK_DURATION) / tma_info_core_clks", + "MetricGroup": "Mem;MemoryTLB", + "MetricName": "tma_info_page_walks_utilization", + "MetricThreshold": "tma_info_page_walks_utilization > 0.5" }, { - "BriefDescription": "L2 cache true misses per kilo instruction for retired demand loads", - "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.L2_MISS / INST_RETIRED.ANY", - "MetricGroup": "Backend;CacheMisses;Mem", - "MetricName": "L2MPKI" + "BriefDescription": "Average number of Uops retired in cycles where at least one uop has retired.", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / cpu@UOPS_RETIRED.RETIRE_SLOTS\\,cmask\\=1@", + "MetricGroup": "Pipeline;Ret", + "MetricName": "tma_info_retire" }, { - "BriefDescription": "L3 cache true misses per kilo instruction for retired demand loads", - "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.LLC_MISS / INST_RETIRED.ANY", - "MetricGroup": "CacheMisses;Mem", - "MetricName": "L3MPKI" + "BriefDescription": "Total issue-pipeline slots (per-Physical Core till ICL; per-Logical Processor ICL onward)", + "MetricExpr": "4 * tma_info_core_clks", + "MetricGroup": "TmaL1;tma_L1_group", + "MetricName": "tma_info_slots" }, { - "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses", - "MetricConstraint": "NO_NMI_WATCHDOG", - "MetricExpr": "(ITLB_MISSES.WALK_DURATION + DTLB_LOAD_MISSES.WALK_DURATION + DTLB_STORE_MISSES.WALK_DURATION) / CORE_CLKS", - "MetricGroup": "Mem;MemoryTLB", - "MetricName": "Page_Walks_Utilization" + "BriefDescription": "Fraction of cycles where both hardware Logical Processors were active", + "MetricExpr": "(1 - CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / (CPU_CLK_UNHALTED.REF_XCLK_ANY / 2) if #SMT_on else 0)", + "MetricGroup": "SMT", + "MetricName": "tma_info_smt_2t_utilization" }, { - "BriefDescription": "Average per-core data fill bandwidth to the L1 data cache [GB / sec]", - "MetricExpr": "64 * L1D.REPLACEMENT / 1e9 / duration_time", - "MetricGroup": "Mem;MemoryBW", - "MetricName": "L1D_Cache_Fill_BW" + "BriefDescription": "Socket actual clocks when any core is active on that socket", + "MetricExpr": "UNC_CLOCK.SOCKET", + "MetricGroup": "SoC", + "MetricName": "tma_info_socket_clks" }, { - "BriefDescription": "Average per-core data fill bandwidth to the L2 cache [GB / sec]", - "MetricExpr": "64 * L2_LINES_IN.ALL / 1e9 / duration_time", - "MetricGroup": "Mem;MemoryBW", - "MetricName": "L2_Cache_Fill_BW" + "BriefDescription": "Average Frequency Utilization relative nominal frequency", + "MetricExpr": "tma_info_clks / CPU_CLK_UNHALTED.REF_TSC", + "MetricGroup": "Power", + "MetricName": "tma_info_turbo_utilization" }, { - "BriefDescription": "Average per-core data fill bandwidth to the L3 cache [GB / sec]", - "MetricExpr": "64 * LONGEST_LAT_CACHE.MISS / 1e9 / duration_time", - "MetricGroup": "Mem;MemoryBW", - "MetricName": "L3_Cache_Fill_BW" + "BriefDescription": "Uops Per Instruction", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY", + "MetricGroup": "Pipeline;Ret;Retire", + "MetricName": "tma_info_uoppi", + "MetricThreshold": "tma_info_uoppi > 1.05" }, { - "BriefDescription": "Average per-thread data fill bandwidth to the L1 data cache [GB / sec]", - "MetricExpr": "L1D_Cache_Fill_BW", - "MetricGroup": "Mem;MemoryBW", - "MetricName": "L1D_Cache_Fill_BW_1T" + "BriefDescription": "Instruction per taken branch", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / BR_INST_RETIRED.NEAR_TAKEN", + "MetricGroup": "Branches;Fed;FetchBW", + "MetricName": "tma_info_uptb", + "MetricThreshold": "tma_info_uptb < 6" }, { - "BriefDescription": "Average per-thread data fill bandwidth to the L2 cache [GB / sec]", - "MetricExpr": "L2_Cache_Fill_BW", - "MetricGroup": "Mem;MemoryBW", - "MetricName": "L2_Cache_Fill_BW_1T" + "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to Instruction TLB (ITLB) misses", + "MetricExpr": "(12 * ITLB_MISSES.STLB_HIT + ITLB_MISSES.WALK_DURATION) / tma_info_clks", + "MetricGroup": "BigFoot;FetchLat;MemoryTLB;TopdownL3;tma_L3_group;tma_fetch_latency_group", + "MetricName": "tma_itlb_misses", + "MetricThreshold": "tma_itlb_misses > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)", + "PublicDescription": "This metric represents fraction of cycles the CPU was stalled due to Instruction TLB (ITLB) misses. Sample with: ITLB_MISSES.WALK_COMPLETED", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average per-thread data fill bandwidth to the L3 cache [GB / sec]", - "MetricExpr": "L3_Cache_Fill_BW", - "MetricGroup": "Mem;MemoryBW", - "MetricName": "L3_Cache_Fill_BW_1T" + "BriefDescription": "This metric estimates how often the CPU was stalled without loads missing the L1 data cache", + "MetricExpr": "max((min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING) - CYCLE_ACTIVITY.STALLS_L1D_PENDING) / tma_info_clks, 0)", + "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_issueL1;tma_issueMC;tma_memory_bound_group", + "MetricName": "tma_l1_bound", + "MetricThreshold": "tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average per-thread data access bandwidth to the L3 cache [GB / sec]", - "MetricExpr": "0", - "MetricGroup": "Mem;MemoryBW;Offcore", - "MetricName": "L3_Cache_Access_BW_1T" + "BriefDescription": "This metric estimates how often the CPU was stalled due to L2 cache accesses by loads", + "MetricExpr": "(CYCLE_ACTIVITY.STALLS_L1D_PENDING - CYCLE_ACTIVITY.STALLS_L2_PENDING) / tma_info_clks", + "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_memory_bound_group", + "MetricName": "tma_l2_bound", + "MetricThreshold": "tma_l2_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average CPU Utilization", - "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / TSC", - "MetricGroup": "HPC;Summary", - "MetricName": "CPU_Utilization" + "BriefDescription": "This metric estimates how often the CPU was stalled due to loads accesses to L3 cache or contended with a sibling Core", + "MetricConstraint": "NO_GROUP_EVENTS_SMT", + "MetricExpr": "MEM_LOAD_UOPS_RETIRED.LLC_HIT / (MEM_LOAD_UOPS_RETIRED.LLC_HIT + 7 * MEM_LOAD_UOPS_RETIRED.LLC_MISS) * CYCLE_ACTIVITY.STALLS_L2_PENDING / tma_info_clks", + "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_memory_bound_group", + "MetricName": "tma_l3_bound", + "MetricThreshold": "tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Measured Average Frequency for unhalted processors [GHz]", - "MetricExpr": "Turbo_Utilization * TSC / 1e9 / duration_time", - "MetricGroup": "Power;Summary", - "MetricName": "Average_Frequency" + "BriefDescription": "This metric represents fraction of cycles with demand load accesses that hit the L3 cache under unloaded scenarios (possibly L3 latency limited)", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "29 * (MEM_LOAD_UOPS_RETIRED.LLC_HIT * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_RETIRED.LLC_MISS))) / tma_info_clks", + "MetricGroup": "MemoryLat;TopdownL4;tma_L4_group;tma_issueLat;tma_l3_bound_group", + "MetricName": "tma_l3_hit_latency", + "MetricThreshold": "tma_l3_hit_latency > 0.1 & (tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Giga Floating Point Operations Per Second", - "MetricExpr": "(FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE + 2 * FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + 4 * (FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE) + 8 * SIMD_FP_256.PACKED_SINGLE) / 1e9 / duration_time", - "MetricGroup": "Cor;Flops;HPC", - "MetricName": "GFLOPs", - "PublicDescription": "Giga Floating Point Operations Per Second. Aggregate across all supported options of: FP precisions, scalar and vector instructions, vector-width and AMX engine." + "BriefDescription": "This metric represents fraction of cycles CPU was stalled due to Length Changing Prefixes (LCPs)", + "MetricExpr": "ILD_STALL.LCP / tma_info_clks", + "MetricGroup": "FetchLat;TopdownL3;tma_L3_group;tma_fetch_latency_group;tma_issueFB", + "MetricName": "tma_lcp", + "MetricThreshold": "tma_lcp > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)", + "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_dsb_coverage, tma_info_iptb", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average Frequency Utilization relative nominal frequency", - "MetricExpr": "CLKS / CPU_CLK_UNHALTED.REF_TSC", - "MetricGroup": "Power", - "MetricName": "Turbo_Utilization" + "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)", + "MetricExpr": "tma_retiring - tma_heavy_operations", + "MetricGroup": "Retire;TmaL2;TopdownL2;tma_L2_group;tma_retiring_group", + "MetricName": "tma_light_operations", + "MetricThreshold": "tma_light_operations > 0.6", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Fraction of cycles where both hardware Logical Processors were active", - "MetricExpr": "(1 - CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / (CPU_CLK_UNHALTED.REF_XCLK_ANY / 2) if #SMT_on else 0)", - "MetricGroup": "SMT", - "MetricName": "SMT_2T_Utilization" + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Load operations", + "MetricConstraint": "NO_GROUP_EVENTS_NMI", + "MetricExpr": "(UOPS_DISPATCHED_PORT.PORT_2 + UOPS_DISPATCHED_PORT.PORT_3 - UOPS_DISPATCHED_PORT.PORT_4) / (2 * tma_info_core_clks)", + "MetricGroup": "TopdownL5;tma_L5_group;tma_ports_utilized_3m_group", + "MetricName": "tma_load_op_utilization", + "MetricThreshold": "tma_load_op_utilization > 0.6", + "PublicDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Load operations. Sample with: UOPS_DISPATCHED.PORT_2_3", + "ScaleUnit": "100%" }, { - "BriefDescription": "Fraction of cycles spent in the Operating System (OS) Kernel mode", - "MetricExpr": "CPU_CLK_UNHALTED.THREAD_P:k / CPU_CLK_UNHALTED.THREAD", - "MetricGroup": "OS", - "MetricName": "Kernel_Utilization" + "BriefDescription": "This metric represents fraction of cycles the CPU spent handling cache misses due to lock operations", + "MetricConstraint": "NO_GROUP_EVENTS", + "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_clks", + "MetricGroup": "Offcore;TopdownL4;tma_L4_group;tma_issueRFO;tma_l1_bound_group", + "MetricName": "tma_lock_latency", + "MetricThreshold": "tma_lock_latency > 0.2 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Cycles Per Instruction for the Operating System (OS) Kernel mode", - "MetricExpr": "CPU_CLK_UNHALTED.THREAD_P:k / INST_RETIRED.ANY_P:k", - "MetricGroup": "OS", - "MetricName": "Kernel_CPI" + "BriefDescription": "This metric represents fraction of slots the CPU has wasted due to Machine Clears", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "tma_bad_speculation - tma_branch_mispredicts", + "MetricGroup": "BadSpec;MachineClears;TmaL2;TopdownL2;tma_L2_group;tma_bad_speculation_group;tma_issueMC;tma_issueSyncxn", + "MetricName": "tma_machine_clears", + "MetricThreshold": "tma_machine_clears > 0.1 & tma_bad_speculation > 0.15", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]", - "MetricExpr": "64 * (UNC_ARB_TRK_REQUESTS.ALL + UNC_ARB_COH_TRK_REQUESTS.ALL) / 1e6 / duration_time / 1e3", - "MetricGroup": "HPC;Mem;MemoryBW;SoC", - "MetricName": "DRAM_BW_Use" + "BriefDescription": "This metric estimates fraction of cycles where the core's performance was likely hurt due to approaching bandwidth limits of external memory (DRAM)", + "MetricExpr": "min(CPU_CLK_UNHALTED.THREAD, cpu@OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD\\,cmask\\=6@) / tma_info_clks", + "MetricGroup": "MemoryBW;Offcore;TopdownL4;tma_L4_group;tma_dram_bound_group;tma_issueBW", + "MetricName": "tma_mem_bandwidth", + "MetricThreshold": "tma_mem_bandwidth > 0.2 & (tma_dram_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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_dram_bw_use, tma_sq_full", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average latency of all requests to external memory (in Uncore cycles)", - "MetricExpr": "MEM_Parallel_Requests", - "MetricGroup": "Mem;SoC", - "MetricName": "MEM_Request_Latency" + "BriefDescription": "This metric estimates fraction of cycles where the performance was likely hurt due to latency from external memory (DRAM)", + "MetricExpr": "min(CPU_CLK_UNHALTED.THREAD, OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD) / tma_info_clks - tma_mem_bandwidth", + "MetricGroup": "MemoryLat;Offcore;TopdownL4;tma_L4_group;tma_dram_bound_group;tma_issueLat", + "MetricName": "tma_mem_latency", + "MetricThreshold": "tma_mem_latency > 0.1 & (tma_dram_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average number of parallel requests to external memory. Accounts for all requests", - "MetricExpr": "UNC_ARB_TRK_OCCUPANCY.ALL / UNC_ARB_TRK_REQUESTS.ALL", - "MetricGroup": "Mem;SoC", - "MetricName": "MEM_Parallel_Requests" + "BriefDescription": "This metric represents fraction of slots the Memory subsystem within the Backend was a bottleneck", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "(min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING) + RESOURCE_STALLS.SB) / (min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) + UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC - (UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC if tma_info_ipc > 1.8 else UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC) - (RS_EVENTS.EMPTY_CYCLES if tma_fetch_latency > 0.1 else 0) + RESOURCE_STALLS.SB) * tma_backend_bound", + "MetricGroup": "Backend;TmaL2;TopdownL2;tma_L2_group;tma_backend_bound_group", + "MetricName": "tma_memory_bound", + "MetricThreshold": "tma_memory_bound > 0.2 & tma_backend_bound > 0.2", + "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).", + "ScaleUnit": "100%" }, { - "BriefDescription": "Socket actual clocks when any core is active on that socket", - "MetricExpr": "UNC_CLOCK.SOCKET", - "MetricGroup": "SoC", - "MetricName": "Socket_CLKS" + "BriefDescription": "This metric represents fraction of slots the CPU was retiring uops fetched by the Microcode Sequencer (MS) unit", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / UOPS_ISSUED.ANY * IDQ.MS_UOPS / tma_info_slots", + "MetricGroup": "MicroSeq;TopdownL3;tma_L3_group;tma_heavy_operations_group;tma_issueMC;tma_issueMS", + "MetricName": "tma_microcode_sequencer", + "MetricThreshold": "tma_microcode_sequencer > 0.05 & tma_heavy_operations > 0.1", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Instructions per Far Branch ( Far Branches apply upon transition from application to operating system, handling interrupts, exceptions) [lower number means higher occurrence rate]", - "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.FAR_BRANCH:u", - "MetricGroup": "Branches;OS", - "MetricName": "IpFarBranch" + "BriefDescription": "This metric represents Core fraction of cycles in which CPU was likely limited due to the MITE pipeline (the legacy decode pipeline)", + "MetricExpr": "(IDQ.ALL_MITE_CYCLES_ANY_UOPS - IDQ.ALL_MITE_CYCLES_4_UOPS) / tma_info_core_clks / 2", + "MetricGroup": "DSBmiss;FetchBW;TopdownL3;tma_L3_group;tma_fetch_bandwidth_group", + "MetricName": "tma_mite", + "MetricThreshold": "tma_mite > 0.1 & (tma_fetch_bandwidth > 0.1 & tma_frontend_bound > 0.15 & tma_info_ipc / 4 > 0.35)", + "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.", + "ScaleUnit": "100%" }, { - "BriefDescription": "Uncore frequency per die [GHZ]", - "MetricExpr": "Socket_CLKS / #num_dies / duration_time / 1e9", - "MetricGroup": "SoC", - "MetricName": "UNCORE_FREQ" + "BriefDescription": "This metric estimates the fraction of cycles when the CPU was stalled due to switches of uop delivery to the Microcode Sequencer (MS)", + "MetricExpr": "3 * IDQ.MS_SWITCHES / tma_info_clks", + "MetricGroup": "FetchLat;MicroSeq;TopdownL3;tma_L3_group;tma_fetch_latency_group;tma_issueMC;tma_issueMS;tma_issueMV;tma_issueSO", + "MetricName": "tma_ms_switches", + "MetricThreshold": "tma_ms_switches > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "C3 residency percent per core", - "MetricExpr": "cstate_core@c3\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C3_Core_Residency", + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 0 ([SNB+] ALU; [HSW+] ALU and 2nd branch)", + "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_0 / tma_info_core_clks", + "MetricGroup": "Compute;TopdownL6;tma_L6_group;tma_alu_op_utilization_group;tma_issue2P", + "MetricName": "tma_port_0", + "MetricThreshold": "tma_port_0 > 0.6", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "C6 residency percent per core", - "MetricExpr": "cstate_core@c6\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C6_Core_Residency", + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 1 (ALU)", + "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_1 / tma_info_core_clks", + "MetricGroup": "TopdownL6;tma_L6_group;tma_alu_op_utilization_group;tma_issue2P", + "MetricName": "tma_port_1", + "MetricThreshold": "tma_port_1 > 0.6", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "C7 residency percent per core", - "MetricExpr": "cstate_core@c7\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C7_Core_Residency", + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 2 ([SNB+]Loads and Store-address; [ICL+] Loads)", + "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_2 / tma_info_core_clks", + "MetricGroup": "TopdownL6;tma_L6_group;tma_load_op_utilization_group", + "MetricName": "tma_port_2", + "MetricThreshold": "tma_port_2 > 0.6", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "C2 residency percent per package", - "MetricExpr": "cstate_pkg@c2\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C2_Pkg_Residency", + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 3 ([SNB+]Loads and Store-address; [ICL+] Loads)", + "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_3 / tma_info_core_clks", + "MetricGroup": "TopdownL6;tma_L6_group;tma_load_op_utilization_group", + "MetricName": "tma_port_3", + "MetricThreshold": "tma_port_3 > 0.6", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "C3 residency percent per package", - "MetricExpr": "cstate_pkg@c3\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C3_Pkg_Residency", + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 4 (Store-data)", + "MetricExpr": "tma_store_op_utilization", + "MetricGroup": "TopdownL6;tma_L6_group;tma_issueSpSt;tma_store_op_utilization_group", + "MetricName": "tma_port_4", + "MetricThreshold": "tma_port_4 > 0.6", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "C6 residency percent per package", - "MetricExpr": "cstate_pkg@c6\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C6_Pkg_Residency", + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 5 ([SNB+] Branches and ALU; [HSW+] ALU)", + "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_5 / tma_info_core_clks", + "MetricGroup": "TopdownL6;tma_L6_group;tma_alu_op_utilization_group;tma_issue2P", + "MetricName": "tma_port_5", + "MetricThreshold": "tma_port_5 > 0.6", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "C7 residency percent per package", - "MetricExpr": "cstate_pkg@c7\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C7_Pkg_Residency", + "BriefDescription": "This metric estimates fraction of cycles the CPU performance was potentially limited due to Core computation issues (non divider-related)", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "(min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) + UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC - (UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC if tma_info_ipc > 1.8 else UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC) - (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_clks", + "MetricGroup": "PortsUtil;TopdownL3;tma_L3_group;tma_core_bound_group", + "MetricName": "tma_ports_utilization", + "MetricThreshold": "tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2)", + "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.", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This metric represents fraction of cycles CPU executed no uops on any execution port (Logical Processor cycles since ICL, Physical Core cycles otherwise)", + "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_clks)", + "MetricGroup": "PortsUtil;TopdownL4;tma_L4_group;tma_ports_utilization_group", + "MetricName": "tma_ports_utilized_0", + "MetricThreshold": "tma_ports_utilized_0 > 0.2 & (tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2))", + "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.", + "ScaleUnit": "100%" + }, + { + "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)", + "MetricExpr": "((cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ - cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@) / 2 if #SMT_on else (UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC - UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC) / tma_info_core_clks)", + "MetricGroup": "PortsUtil;TopdownL4;tma_L4_group;tma_issueL1;tma_ports_utilization_group", + "MetricName": "tma_ports_utilized_1", + "MetricThreshold": "tma_ports_utilized_1 > 0.2 & (tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" + }, + { + "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)", + "MetricExpr": "((cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@ - cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@) / 2 if #SMT_on else (UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC - UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC) / tma_info_core_clks)", + "MetricGroup": "PortsUtil;TopdownL4;tma_L4_group;tma_issue2P;tma_ports_utilization_group", + "MetricName": "tma_ports_utilized_2", + "MetricThreshold": "tma_ports_utilized_2 > 0.15 & (tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" + }, + { + "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).", + "MetricExpr": "(cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@ / 2 if #SMT_on else UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC) / tma_info_core_clks", + "MetricGroup": "PortsUtil;TopdownL4;tma_L4_group;tma_ports_utilization_group", + "MetricName": "tma_ports_utilized_3m", + "MetricThreshold": "tma_ports_utilized_3m > 0.7 & (tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2))", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / tma_info_slots", + "MetricGroup": "TmaL1;TopdownL1;tma_L1_group", + "MetricName": "tma_retiring", + "MetricThreshold": "tma_retiring > 0.7 | tma_heavy_operations > 0.1", + "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", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This metric estimates fraction of cycles handling memory load split accesses - load that cross 64-byte cache line boundary", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "13 * LD_BLOCKS.NO_SR / tma_info_clks", + "MetricGroup": "TopdownL4;tma_L4_group;tma_l1_bound_group", + "MetricName": "tma_split_loads", + "MetricThreshold": "tma_split_loads > 0.2 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This metric represents rate of split store accesses", + "MetricExpr": "2 * MEM_UOPS_RETIRED.SPLIT_STORES / tma_info_core_clks", + "MetricGroup": "TopdownL4;tma_L4_group;tma_issueSpSt;tma_store_bound_group", + "MetricName": "tma_split_stores", + "MetricThreshold": "tma_split_stores > 0.2 & (tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" + }, + { + "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)", + "MetricExpr": "(OFFCORE_REQUESTS_BUFFER.SQ_FULL / 2 if #SMT_on else OFFCORE_REQUESTS_BUFFER.SQ_FULL) / tma_info_core_clks", + "MetricGroup": "MemoryBW;Offcore;TopdownL4;tma_L4_group;tma_issueBW;tma_l3_bound_group", + "MetricName": "tma_sq_full", + "MetricThreshold": "tma_sq_full > 0.3 & (tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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_dram_bw_use, tma_mem_bandwidth", + "ScaleUnit": "100%" + }, + { + "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", + "MetricExpr": "RESOURCE_STALLS.SB / tma_info_clks", + "MetricGroup": "MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_memory_bound_group", + "MetricName": "tma_store_bound", + "MetricThreshold": "tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)", + "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", + "ScaleUnit": "100%" + }, + { + "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", + "MetricExpr": "13 * LD_BLOCKS.STORE_FORWARD / tma_info_clks", + "MetricGroup": "TopdownL4;tma_L4_group;tma_l1_bound_group", + "MetricName": "tma_store_fwd_blk", + "MetricThreshold": "tma_store_fwd_blk > 0.1 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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.", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This metric estimates fraction of cycles the CPU spent handling L1D store misses", + "MetricConstraint": "NO_GROUP_EVENTS", + "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_clks", + "MetricGroup": "MemoryLat;Offcore;TopdownL4;tma_L4_group;tma_issueRFO;tma_issueSL;tma_store_bound_group", + "MetricName": "tma_store_latency", + "MetricThreshold": "tma_store_latency > 0.1 & (tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Store operations", + "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_4 / tma_info_core_clks", + "MetricGroup": "TopdownL5;tma_L5_group;tma_ports_utilized_3m_group", + "MetricName": "tma_store_op_utilization", + "MetricThreshold": "tma_store_op_utilization > 0.6", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This metric serves as an approximation of legacy x87 usage", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS * FP_COMP_OPS_EXE.X87 / UOPS_EXECUTED.THREAD", + "MetricGroup": "Compute;TopdownL4;tma_L4_group;tma_fp_arith_group", + "MetricName": "tma_x87_use", + "MetricThreshold": "tma_x87_use > 0.1 & (tma_fp_arith > 0.2 & tma_light_operations > 0.6)", + "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.", "ScaleUnit": "100%" } ]
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 22/51 perf vendor events intel: Refresh ivytown metrics
In reply to Ian RogersUpdate the ivytown metrics to TMA version 4.5. Generation was done using https://github.com/intel/perfmon.
Notable changes are TMA info metrics are renamed from their node name to be lower case and prefixed by tma_info_, MetricThreshold expressions are added, and the smi_cost metric group is added replicating existing hard coded metrics in stat-shadow.
--- .../arch/x86/ivytown/ivt-metrics.json | 1311 +++++++++-------- 1 file changed, 736 insertions(+), 575 deletions(-)
tools/perf/pmu-events/arch/x86/ivytown/ivt-metrics.json +736 -575
@@ -1,866 +1,1027 @@ [ { - "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend", - "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / SLOTS", - "MetricGroup": "PGO;TopdownL1;tma_L1_group", - "MetricName": "tma_frontend_bound", - "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 Machine_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.", - "ScaleUnit": "100%" - }, - { - "BriefDescription": "This metric represents fraction of slots the CPU was stalled due to Frontend latency issues", - "MetricExpr": "4 * min(CPU_CLK_UNHALTED.THREAD, IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE) / SLOTS", - "MetricGroup": "Frontend;TopdownL2;tma_L2_group;tma_frontend_bound_group", - "MetricName": "tma_fetch_latency", - "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", + "BriefDescription": "C2 residency percent per package", + "MetricExpr": "cstate_pkg@c2\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C2_Pkg_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to instruction cache misses.", - "MetricExpr": "ICACHE.IFETCH_STALL / CLKS - tma_itlb_misses", - "MetricGroup": "BigFoot;FetchLat;IcMiss;TopdownL3;tma_fetch_latency_group", - "MetricName": "tma_icache_misses", + "BriefDescription": "C3 residency percent per core", + "MetricExpr": "cstate_core@c3\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C3_Core_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to Instruction TLB (ITLB) misses", - "MetricExpr": "(12 * ITLB_MISSES.STLB_HIT + ITLB_MISSES.WALK_DURATION) / CLKS", - "MetricGroup": "BigFoot;FetchLat;MemoryTLB;TopdownL3;tma_fetch_latency_group", - "MetricName": "tma_itlb_misses", - "PublicDescription": "This metric represents fraction of cycles the CPU was stalled due to Instruction TLB (ITLB) misses. Sample with: ITLB_MISSES.WALK_COMPLETED", + "BriefDescription": "C3 residency percent per package", + "MetricExpr": "cstate_pkg@c3\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C3_Pkg_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to Branch Resteers", - "MetricExpr": "12 * (BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY) / CLKS", - "MetricGroup": "FetchLat;TopdownL3;tma_fetch_latency_group", - "MetricName": "tma_branch_resteers", - "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", + "BriefDescription": "C6 residency percent per core", + "MetricExpr": "cstate_core@c6\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C6_Core_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to switches from DSB to MITE pipelines", - "MetricExpr": "DSB2MITE_SWITCHES.PENALTY_CYCLES / CLKS", - "MetricGroup": "DSBmiss;FetchLat;TopdownL3;tma_fetch_latency_group", - "MetricName": "tma_dsb_switches", - "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.", + "BriefDescription": "C6 residency percent per package", + "MetricExpr": "cstate_pkg@c6\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C6_Pkg_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles CPU was stalled due to Length Changing Prefixes (LCPs)", - "MetricExpr": "ILD_STALL.LCP / CLKS", - "MetricGroup": "FetchLat;TopdownL3;tma_fetch_latency_group", - "MetricName": "tma_lcp", - "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.", + "BriefDescription": "C7 residency percent per core", + "MetricExpr": "cstate_core@c7\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C7_Core_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates the fraction of cycles when the CPU was stalled due to switches of uop delivery to the Microcode Sequencer (MS)", - "MetricExpr": "3 * IDQ.MS_SWITCHES / CLKS", - "MetricGroup": "FetchLat;MicroSeq;TopdownL3;tma_fetch_latency_group", - "MetricName": "tma_ms_switches", - "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", + "BriefDescription": "C7 residency percent per package", + "MetricExpr": "cstate_pkg@c7\\-residency@ / TSC", + "MetricGroup": "Power", + "MetricName": "C7_Pkg_Residency", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of slots the CPU was stalled due to Frontend bandwidth issues", - "MetricExpr": "tma_frontend_bound - tma_fetch_latency", - "MetricGroup": "FetchBW;Frontend;TopdownL2;tma_L2_group;tma_frontend_bound_group", - "MetricName": "tma_fetch_bandwidth", - "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.", - "ScaleUnit": "100%" + "BriefDescription": "Uncore frequency per die [GHZ]", + "MetricExpr": "tma_info_socket_clks / #num_dies / duration_time / 1e9", + "MetricGroup": "SoC", + "MetricName": "UNCORE_FREQ" }, { - "BriefDescription": "This metric represents Core fraction of cycles in which CPU was likely limited due to the MITE pipeline (the legacy decode pipeline)", - "MetricExpr": "(IDQ.ALL_MITE_CYCLES_ANY_UOPS - IDQ.ALL_MITE_CYCLES_4_UOPS) / CORE_CLKS / 2", - "MetricGroup": "DSBmiss;FetchBW;TopdownL3;tma_fetch_bandwidth_group", - "MetricName": "tma_mite", - "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.", + "BriefDescription": "Percentage of cycles spent in System Management Interrupts.", + "MetricExpr": "((msr@aperf@ - cycles) / msr@aperf@ if msr@smi@ > 0 else 0)", + "MetricGroup": "smi", + "MetricName": "smi_cycles", + "MetricThreshold": "smi_cycles > 0.1", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents Core fraction of cycles in which CPU was likely limited due to DSB (decoded uop cache) fetch pipeline", - "MetricExpr": "(IDQ.ALL_DSB_CYCLES_ANY_UOPS - IDQ.ALL_DSB_CYCLES_4_UOPS) / CORE_CLKS / 2", - "MetricGroup": "DSB;FetchBW;TopdownL3;tma_fetch_bandwidth_group", - "MetricName": "tma_dsb", - "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.", - "ScaleUnit": "100%" + "BriefDescription": "Number of SMI interrupts.", + "MetricExpr": "msr@smi@", + "MetricGroup": "smi", + "MetricName": "smi_num", + "ScaleUnit": "1SMI#" }, { - "BriefDescription": "This category represents fraction of slots wasted due to incorrect speculations", - "MetricExpr": "(UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (INT_MISC.RECOVERY_CYCLES_ANY / 2 if #SMT_on else INT_MISC.RECOVERY_CYCLES)) / SLOTS", - "MetricGroup": "TopdownL1;tma_L1_group", - "MetricName": "tma_bad_speculation", - "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.", + "BriefDescription": "This metric estimates how often memory load accesses were aliased by preceding stores (in program order) with a 4K address offset", + "MetricExpr": "LD_BLOCKS_PARTIAL.ADDRESS_ALIAS / tma_info_clks", + "MetricGroup": "TopdownL4;tma_L4_group;tma_l1_bound_group", + "MetricName": "tma_4k_aliasing", + "MetricThreshold": "tma_4k_aliasing > 0.2 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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).", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of slots the CPU has wasted due to Branch Misprediction", - "MetricExpr": "BR_MISP_RETIRED.ALL_BRANCHES / (BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT) * tma_bad_speculation", - "MetricGroup": "BadSpec;BrMispredicts;TopdownL2;tma_L2_group;tma_bad_speculation_group", - "MetricName": "tma_branch_mispredicts", - "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", + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution ports for ALU operations.", + "MetricConstraint": "NO_GROUP_EVENTS_NMI", + "MetricExpr": "(UOPS_DISPATCHED_PORT.PORT_0 + UOPS_DISPATCHED_PORT.PORT_1 + UOPS_DISPATCHED_PORT.PORT_5) / (3 * tma_info_core_clks)", + "MetricGroup": "TopdownL5;tma_L5_group;tma_ports_utilized_3m_group", + "MetricName": "tma_alu_op_utilization", + "MetricThreshold": "tma_alu_op_utilization > 0.6", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of slots the CPU has wasted due to Machine Clears", - "MetricExpr": "tma_bad_speculation - tma_branch_mispredicts", - "MetricGroup": "BadSpec;MachineClears;TopdownL2;tma_L2_group;tma_bad_speculation_group", - "MetricName": "tma_machine_clears", - "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", + "BriefDescription": "This metric estimates fraction of slots the CPU retired uops delivered by the Microcode_Sequencer as a result of Assists", + "MetricExpr": "100 * OTHER_ASSISTS.ANY_WB_ASSIST / tma_info_slots", + "MetricGroup": "TopdownL4;tma_L4_group;tma_microcode_sequencer_group", + "MetricName": "tma_assists", + "MetricThreshold": "tma_assists > 0.1 & (tma_microcode_sequencer > 0.05 & tma_heavy_operations > 0.1)", + "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", "ScaleUnit": "100%" }, { "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", + "MetricConstraint": "NO_GROUP_EVENTS_NMI", "MetricExpr": "1 - (tma_frontend_bound + tma_bad_speculation + tma_retiring)", - "MetricGroup": "TopdownL1;tma_L1_group", + "MetricGroup": "TmaL1;TopdownL1;tma_L1_group", "MetricName": "tma_backend_bound", + "MetricThreshold": "tma_backend_bound > 0.2", "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.", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of slots the Memory subsystem within the Backend was a bottleneck", - "MetricExpr": "(min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING) + RESOURCE_STALLS.SB) / (min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) + UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC - UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC if IPC > 1.8 else (UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC - RS_EVENTS.EMPTY_CYCLES if tma_fetch_latency > 0.1 else RESOURCE_STALLS.SB)) * tma_backend_bound", - "MetricGroup": "Backend;TopdownL2;tma_L2_group;tma_backend_bound_group", - "MetricName": "tma_memory_bound", - "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).", + "BriefDescription": "This category represents fraction of slots wasted due to incorrect speculations", + "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_slots", + "MetricGroup": "TmaL1;TopdownL1;tma_L1_group", + "MetricName": "tma_bad_speculation", + "MetricThreshold": "tma_bad_speculation > 0.15", + "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.", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates how often the CPU was stalled without loads missing the L1 data cache", - "MetricExpr": "max((min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING) - CYCLE_ACTIVITY.STALLS_L1D_PENDING) / CLKS, 0)", - "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_memory_bound_group", - "MetricName": "tma_l1_bound", - "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", + "BriefDescription": "This metric represents fraction of slots the CPU has wasted due to Branch Misprediction", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "BR_MISP_RETIRED.ALL_BRANCHES / (BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT) * tma_bad_speculation", + "MetricGroup": "BadSpec;BrMispredicts;TmaL2;TopdownL2;tma_L2_group;tma_bad_speculation_group;tma_issueBM", + "MetricName": "tma_branch_mispredicts", + "MetricThreshold": "tma_branch_mispredicts > 0.1 & tma_bad_speculation > 0.15", + "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_branch_misprediction_cost, tma_mispredicts_resteers", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric roughly estimates the fraction of cycles where the Data TLB (DTLB) was missed by load accesses", - "MetricExpr": "(7 * DTLB_LOAD_MISSES.STLB_HIT + DTLB_LOAD_MISSES.WALK_DURATION) / CLKS", - "MetricGroup": "MemoryTLB;TopdownL4;tma_l1_bound_group", - "MetricName": "tma_dtlb_load", - "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", + "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to Branch Resteers", + "MetricExpr": "12 * (BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY) / tma_info_clks", + "MetricGroup": "FetchLat;TopdownL3;tma_L3_group;tma_fetch_latency_group", + "MetricName": "tma_branch_resteers", + "MetricThreshold": "tma_branch_resteers > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)", + "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", "ScaleUnit": "100%" }, { - "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", - "MetricExpr": "13 * LD_BLOCKS.STORE_FORWARD / CLKS", - "MetricGroup": "TopdownL4;tma_l1_bound_group", - "MetricName": "tma_store_fwd_blk", - "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.", + "BriefDescription": "This metric estimates fraction of cycles the CPU retired uops originated from CISC (complex instruction set computer) instruction", + "MetricConstraint": "NO_GROUP_EVENTS_NMI", + "MetricExpr": "max(0, tma_microcode_sequencer - tma_assists)", + "MetricGroup": "TopdownL4;tma_L4_group;tma_microcode_sequencer_group", + "MetricName": "tma_cisc", + "MetricThreshold": "tma_cisc > 0.1 & (tma_microcode_sequencer > 0.05 & tma_heavy_operations > 0.1)", + "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.", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles the CPU spent handling cache misses due to lock operations", - "MetricExpr": "MEM_UOPS_RETIRED.LOCK_LOADS / MEM_UOPS_RETIRED.ALL_STORES * min(CPU_CLK_UNHALTED.THREAD, OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO) / CLKS", - "MetricGroup": "Offcore;TopdownL4;tma_l1_bound_group", - "MetricName": "tma_lock_latency", - "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", + "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling synchronizations due to contested accesses", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "(60 * (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD))) + 43 * (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD)))) / tma_info_clks", + "MetricGroup": "DataSharing;Offcore;Snoop;TopdownL4;tma_L4_group;tma_issueSyncxn;tma_l3_bound_group", + "MetricName": "tma_contested_accesses", + "MetricThreshold": "tma_contested_accesses > 0.05 & (tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles handling memory load split accesses - load that cross 64-byte cache line boundary", - "MetricExpr": "13 * LD_BLOCKS.NO_SR / CLKS", - "MetricGroup": "TopdownL4;tma_l1_bound_group", - "MetricName": "tma_split_loads", - "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", + "BriefDescription": "This metric represents fraction of slots where Core non-memory issues were of a bottleneck", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "tma_backend_bound - tma_memory_bound", + "MetricGroup": "Backend;Compute;TmaL2;TopdownL2;tma_L2_group;tma_backend_bound_group", + "MetricName": "tma_core_bound", + "MetricThreshold": "tma_core_bound > 0.1 & tma_backend_bound > 0.2", + "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).", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates how often memory load accesses were aliased by preceding stores (in program order) with a 4K address offset", - "MetricExpr": "LD_BLOCKS_PARTIAL.ADDRESS_ALIAS / CLKS", - "MetricGroup": "TopdownL4;tma_l1_bound_group", - "MetricName": "tma_4k_aliasing", - "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).", + "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling synchronizations due to data-sharing accesses", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "43 * (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD))) / tma_info_clks", + "MetricGroup": "Offcore;Snoop;TopdownL4;tma_L4_group;tma_issueSyncxn;tma_l3_bound_group", + "MetricName": "tma_data_sharing", + "MetricThreshold": "tma_data_sharing > 0.05 & (tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric does a *rough estimation* of how often L1D Fill Buffer unavailability limited additional L1D miss memory access requests to proceed", - "MetricExpr": "Load_Miss_Real_Latency * cpu@L1D_PEND_MISS.FB_FULL\\,cmask\\=1@ / CLKS", - "MetricGroup": "MemoryBW;TopdownL4;tma_l1_bound_group", - "MetricName": "tma_fb_full", - "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).", + "BriefDescription": "This metric represents fraction of cycles where the Divider unit was active", + "MetricExpr": "ARITH.FPU_DIV_ACTIVE / tma_info_core_clks", + "MetricGroup": "TopdownL3;tma_L3_group;tma_core_bound_group", + "MetricName": "tma_divider", + "MetricThreshold": "tma_divider > 0.2 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2)", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates how often the CPU was stalled due to L2 cache accesses by loads", - "MetricExpr": "(CYCLE_ACTIVITY.STALLS_L1D_PENDING - CYCLE_ACTIVITY.STALLS_L2_PENDING) / CLKS", - "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_memory_bound_group", - "MetricName": "tma_l2_bound", - "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", + "BriefDescription": "This metric estimates how often the CPU was stalled on accesses to external memory (DRAM) by loads", + "MetricConstraint": "NO_GROUP_EVENTS_SMT", + "MetricExpr": "(1 - MEM_LOAD_UOPS_RETIRED.LLC_HIT / (MEM_LOAD_UOPS_RETIRED.LLC_HIT + 7 * MEM_LOAD_UOPS_RETIRED.LLC_MISS)) * CYCLE_ACTIVITY.STALLS_L2_PENDING / tma_info_clks", + "MetricGroup": "MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_memory_bound_group", + "MetricName": "tma_dram_bound", + "MetricThreshold": "tma_dram_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates how often the CPU was stalled due to loads accesses to L3 cache or contended with a sibling Core", - "MetricExpr": "MEM_LOAD_UOPS_RETIRED.LLC_HIT / (MEM_LOAD_UOPS_RETIRED.LLC_HIT + 7 * MEM_LOAD_UOPS_RETIRED.LLC_MISS) * CYCLE_ACTIVITY.STALLS_L2_PENDING / CLKS", - "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_memory_bound_group", - "MetricName": "tma_l3_bound", - "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", + "BriefDescription": "This metric represents Core fraction of cycles in which CPU was likely limited due to DSB (decoded uop cache) fetch pipeline", + "MetricExpr": "(IDQ.ALL_DSB_CYCLES_ANY_UOPS - IDQ.ALL_DSB_CYCLES_4_UOPS) / tma_info_core_clks / 2", + "MetricGroup": "DSB;FetchBW;TopdownL3;tma_L3_group;tma_fetch_bandwidth_group", + "MetricName": "tma_dsb", + "MetricThreshold": "tma_dsb > 0.15 & (tma_fetch_bandwidth > 0.1 & tma_frontend_bound > 0.15 & tma_info_ipc / 4 > 0.35)", + "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.", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling synchronizations due to contested accesses", - "MetricExpr": "(60 * (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD))) + 43 * (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD)))) / CLKS", - "MetricGroup": "DataSharing;Offcore;Snoop;TopdownL4;tma_l3_bound_group", - "MetricName": "tma_contested_accesses", - "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", + "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to switches from DSB to MITE pipelines", + "MetricExpr": "DSB2MITE_SWITCHES.PENALTY_CYCLES / tma_info_clks", + "MetricGroup": "DSBmiss;FetchLat;TopdownL3;tma_L3_group;tma_fetch_latency_group;tma_issueFB", + "MetricName": "tma_dsb_switches", + "MetricThreshold": "tma_dsb_switches > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)", + "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_dsb_coverage, tma_info_iptb, tma_lcp", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling synchronizations due to data-sharing accesses", - "MetricExpr": "43 * (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD))) / CLKS", - "MetricGroup": "Offcore;Snoop;TopdownL4;tma_l3_bound_group", - "MetricName": "tma_data_sharing", - "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", + "BriefDescription": "This metric roughly estimates the fraction of cycles where the Data TLB (DTLB) was missed by load accesses", + "MetricExpr": "(7 * DTLB_LOAD_MISSES.STLB_HIT + DTLB_LOAD_MISSES.WALK_DURATION) / tma_info_clks", + "MetricGroup": "MemoryTLB;TopdownL4;tma_L4_group;tma_issueTLB;tma_l1_bound_group", + "MetricName": "tma_dtlb_load", + "MetricThreshold": "tma_dtlb_load > 0.1 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents fraction of cycles with demand load accesses that hit the L3 cache under unloaded scenarios (possibly L3 latency limited)", - "MetricExpr": "41 * (MEM_LOAD_UOPS_RETIRED.LLC_HIT * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD))) / CLKS", - "MetricGroup": "MemoryLat;TopdownL4;tma_l3_bound_group", - "MetricName": "tma_l3_hit_latency", - "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", + "BriefDescription": "This metric roughly estimates the fraction of cycles spent handling first-level data TLB store misses", + "MetricExpr": "(7 * DTLB_STORE_MISSES.STLB_HIT + DTLB_STORE_MISSES.WALK_DURATION) / tma_info_clks", + "MetricGroup": "MemoryTLB;TopdownL4;tma_L4_group;tma_issueTLB;tma_store_bound_group", + "MetricName": "tma_dtlb_store", + "MetricThreshold": "tma_dtlb_store > 0.05 & (tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", "ScaleUnit": "100%" }, { - "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)", - "MetricExpr": "(OFFCORE_REQUESTS_BUFFER.SQ_FULL / 2 if #SMT_on else OFFCORE_REQUESTS_BUFFER.SQ_FULL) / CORE_CLKS", - "MetricGroup": "MemoryBW;Offcore;TopdownL4;tma_l3_bound_group", - "MetricName": "tma_sq_full", - "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). The Super Queue is used for requests to access the L2 cache or to go out to the Uncore.", + "BriefDescription": "This metric roughly estimates how often CPU was handling synchronizations due to False Sharing", + "MetricExpr": "(200 * OFFCORE_RESPONSE.DEMAND_RFO.LLC_MISS.REMOTE_HITM + 60 * OFFCORE_RESPONSE.DEMAND_RFO.LLC_HIT.HITM_OTHER_CORE) / tma_info_clks", + "MetricGroup": "DataSharing;Offcore;Snoop;TopdownL4;tma_L4_group;tma_issueSyncxn;tma_store_bound_group", + "MetricName": "tma_false_sharing", + "MetricThreshold": "tma_false_sharing > 0.05 & (tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates how often the CPU was stalled on accesses to external memory (DRAM) by loads", - "MetricExpr": "(1 - MEM_LOAD_UOPS_RETIRED.LLC_HIT / (MEM_LOAD_UOPS_RETIRED.LLC_HIT + 7 * MEM_LOAD_UOPS_RETIRED.LLC_MISS)) * CYCLE_ACTIVITY.STALLS_L2_PENDING / CLKS", - "MetricGroup": "MemoryBound;TmaL3mem;TopdownL3;tma_memory_bound_group", - "MetricName": "tma_dram_bound", - "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", + "BriefDescription": "This metric does a *rough estimation* of how often L1D Fill Buffer unavailability limited additional L1D miss memory access requests to proceed", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "tma_info_load_miss_real_latency * cpu@L1D_PEND_MISS.FB_FULL\\,cmask\\=1@ / tma_info_clks", + "MetricGroup": "MemoryBW;TopdownL4;tma_L4_group;tma_issueBW;tma_issueSL;tma_issueSmSt;tma_l1_bound_group", + "MetricName": "tma_fb_full", + "MetricThreshold": "tma_fb_full > 0.3", + "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_dram_bw_use, tma_mem_bandwidth, tma_sq_full, tma_store_latency, tma_streaming_stores", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles where the core's performance was likely hurt due to approaching bandwidth limits of external memory (DRAM)", - "MetricExpr": "min(CPU_CLK_UNHALTED.THREAD, cpu@OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD\\,cmask\\=6@) / CLKS", - "MetricGroup": "MemoryBW;Offcore;TopdownL4;tma_dram_bound_group", - "MetricName": "tma_mem_bandwidth", - "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).", + "BriefDescription": "This metric represents fraction of slots the CPU was stalled due to Frontend bandwidth issues", + "MetricExpr": "tma_frontend_bound - tma_fetch_latency", + "MetricGroup": "FetchBW;Frontend;TmaL2;TopdownL2;tma_L2_group;tma_frontend_bound_group;tma_issueFB", + "MetricName": "tma_fetch_bandwidth", + "MetricThreshold": "tma_fetch_bandwidth > 0.1 & tma_frontend_bound > 0.15 & tma_info_ipc / 4 > 0.35", + "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_dsb_coverage, tma_info_iptb, tma_lcp", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles where the performance was likely hurt due to latency from external memory (DRAM)", - "MetricExpr": "min(CPU_CLK_UNHALTED.THREAD, OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD) / CLKS - tma_mem_bandwidth", - "MetricGroup": "MemoryLat;Offcore;TopdownL4;tma_dram_bound_group", - "MetricName": "tma_mem_latency", - "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).", + "BriefDescription": "This metric represents fraction of slots the CPU was stalled due to Frontend latency issues", + "MetricExpr": "4 * min(CPU_CLK_UNHALTED.THREAD, IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE) / tma_info_slots", + "MetricGroup": "Frontend;TmaL2;TopdownL2;tma_L2_group;tma_frontend_bound_group", + "MetricName": "tma_fetch_latency", + "MetricThreshold": "tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling loads from local memory", - "MetricExpr": "200 * (MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD))) / CLKS", - "MetricGroup": "Server;TopdownL5;tma_mem_latency_group", - "MetricName": "tma_local_dram", - "PublicDescription": "This metric estimates fraction of cycles while the memory subsystem was handling loads from local memory. Caching will improve the latency and increase performance. Sample with: MEM_LOAD_UOPS_L3_MISS_RETIRED.LOCAL_DRAM_PS", + "BriefDescription": "This metric represents overall arithmetic floating-point (FP) operations fraction the CPU has executed (retired)", + "MetricExpr": "tma_x87_use + tma_fp_scalar + tma_fp_vector", + "MetricGroup": "HPC;TopdownL3;tma_L3_group;tma_light_operations_group", + "MetricName": "tma_fp_arith", + "MetricThreshold": "tma_fp_arith > 0.2 & tma_light_operations > 0.6", + "PublicDescription": "This metric represents overall arithmetic floating-point (FP) operations fraction the CPU has executed (retired). Note this metric's value may exceed its parent due to use of \"Uops\" CountDomain and FMA double-counting.", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling loads from remote memory", - "MetricExpr": "310 * (MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD))) / CLKS", - "MetricGroup": "Server;Snoop;TopdownL5;tma_mem_latency_group", - "MetricName": "tma_remote_dram", - "PublicDescription": "This metric estimates fraction of cycles while the memory subsystem was handling loads from remote memory. This is caused often due to non-optimal NUMA allocations. #link to NUMA article Sample with: MEM_LOAD_UOPS_L3_MISS_RETIRED.REMOTE_DRAM_PS", + "BriefDescription": "This metric approximates arithmetic floating-point (FP) scalar uops fraction the CPU has retired", + "MetricExpr": "(FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE) / UOPS_EXECUTED.THREAD", + "MetricGroup": "Compute;Flops;TopdownL4;tma_L4_group;tma_fp_arith_group;tma_issue2P", + "MetricName": "tma_fp_scalar", + "MetricThreshold": "tma_fp_scalar > 0.1 & (tma_fp_arith > 0.2 & tma_light_operations > 0.6)", + "PublicDescription": "This metric approximates arithmetic floating-point (FP) scalar uops fraction the CPU has retired. May overcount due to FMA double counting. Related metrics: tma_fp_vector, tma_fp_vector_512b, tma_port_0, tma_port_1, tma_port_5, tma_port_6, tma_ports_utilized_2", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling loads from remote cache in other sockets including synchronizations issues", - "MetricExpr": "(200 * (MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD))) + 180 * (MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD)))) / CLKS", - "MetricGroup": "Offcore;Server;Snoop;TopdownL5;tma_mem_latency_group", - "MetricName": "tma_remote_cache", - "PublicDescription": "This metric estimates fraction of cycles while the memory subsystem was handling loads from remote cache in other sockets including synchronizations issues. This is caused often due to non-optimal NUMA allocations. #link to NUMA article Sample with: MEM_LOAD_UOPS_L3_MISS_RETIRED.REMOTE_HITM_PS;MEM_LOAD_UOPS_L3_MISS_RETIRED.REMOTE_FWD_PS", + "BriefDescription": "This metric approximates arithmetic floating-point (FP) vector uops fraction the CPU has retired aggregated across all vector widths", + "MetricExpr": "(FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE) / UOPS_EXECUTED.THREAD", + "MetricGroup": "Compute;Flops;TopdownL4;tma_L4_group;tma_fp_arith_group;tma_issue2P", + "MetricName": "tma_fp_vector", + "MetricThreshold": "tma_fp_vector > 0.1 & (tma_fp_arith > 0.2 & tma_light_operations > 0.6)", + "PublicDescription": "This metric approximates arithmetic floating-point (FP) vector uops fraction the CPU has retired aggregated across all vector widths. May overcount due to FMA double counting. Related metrics: tma_fp_scalar, tma_fp_vector_512b, tma_port_0, tma_port_1, tma_port_5, tma_port_6, tma_ports_utilized_2", "ScaleUnit": "100%" }, { - "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", - "MetricExpr": "RESOURCE_STALLS.SB / CLKS", - "MetricGroup": "MemoryBound;TmaL3mem;TopdownL3;tma_memory_bound_group", - "MetricName": "tma_store_bound", - "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", + "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend", + "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / tma_info_slots", + "MetricGroup": "PGO;TmaL1;TopdownL1;tma_L1_group", + "MetricName": "tma_frontend_bound", + "MetricThreshold": "tma_frontend_bound > 0.15", + "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.", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric estimates fraction of cycles the CPU spent handling L1D store misses", - "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)) / CLKS", - "MetricGroup": "MemoryLat;Offcore;TopdownL4;tma_store_bound_group", - "MetricName": "tma_store_latency", - "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)", + "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", + "MetricExpr": "tma_microcode_sequencer", + "MetricGroup": "Retire;TmaL2;TopdownL2;tma_L2_group;tma_retiring_group", + "MetricName": "tma_heavy_operations", + "MetricThreshold": "tma_heavy_operations > 0.1", + "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.", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric roughly estimates how often CPU was handling synchronizations due to False Sharing", - "MetricExpr": "(200 * OFFCORE_RESPONSE.DEMAND_RFO.LLC_MISS.REMOTE_HITM + 60 * OFFCORE_RESPONSE.DEMAND_RFO.LLC_HIT.HITM_OTHER_CORE) / CLKS", - "MetricGroup": "DataSharing;Offcore;Snoop;TopdownL4;tma_store_bound_group", - "MetricName": "tma_false_sharing", - "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", + "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to instruction cache misses.", + "MetricExpr": "ICACHE.IFETCH_STALL / tma_info_clks - tma_itlb_misses", + "MetricGroup": "BigFoot;FetchLat;IcMiss;TopdownL3;tma_L3_group;tma_fetch_latency_group", + "MetricName": "tma_icache_misses", + "MetricThreshold": "tma_icache_misses > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)", "ScaleUnit": "100%" }, { - "BriefDescription": "This metric represents rate of split store accesses", - "MetricExpr": "2 * MEM_UOPS_RETIRED.SPLIT_STORES / CORE_CLKS", - "MetricGroup": "TopdownL4;tma_store_bound_group", - "MetricName": "tma_split_stores", - "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", - "ScaleUnit": "100%" + "BriefDescription": "Measured Average Frequency for unhalted processors [GHz]", + "MetricExpr": "tma_info_turbo_utilization * TSC / 1e9 / duration_time", + "MetricGroup": "Power;Summary", + "MetricName": "tma_info_average_frequency" }, { - "BriefDescription": "This metric roughly estimates the fraction of cycles spent handling first-level data TLB store misses", - "MetricExpr": "(7 * DTLB_STORE_MISSES.STLB_HIT + DTLB_STORE_MISSES.WALK_DURATION) / CLKS", - "MetricGroup": "MemoryTLB;TopdownL4;tma_store_bound_group", - "MetricName": "tma_dtlb_store", - "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", - "ScaleUnit": "100%" + "BriefDescription": "Branch instructions per taken branch.", + "MetricExpr": "BR_INST_RETIRED.ALL_BRANCHES / BR_INST_RETIRED.NEAR_TAKEN", + "MetricGroup": "Branches;Fed;PGO", + "MetricName": "tma_info_bptkbranch" }, { - "BriefDescription": "This metric represents fraction of slots where Core non-memory issues were of a bottleneck", - "MetricExpr": "tma_backend_bound - tma_memory_bound", - "MetricGroup": "Backend;Compute;TopdownL2;tma_L2_group;tma_backend_bound_group", - "MetricName": "tma_core_bound", - "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).", - "ScaleUnit": "100%" + "BriefDescription": "Per-Logical Processor actual clocks when the Logical Processor is active.", + "MetricExpr": "CPU_CLK_UNHALTED.THREAD", + "MetricGroup": "Pipeline", + "MetricName": "tma_info_clks" }, { - "BriefDescription": "This metric represents fraction of cycles where the Divider unit was active", - "MetricExpr": "ARITH.FPU_DIV_ACTIVE / CORE_CLKS", - "MetricGroup": "TopdownL3;tma_core_bound_group", - "MetricName": "tma_divider", - "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", - "ScaleUnit": "100%" + "BriefDescription": "Core actual clocks when any Logical Processor is active on the Physical Core", + "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_clks))", + "MetricGroup": "SMT", + "MetricName": "tma_info_core_clks" }, { - "BriefDescription": "This metric estimates fraction of cycles the CPU performance was potentially limited due to Core computation issues (non divider-related)", - "MetricExpr": "((min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) + UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC - UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC if IPC > 1.8 else (UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC - RS_EVENTS.EMPTY_CYCLES if tma_fetch_latency > 0.1 else RESOURCE_STALLS.SB)) - RESOURCE_STALLS.SB - min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING)) / CLKS", - "MetricGroup": "PortsUtil;TopdownL3;tma_core_bound_group", - "MetricName": "tma_ports_utilization", - "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.", - "ScaleUnit": "100%" + "BriefDescription": "Instructions Per Cycle across hyper-threads (per physical core)", + "MetricExpr": "INST_RETIRED.ANY / tma_info_core_clks", + "MetricGroup": "Ret;SMT;TmaL1;tma_L1_group", + "MetricName": "tma_info_coreipc" }, { - "BriefDescription": "This metric represents fraction of cycles CPU executed no uops on any execution port (Logical Processor cycles since ICL, Physical Core cycles otherwise)", - "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) / CORE_CLKS)", - "MetricGroup": "PortsUtil;TopdownL4;tma_ports_utilization_group", - "MetricName": "tma_ports_utilized_0", - "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.", - "ScaleUnit": "100%" + "BriefDescription": "Cycles Per Instruction (per Logical Processor)", + "MetricExpr": "1 / tma_info_ipc", + "MetricGroup": "Mem;Pipeline", + "MetricName": "tma_info_cpi" }, { - "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)", - "MetricExpr": "((cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ - cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@) / 2 if #SMT_on else (UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC - UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC) / CORE_CLKS)", - "MetricGroup": "PortsUtil;TopdownL4;tma_ports_utilization_group", - "MetricName": "tma_ports_utilized_1", - "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.", - "ScaleUnit": "100%" + "BriefDescription": "Average CPU Utilization", + "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / TSC", + "MetricGroup": "HPC;Summary", + "MetricName": "tma_info_cpu_utilization" }, { - "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)", - "MetricExpr": "((cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@ - cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@) / 2 if #SMT_on else (UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC - UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC) / CORE_CLKS)", - "MetricGroup": "PortsUtil;TopdownL4;tma_ports_utilization_group", - "MetricName": "tma_ports_utilized_2", - "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.", - "ScaleUnit": "100%" + "BriefDescription": "Average Parallel L2 cache miss data reads", + "MetricExpr": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD / OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD", + "MetricGroup": "Memory_BW;Offcore", + "MetricName": "tma_info_data_l2_mlp" }, { - "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).", - "MetricExpr": "(cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@ / 2 if #SMT_on else UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC) / CORE_CLKS", - "MetricGroup": "PortsUtil;TopdownL4;tma_ports_utilization_group", - "MetricName": "tma_ports_utilized_3m", - "ScaleUnit": "100%" + "BriefDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]", + "MetricExpr": "64 * (UNC_M_CAS_COUNT.RD + UNC_M_CAS_COUNT.WR) / 1e9 / duration_time", + "MetricGroup": "HPC;Mem;MemoryBW;SoC;tma_issueBW", + "MetricName": "tma_info_dram_bw_use", + "PublicDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]. Related metrics: tma_fb_full, tma_mem_bandwidth, tma_sq_full" }, { - "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution ports for ALU operations.", - "MetricExpr": "(UOPS_DISPATCHED_PORT.PORT_0 + UOPS_DISPATCHED_PORT.PORT_1 + UOPS_DISPATCHED_PORT.PORT_5) / (3 * CORE_CLKS)", - "MetricGroup": "TopdownL5;tma_ports_utilized_3m_group", - "MetricName": "tma_alu_op_utilization", - "ScaleUnit": "100%" + "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache)", + "MetricExpr": "IDQ.DSB_UOPS / (IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS)", + "MetricGroup": "DSB;Fed;FetchBW;tma_issueFB", + "MetricName": "tma_info_dsb_coverage", + "MetricThreshold": "tma_info_dsb_coverage < 0.7 & tma_info_ipc / 4 > 0.35", + "PublicDescription": "Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache). Related metrics: tma_dsb_switches, tma_fetch_bandwidth, tma_info_iptb, tma_lcp" }, { - "BriefDescription": "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", - "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_0 / CORE_CLKS", - "MetricGroup": "Compute;TopdownL6;tma_alu_op_utilization_group", - "MetricName": "tma_port_0", - "ScaleUnit": "100%" + "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is execution) per-thread", + "MetricExpr": "UOPS_EXECUTED.THREAD / cpu@UOPS_EXECUTED.THREAD\\,cmask\\=1@", + "MetricGroup": "Cor;Pipeline;PortsUtil;SMT", + "MetricName": "tma_info_execute" }, { - "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 1 (ALU) Sample with: UOPS_DISPATCHED_PORT.PORT_1", - "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_1 / CORE_CLKS", - "MetricGroup": "TopdownL6;tma_alu_op_utilization_group", - "MetricName": "tma_port_1", - "ScaleUnit": "100%" - }, - { - "BriefDescription": "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", - "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_5 / CORE_CLKS", - "MetricGroup": "TopdownL6;tma_alu_op_utilization_group", - "MetricName": "tma_port_5", - "ScaleUnit": "100%" + "BriefDescription": "The ratio of Executed- by Issued-Uops", + "MetricExpr": "UOPS_EXECUTED.THREAD / UOPS_ISSUED.ANY", + "MetricGroup": "Cor;Pipeline", + "MetricName": "tma_info_execute_per_issue", + "PublicDescription": "The ratio of Executed- by Issued-Uops. Ratio > 1 suggests high rate of uop micro-fusions. Ratio < 1 suggest high rate of \"execute\" at rename stage." }, { - "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Load operations Sample with: UOPS_DISPATCHED.PORT_2_3", - "MetricExpr": "(UOPS_DISPATCHED_PORT.PORT_2 + UOPS_DISPATCHED_PORT.PORT_3 - UOPS_DISPATCHED_PORT.PORT_4) / (2 * CORE_CLKS)", - "MetricGroup": "TopdownL5;tma_ports_utilized_3m_group", - "MetricName": "tma_load_op_utilization", - "ScaleUnit": "100%" + "BriefDescription": "Floating Point Operations Per Cycle", + "MetricExpr": "(FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE + 2 * FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + 4 * (FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE) + 8 * SIMD_FP_256.PACKED_SINGLE) / tma_info_core_clks", + "MetricGroup": "Flops;Ret", + "MetricName": "tma_info_flopc" }, { - "BriefDescription": "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", - "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_2 / CORE_CLKS", - "MetricGroup": "TopdownL6;tma_load_op_utilization_group", - "MetricName": "tma_port_2", - "ScaleUnit": "100%" + "BriefDescription": "Giga Floating Point Operations Per Second", + "MetricExpr": "(FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE + 2 * FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + 4 * (FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE) + 8 * SIMD_FP_256.PACKED_SINGLE) / 1e9 / duration_time", + "MetricGroup": "Cor;Flops;HPC", + "MetricName": "tma_info_gflops", + "PublicDescription": "Giga Floating Point Operations Per Second. Aggregate across all supported options of: FP precisions, scalar and vector instructions, vector-width and AMX engine." }, { - "BriefDescription": "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", - "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_3 / CORE_CLKS", - "MetricGroup": "TopdownL6;tma_load_op_utilization_group", - "MetricName": "tma_port_3", - "ScaleUnit": "100%" + "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is execution) per-core", + "MetricExpr": "UOPS_EXECUTED.THREAD / (cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2 if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)", + "MetricGroup": "Backend;Cor;Pipeline;PortsUtil", + "MetricName": "tma_info_ilp" }, { - "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Store operations", - "MetricExpr": "tma_port_4", - "MetricGroup": "TopdownL5;tma_ports_utilized_3m_group", - "MetricName": "tma_store_op_utilization", - "ScaleUnit": "100%" + "BriefDescription": "Total number of retired Instructions", + "MetricExpr": "INST_RETIRED.ANY", + "MetricGroup": "Summary;TmaL1;tma_L1_group", + "MetricName": "tma_info_instructions", + "PublicDescription": "Total number of retired Instructions. Sample with: INST_RETIRED.PREC_DIST" }, { - "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 4 (Store-data) Sample with: UOPS_DISPATCHED_PORT.PORT_4", - "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_4 / CORE_CLKS", - "MetricGroup": "TopdownL6;tma_store_op_utilization_group", - "MetricName": "tma_port_4", - "ScaleUnit": "100%" + "BriefDescription": "Instructions per FP Arithmetic instruction (lower number means higher occurrence rate)", + "MetricExpr": "1 / (tma_fp_scalar + tma_fp_vector)", + "MetricGroup": "Flops;InsType", + "MetricName": "tma_info_iparith", + "MetricThreshold": "tma_info_iparith < 10", + "PublicDescription": "Instructions per FP Arithmetic instruction (lower number means higher occurrence rate). May undercount due to FMA double counting. Approximated prior to BDW." }, { - "BriefDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired", - "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / SLOTS", - "MetricGroup": "TopdownL1;tma_L1_group", - "MetricName": "tma_retiring", - "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", - "ScaleUnit": "100%" + "BriefDescription": "Instructions per Branch (lower number means higher occurrence rate)", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.ALL_BRANCHES", + "MetricGroup": "Branches;Fed;InsType", + "MetricName": "tma_info_ipbranch", + "MetricThreshold": "tma_info_ipbranch < 8" }, { - "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)", - "MetricExpr": "tma_retiring - tma_heavy_operations", - "MetricGroup": "Retire;TopdownL2;tma_L2_group;tma_retiring_group", - "MetricName": "tma_light_operations", - "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 UPI 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", - "ScaleUnit": "100%" + "BriefDescription": "Instructions Per Cycle (per Logical Processor)", + "MetricExpr": "INST_RETIRED.ANY / tma_info_clks", + "MetricGroup": "Ret;Summary", + "MetricName": "tma_info_ipc" }, { - "BriefDescription": "This metric represents overall arithmetic floating-point (FP) operations fraction the CPU has executed (retired)", - "MetricExpr": "tma_x87_use + tma_fp_scalar + tma_fp_vector", - "MetricGroup": "HPC;TopdownL3;tma_light_operations_group", - "MetricName": "tma_fp_arith", - "PublicDescription": "This metric represents overall arithmetic floating-point (FP) operations fraction the CPU has executed (retired). Note this metric's value may exceed its parent due to use of \"Uops\" CountDomain and FMA double-counting.", - "ScaleUnit": "100%" + "BriefDescription": "Instructions per (near) call (lower number means higher occurrence rate)", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_CALL", + "MetricGroup": "Branches;Fed;PGO", + "MetricName": "tma_info_ipcall", + "MetricThreshold": "tma_info_ipcall < 200" }, { - "BriefDescription": "This metric serves as an approximation of legacy x87 usage", - "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS * FP_COMP_OPS_EXE.X87 / UOPS_EXECUTED.THREAD", - "MetricGroup": "Compute;TopdownL4;tma_fp_arith_group", - "MetricName": "tma_x87_use", - "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.", - "ScaleUnit": "100%" + "BriefDescription": "Instructions per Far Branch ( Far Branches apply upon transition from application to operating system, handling interrupts, exceptions) [lower number means higher occurrence rate]", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.FAR_BRANCH:u", + "MetricGroup": "Branches;OS", + "MetricName": "tma_info_ipfarbranch", + "MetricThreshold": "tma_info_ipfarbranch < 1e6" }, { - "BriefDescription": "This metric approximates arithmetic floating-point (FP) scalar uops fraction the CPU has retired", - "MetricExpr": "(FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE) / UOPS_EXECUTED.THREAD", - "MetricGroup": "Compute;Flops;TopdownL4;tma_fp_arith_group", - "MetricName": "tma_fp_scalar", - "PublicDescription": "This metric approximates arithmetic floating-point (FP) scalar uops fraction the CPU has retired. May overcount due to FMA double counting.", - "ScaleUnit": "100%" + "BriefDescription": "Instructions per Load (lower number means higher occurrence rate)", + "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_LOADS", + "MetricGroup": "InsType", + "MetricName": "tma_info_ipload", + "MetricThreshold": "tma_info_ipload < 3" }, { - "BriefDescription": "This metric approximates arithmetic floating-point (FP) vector uops fraction the CPU has retired aggregated across all vector widths", - "MetricExpr": "(FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE) / UOPS_EXECUTED.THREAD", - "MetricGroup": "Compute;Flops;TopdownL4;tma_fp_arith_group", - "MetricName": "tma_fp_vector", - "PublicDescription": "This metric approximates arithmetic floating-point (FP) vector uops fraction the CPU has retired aggregated across all vector widths. May overcount due to FMA double counting.", - "ScaleUnit": "100%" + "BriefDescription": "Instructions per retired mispredicts for indirect CALL or JMP branches (lower number means higher occurrence rate).", + "MetricExpr": "tma_info_instructions / (UOPS_RETIRED.RETIRE_SLOTS / UOPS_ISSUED.ANY * cpu@BR_MISP_EXEC.ALL_BRANCHES\\,umask\\=0xE4@)", + "MetricGroup": "Bad;BrMispredicts", + "MetricName": "tma_info_ipmisp_indirect", + "MetricThreshold": "tma_info_ipmisp_indirect < 1e3" }, { - "BriefDescription": "This metric represents fraction of slots where the CPU was retiring heavy-weight operations -- instructions that require two or more uops or microcoded sequences", - "MetricExpr": "tma_microcode_sequencer", - "MetricGroup": "Retire;TopdownL2;tma_L2_group;tma_retiring_group", - "MetricName": "tma_heavy_operations", - "PublicDescription": "This metric represents fraction of slots where the CPU was retiring heavy-weight operations -- instructions that require two or more uops or microcoded sequences. This highly-correlates with the uop length of these instructions/sequences.", - "ScaleUnit": "100%" + "BriefDescription": "Number of Instructions per non-speculative Branch Misprediction (JEClear) (lower number means higher occurrence rate)", + "MetricExpr": "INST_RETIRED.ANY / BR_MISP_RETIRED.ALL_BRANCHES", + "MetricGroup": "Bad;BadSpec;BrMispredicts", + "MetricName": "tma_info_ipmispredict", + "MetricThreshold": "tma_info_ipmispredict < 200" }, { - "BriefDescription": "This metric represents fraction of slots the CPU was retiring uops fetched by the Microcode Sequencer (MS) unit", - "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / UOPS_ISSUED.ANY * IDQ.MS_UOPS / SLOTS", - "MetricGroup": "MicroSeq;TopdownL3;tma_heavy_operations_group", - "MetricName": "tma_microcode_sequencer", - "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", - "ScaleUnit": "100%" + "BriefDescription": "Instructions per Store (lower number means higher occurrence rate)", + "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_STORES", + "MetricGroup": "InsType", + "MetricName": "tma_info_ipstore", + "MetricThreshold": "tma_info_ipstore < 8" }, { - "BriefDescription": "This metric estimates fraction of slots the CPU retired uops delivered by the Microcode_Sequencer as a result of Assists", - "MetricExpr": "100 * OTHER_ASSISTS.ANY_WB_ASSIST / SLOTS", - "MetricGroup": "TopdownL4;tma_microcode_sequencer_group", - "MetricName": "tma_assists", - "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", - "ScaleUnit": "100%" + "BriefDescription": "Instruction per taken branch", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_TAKEN", + "MetricGroup": "Branches;Fed;FetchBW;Frontend;PGO;tma_issueFB", + "MetricName": "tma_info_iptb", + "MetricThreshold": "tma_info_iptb < 9", + "PublicDescription": "Instruction per taken branch. Related metrics: tma_dsb_switches, tma_fetch_bandwidth, tma_info_dsb_coverage, tma_lcp" }, { - "BriefDescription": "This metric estimates fraction of cycles the CPU retired uops originated from CISC (complex instruction set computer) instruction", - "MetricExpr": "max(0, tma_microcode_sequencer - tma_assists)", - "MetricGroup": "TopdownL4;tma_microcode_sequencer_group", - "MetricName": "tma_cisc", - "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.", - "ScaleUnit": "100%" + "BriefDescription": "Instructions per speculative Unknown Branch Misprediction (BAClear) (lower number means higher occurrence rate)", + "MetricExpr": "tma_info_instructions / BACLEARS.ANY", + "MetricGroup": "Fed", + "MetricName": "tma_info_ipunknown_branch" }, { - "BriefDescription": "Instructions Per Cycle (per Logical Processor)", - "MetricExpr": "INST_RETIRED.ANY / CLKS", - "MetricGroup": "Ret;Summary", - "MetricName": "IPC" + "BriefDescription": "Cycles Per Instruction for the Operating System (OS) Kernel mode", + "MetricExpr": "CPU_CLK_UNHALTED.THREAD_P:k / INST_RETIRED.ANY_P:k", + "MetricGroup": "OS", + "MetricName": "tma_info_kernel_cpi" }, { - "BriefDescription": "Uops Per Instruction", - "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY", - "MetricGroup": "Pipeline;Ret;Retire", - "MetricName": "UPI" + "BriefDescription": "Fraction of cycles spent in the Operating System (OS) Kernel mode", + "MetricExpr": "CPU_CLK_UNHALTED.THREAD_P:k / CPU_CLK_UNHALTED.THREAD", + "MetricGroup": "OS", + "MetricName": "tma_info_kernel_utilization", + "MetricThreshold": "tma_info_kernel_utilization > 0.05" }, { - "BriefDescription": "Instruction per taken branch", - "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / BR_INST_RETIRED.NEAR_TAKEN", - "MetricGroup": "Branches;Fed;FetchBW", - "MetricName": "UpTB" + "BriefDescription": "Average per-core data fill bandwidth to the L1 data cache [GB / sec]", + "MetricExpr": "64 * L1D.REPLACEMENT / 1e9 / duration_time", + "MetricGroup": "Mem;MemoryBW", + "MetricName": "tma_info_l1d_cache_fill_bw" }, { - "BriefDescription": "Cycles Per Instruction (per Logical Processor)", - "MetricExpr": "1 / IPC", - "MetricGroup": "Mem;Pipeline", - "MetricName": "CPI" + "BriefDescription": "Average per-thread data fill bandwidth to the L1 data cache [GB / sec]", + "MetricExpr": "tma_info_l1d_cache_fill_bw", + "MetricGroup": "Mem;MemoryBW", + "MetricName": "tma_info_l1d_cache_fill_bw_1t" }, { - "BriefDescription": "Per-Logical Processor actual clocks when the Logical Processor is active.", - "MetricExpr": "CPU_CLK_UNHALTED.THREAD", - "MetricGroup": "Pipeline", - "MetricName": "CLKS" + "BriefDescription": "L1 cache true misses per kilo instruction for retired demand loads", + "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.L1_MISS / INST_RETIRED.ANY", + "MetricGroup": "CacheMisses;Mem", + "MetricName": "tma_info_l1mpki" }, { - "BriefDescription": "Total issue-pipeline slots (per-Physical Core till ICL; per-Logical Processor ICL onward)", - "MetricExpr": "4 * CORE_CLKS", - "MetricGroup": "tma_L1_group", - "MetricName": "SLOTS" + "BriefDescription": "Average per-core data fill bandwidth to the L2 cache [GB / sec]", + "MetricExpr": "64 * L2_LINES_IN.ALL / 1e9 / duration_time", + "MetricGroup": "Mem;MemoryBW", + "MetricName": "tma_info_l2_cache_fill_bw" }, { - "BriefDescription": "The ratio of Executed- by Issued-Uops", - "MetricExpr": "UOPS_EXECUTED.THREAD / UOPS_ISSUED.ANY", - "MetricGroup": "Cor;Pipeline", - "MetricName": "Execute_per_Issue", - "PublicDescription": "The ratio of Executed- by Issued-Uops. Ratio > 1 suggests high rate of uop micro-fusions. Ratio < 1 suggest high rate of \"execute\" at rename stage." + "BriefDescription": "Average per-thread data fill bandwidth to the L2 cache [GB / sec]", + "MetricExpr": "tma_info_l2_cache_fill_bw", + "MetricGroup": "Mem;MemoryBW", + "MetricName": "tma_info_l2_cache_fill_bw_1t" }, { - "BriefDescription": "Instructions Per Cycle across hyper-threads (per physical core)", - "MetricExpr": "INST_RETIRED.ANY / CORE_CLKS", - "MetricGroup": "Ret;SMT;tma_L1_group", - "MetricName": "CoreIPC" + "BriefDescription": "L2 cache true misses per kilo instruction for retired demand loads", + "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.L2_MISS / INST_RETIRED.ANY", + "MetricGroup": "Backend;CacheMisses;Mem", + "MetricName": "tma_info_l2mpki" }, { - "BriefDescription": "Floating Point Operations Per Cycle", - "MetricExpr": "(FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE + 2 * FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + 4 * (FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE) + 8 * SIMD_FP_256.PACKED_SINGLE) / CORE_CLKS", - "MetricGroup": "Flops;Ret", - "MetricName": "FLOPc" + "BriefDescription": "Average per-thread data access bandwidth to the L3 cache [GB / sec]", + "MetricExpr": "0", + "MetricGroup": "Mem;MemoryBW;Offcore", + "MetricName": "tma_info_l3_cache_access_bw_1t" }, { - "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is execution) per-core", - "MetricExpr": "UOPS_EXECUTED.THREAD / (cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2 if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)", - "MetricGroup": "Backend;Cor;Pipeline;PortsUtil", - "MetricName": "ILP" + "BriefDescription": "Average per-core data fill bandwidth to the L3 cache [GB / sec]", + "MetricExpr": "64 * LONGEST_LAT_CACHE.MISS / 1e9 / duration_time", + "MetricGroup": "Mem;MemoryBW", + "MetricName": "tma_info_l3_cache_fill_bw" }, { - "BriefDescription": "Core actual clocks when any Logical Processor is active on the Physical Core", - "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 CLKS))", - "MetricGroup": "SMT", - "MetricName": "CORE_CLKS" + "BriefDescription": "Average per-thread data fill bandwidth to the L3 cache [GB / sec]", + "MetricExpr": "tma_info_l3_cache_fill_bw", + "MetricGroup": "Mem;MemoryBW", + "MetricName": "tma_info_l3_cache_fill_bw_1t" }, { - "BriefDescription": "Instructions per Load (lower number means higher occurrence rate)", - "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_LOADS", - "MetricGroup": "InsType", - "MetricName": "IpLoad" + "BriefDescription": "L3 cache true misses per kilo instruction for retired demand loads", + "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.LLC_MISS / INST_RETIRED.ANY", + "MetricGroup": "CacheMisses;Mem", + "MetricName": "tma_info_l3mpki" }, { - "BriefDescription": "Instructions per Store (lower number means higher occurrence rate)", - "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_STORES", - "MetricGroup": "InsType", - "MetricName": "IpStore" + "BriefDescription": "Average Latency for L2 cache miss demand Loads", + "MetricExpr": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD / OFFCORE_REQUESTS.DEMAND_DATA_RD", + "MetricGroup": "Memory_Lat;Offcore", + "MetricName": "tma_info_load_l2_miss_latency" }, { - "BriefDescription": "Instructions per Branch (lower number means higher occurrence rate)", - "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.ALL_BRANCHES", - "MetricGroup": "Branches;Fed;InsType", - "MetricName": "IpBranch" + "BriefDescription": "Average Parallel L2 cache miss demand Loads", + "MetricExpr": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD / OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD", + "MetricGroup": "Memory_BW;Offcore", + "MetricName": "tma_info_load_l2_mlp" }, { - "BriefDescription": "Instructions per (near) call (lower number means higher occurrence rate)", - "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_CALL", - "MetricGroup": "Branches;Fed;PGO", - "MetricName": "IpCall" + "BriefDescription": "Actual Average Latency for L1 data-cache miss demand load operations (in core cycles)", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "L1D_PEND_MISS.PENDING / (MEM_LOAD_UOPS_RETIRED.L1_MISS + MEM_LOAD_UOPS_RETIRED.HIT_LFB)", + "MetricGroup": "Mem;MemoryBound;MemoryLat", + "MetricName": "tma_info_load_miss_real_latency" }, { - "BriefDescription": "Instruction per taken branch", - "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_TAKEN", - "MetricGroup": "Branches;Fed;FetchBW;Frontend;PGO", - "MetricName": "IpTB" + "BriefDescription": "Average number of parallel data read requests to external memory", + "MetricExpr": "UNC_C_TOR_OCCUPANCY.MISS_OPCODE@filter_opc\\=0x182@ / UNC_C_TOR_OCCUPANCY.MISS_OPCODE@filter_opc\\=0x182\\,thresh\\=1@", + "MetricGroup": "Mem;MemoryBW;SoC", + "MetricName": "tma_info_mem_parallel_reads", + "PublicDescription": "Average number of parallel data read requests to external memory. Accounts for demand loads and L1/L2 prefetches" }, { - "BriefDescription": "Branch instructions per taken branch. ", - "MetricExpr": "BR_INST_RETIRED.ALL_BRANCHES / BR_INST_RETIRED.NEAR_TAKEN", - "MetricGroup": "Branches;Fed;PGO", - "MetricName": "BpTkBranch" + "BriefDescription": "Average latency of data read request to external memory (in nanoseconds)", + "MetricExpr": "1e9 * (UNC_C_TOR_OCCUPANCY.MISS_OPCODE@filter_opc\\=0x182@ / UNC_C_TOR_INSERTS.MISS_OPCODE@filter_opc\\=0x182@) / (tma_info_socket_clks / duration_time)", + "MetricGroup": "Mem;MemoryLat;SoC", + "MetricName": "tma_info_mem_read_latency", + "PublicDescription": "Average latency of data read request to external memory (in nanoseconds). Accounts for demand loads and L1/L2 prefetches. ([RKL+]memory-controller only)" }, { - "BriefDescription": "Instructions per FP Arithmetic instruction (lower number means higher occurrence rate)", - "MetricExpr": "1 / (tma_fp_scalar + tma_fp_vector)", - "MetricGroup": "Flops;InsType", - "MetricName": "IpArith", - "PublicDescription": "Instructions per FP Arithmetic instruction (lower number means higher occurrence rate). May undercount due to FMA double counting. Approximated prior to BDW." + "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "L1D_PEND_MISS.PENDING / L1D_PEND_MISS.PENDING_CYCLES", + "MetricGroup": "Mem;MemoryBW;MemoryBound", + "MetricName": "tma_info_mlp", + "PublicDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss. Per-Logical Processor)" }, { - "BriefDescription": "Total number of retired Instructions Sample with: INST_RETIRED.PREC_DIST", - "MetricExpr": "INST_RETIRED.ANY", - "MetricGroup": "Summary;tma_L1_group", - "MetricName": "Instructions" + "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses", + "MetricExpr": "(ITLB_MISSES.WALK_DURATION + DTLB_LOAD_MISSES.WALK_DURATION + DTLB_STORE_MISSES.WALK_DURATION) / tma_info_core_clks", + "MetricGroup": "Mem;MemoryTLB", + "MetricName": "tma_info_page_walks_utilization", + "MetricThreshold": "tma_info_page_walks_utilization > 0.5" }, { "BriefDescription": "Average number of Uops retired in cycles where at least one uop has retired.", "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / cpu@UOPS_RETIRED.RETIRE_SLOTS\\,cmask\\=1@", "MetricGroup": "Pipeline;Ret", - "MetricName": "Retire" + "MetricName": "tma_info_retire" }, { - "BriefDescription": "", - "MetricExpr": "UOPS_EXECUTED.THREAD / cpu@UOPS_EXECUTED.THREAD\\,cmask\\=1@", - "MetricGroup": "Cor;Pipeline;PortsUtil;SMT", - "MetricName": "Execute" + "BriefDescription": "Total issue-pipeline slots (per-Physical Core till ICL; per-Logical Processor ICL onward)", + "MetricExpr": "4 * tma_info_core_clks", + "MetricGroup": "TmaL1;tma_L1_group", + "MetricName": "tma_info_slots" }, { - "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache)", - "MetricExpr": "IDQ.DSB_UOPS / (IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS)", - "MetricGroup": "DSB;Fed;FetchBW", - "MetricName": "DSB_Coverage" + "BriefDescription": "Fraction of cycles where both hardware Logical Processors were active", + "MetricExpr": "(1 - CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / (CPU_CLK_UNHALTED.REF_XCLK_ANY / 2) if #SMT_on else 0)", + "MetricGroup": "SMT", + "MetricName": "tma_info_smt_2t_utilization" }, { - "BriefDescription": "Number of Instructions per non-speculative Branch Misprediction (JEClear) (lower number means higher occurrence rate)", - "MetricExpr": "INST_RETIRED.ANY / BR_MISP_RETIRED.ALL_BRANCHES", - "MetricGroup": "Bad;BadSpec;BrMispredicts", - "MetricName": "IpMispredict" + "BriefDescription": "Socket actual clocks when any core is active on that socket", + "MetricExpr": "cbox_0@event\\=0x0@", + "MetricGroup": "SoC", + "MetricName": "tma_info_socket_clks" }, { - "BriefDescription": "Actual Average Latency for L1 data-cache miss demand load operations (in core cycles)", - "MetricExpr": "L1D_PEND_MISS.PENDING / (MEM_LOAD_UOPS_RETIRED.L1_MISS + MEM_LOAD_UOPS_RETIRED.HIT_LFB)", - "MetricGroup": "Mem;MemoryBound;MemoryLat", - "MetricName": "Load_Miss_Real_Latency" + "BriefDescription": "Average Frequency Utilization relative nominal frequency", + "MetricExpr": "tma_info_clks / CPU_CLK_UNHALTED.REF_TSC", + "MetricGroup": "Power", + "MetricName": "tma_info_turbo_utilization" }, { - "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss. Per-Logical Processor)", - "MetricExpr": "L1D_PEND_MISS.PENDING / L1D_PEND_MISS.PENDING_CYCLES", - "MetricGroup": "Mem;MemoryBW;MemoryBound", - "MetricName": "MLP" + "BriefDescription": "Uops Per Instruction", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY", + "MetricGroup": "Pipeline;Ret;Retire", + "MetricName": "tma_info_uoppi", + "MetricThreshold": "tma_info_uoppi > 1.05" }, { - "BriefDescription": "L1 cache true misses per kilo instruction for retired demand loads", - "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.L1_MISS / INST_RETIRED.ANY", - "MetricGroup": "CacheMisses;Mem", - "MetricName": "L1MPKI" + "BriefDescription": "Instruction per taken branch", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / BR_INST_RETIRED.NEAR_TAKEN", + "MetricGroup": "Branches;Fed;FetchBW", + "MetricName": "tma_info_uptb", + "MetricThreshold": "tma_info_uptb < 6" }, { - "BriefDescription": "L2 cache true misses per kilo instruction for retired demand loads", - "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.L2_MISS / INST_RETIRED.ANY", - "MetricGroup": "Backend;CacheMisses;Mem", - "MetricName": "L2MPKI" + "BriefDescription": "This metric represents fraction of cycles the CPU was stalled due to Instruction TLB (ITLB) misses", + "MetricExpr": "(12 * ITLB_MISSES.STLB_HIT + ITLB_MISSES.WALK_DURATION) / tma_info_clks", + "MetricGroup": "BigFoot;FetchLat;MemoryTLB;TopdownL3;tma_L3_group;tma_fetch_latency_group", + "MetricName": "tma_itlb_misses", + "MetricThreshold": "tma_itlb_misses > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)", + "PublicDescription": "This metric represents fraction of cycles the CPU was stalled due to Instruction TLB (ITLB) misses. Sample with: ITLB_MISSES.WALK_COMPLETED", + "ScaleUnit": "100%" }, { - "BriefDescription": "L3 cache true misses per kilo instruction for retired demand loads", - "MetricExpr": "1e3 * MEM_LOAD_UOPS_RETIRED.LLC_MISS / INST_RETIRED.ANY", - "MetricGroup": "CacheMisses;Mem", - "MetricName": "L3MPKI" + "BriefDescription": "This metric estimates how often the CPU was stalled without loads missing the L1 data cache", + "MetricExpr": "max((min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING) - CYCLE_ACTIVITY.STALLS_L1D_PENDING) / tma_info_clks, 0)", + "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_issueL1;tma_issueMC;tma_memory_bound_group", + "MetricName": "tma_l1_bound", + "MetricThreshold": "tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses", - "MetricConstraint": "NO_NMI_WATCHDOG", - "MetricExpr": "(ITLB_MISSES.WALK_DURATION + DTLB_LOAD_MISSES.WALK_DURATION + DTLB_STORE_MISSES.WALK_DURATION) / CORE_CLKS", - "MetricGroup": "Mem;MemoryTLB", - "MetricName": "Page_Walks_Utilization" + "BriefDescription": "This metric estimates how often the CPU was stalled due to L2 cache accesses by loads", + "MetricExpr": "(CYCLE_ACTIVITY.STALLS_L1D_PENDING - CYCLE_ACTIVITY.STALLS_L2_PENDING) / tma_info_clks", + "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_memory_bound_group", + "MetricName": "tma_l2_bound", + "MetricThreshold": "tma_l2_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average per-core data fill bandwidth to the L1 data cache [GB / sec]", - "MetricExpr": "64 * L1D.REPLACEMENT / 1e9 / duration_time", - "MetricGroup": "Mem;MemoryBW", - "MetricName": "L1D_Cache_Fill_BW" + "BriefDescription": "This metric estimates how often the CPU was stalled due to loads accesses to L3 cache or contended with a sibling Core", + "MetricConstraint": "NO_GROUP_EVENTS_SMT", + "MetricExpr": "MEM_LOAD_UOPS_RETIRED.LLC_HIT / (MEM_LOAD_UOPS_RETIRED.LLC_HIT + 7 * MEM_LOAD_UOPS_RETIRED.LLC_MISS) * CYCLE_ACTIVITY.STALLS_L2_PENDING / tma_info_clks", + "MetricGroup": "CacheMisses;MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_memory_bound_group", + "MetricName": "tma_l3_bound", + "MetricThreshold": "tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average per-core data fill bandwidth to the L2 cache [GB / sec]", - "MetricExpr": "64 * L2_LINES_IN.ALL / 1e9 / duration_time", - "MetricGroup": "Mem;MemoryBW", - "MetricName": "L2_Cache_Fill_BW" + "BriefDescription": "This metric represents fraction of cycles with demand load accesses that hit the L3 cache under unloaded scenarios (possibly L3 latency limited)", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "41 * (MEM_LOAD_UOPS_RETIRED.LLC_HIT * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD))) / tma_info_clks", + "MetricGroup": "MemoryLat;TopdownL4;tma_L4_group;tma_issueLat;tma_l3_bound_group", + "MetricName": "tma_l3_hit_latency", + "MetricThreshold": "tma_l3_hit_latency > 0.1 & (tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average per-core data fill bandwidth to the L3 cache [GB / sec]", - "MetricExpr": "64 * LONGEST_LAT_CACHE.MISS / 1e9 / duration_time", - "MetricGroup": "Mem;MemoryBW", - "MetricName": "L3_Cache_Fill_BW" + "BriefDescription": "This metric represents fraction of cycles CPU was stalled due to Length Changing Prefixes (LCPs)", + "MetricExpr": "ILD_STALL.LCP / tma_info_clks", + "MetricGroup": "FetchLat;TopdownL3;tma_L3_group;tma_fetch_latency_group;tma_issueFB", + "MetricName": "tma_lcp", + "MetricThreshold": "tma_lcp > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)", + "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_dsb_coverage, tma_info_iptb", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average per-thread data fill bandwidth to the L1 data cache [GB / sec]", - "MetricExpr": "L1D_Cache_Fill_BW", - "MetricGroup": "Mem;MemoryBW", - "MetricName": "L1D_Cache_Fill_BW_1T" + "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)", + "MetricExpr": "tma_retiring - tma_heavy_operations", + "MetricGroup": "Retire;TmaL2;TopdownL2;tma_L2_group;tma_retiring_group", + "MetricName": "tma_light_operations", + "MetricThreshold": "tma_light_operations > 0.6", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average per-thread data fill bandwidth to the L2 cache [GB / sec]", - "MetricExpr": "L2_Cache_Fill_BW", - "MetricGroup": "Mem;MemoryBW", - "MetricName": "L2_Cache_Fill_BW_1T" + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Load operations", + "MetricConstraint": "NO_GROUP_EVENTS_NMI", + "MetricExpr": "(UOPS_DISPATCHED_PORT.PORT_2 + UOPS_DISPATCHED_PORT.PORT_3 - UOPS_DISPATCHED_PORT.PORT_4) / (2 * tma_info_core_clks)", + "MetricGroup": "TopdownL5;tma_L5_group;tma_ports_utilized_3m_group", + "MetricName": "tma_load_op_utilization", + "MetricThreshold": "tma_load_op_utilization > 0.6", + "PublicDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Load operations. Sample with: UOPS_DISPATCHED.PORT_2_3", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average per-thread data fill bandwidth to the L3 cache [GB / sec]", - "MetricExpr": "L3_Cache_Fill_BW", - "MetricGroup": "Mem;MemoryBW", - "MetricName": "L3_Cache_Fill_BW_1T" + "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling loads from local memory", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "200 * (MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD))) / tma_info_clks", + "MetricGroup": "Server;TopdownL5;tma_L5_group;tma_mem_latency_group", + "MetricName": "tma_local_dram", + "MetricThreshold": "tma_local_dram > 0.1 & (tma_mem_latency > 0.1 & (tma_dram_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)))", + "PublicDescription": "This metric estimates fraction of cycles while the memory subsystem was handling loads from local memory. Caching will improve the latency and increase performance. Sample with: MEM_LOAD_UOPS_L3_MISS_RETIRED.LOCAL_DRAM_PS", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average per-thread data access bandwidth to the L3 cache [GB / sec]", - "MetricExpr": "0", - "MetricGroup": "Mem;MemoryBW;Offcore", - "MetricName": "L3_Cache_Access_BW_1T" + "BriefDescription": "This metric represents fraction of cycles the CPU spent handling cache misses due to lock operations", + "MetricConstraint": "NO_GROUP_EVENTS", + "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_clks", + "MetricGroup": "Offcore;TopdownL4;tma_L4_group;tma_issueRFO;tma_l1_bound_group", + "MetricName": "tma_lock_latency", + "MetricThreshold": "tma_lock_latency > 0.2 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average CPU Utilization", - "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / TSC", - "MetricGroup": "HPC;Summary", - "MetricName": "CPU_Utilization" + "BriefDescription": "This metric represents fraction of slots the CPU has wasted due to Machine Clears", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "tma_bad_speculation - tma_branch_mispredicts", + "MetricGroup": "BadSpec;MachineClears;TmaL2;TopdownL2;tma_L2_group;tma_bad_speculation_group;tma_issueMC;tma_issueSyncxn", + "MetricName": "tma_machine_clears", + "MetricThreshold": "tma_machine_clears > 0.1 & tma_bad_speculation > 0.15", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Measured Average Frequency for unhalted processors [GHz]", - "MetricExpr": "Turbo_Utilization * TSC / 1e9 / duration_time", - "MetricGroup": "Power;Summary", - "MetricName": "Average_Frequency" + "BriefDescription": "This metric estimates fraction of cycles where the core's performance was likely hurt due to approaching bandwidth limits of external memory (DRAM)", + "MetricExpr": "min(CPU_CLK_UNHALTED.THREAD, cpu@OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD\\,cmask\\=6@) / tma_info_clks", + "MetricGroup": "MemoryBW;Offcore;TopdownL4;tma_L4_group;tma_dram_bound_group;tma_issueBW", + "MetricName": "tma_mem_bandwidth", + "MetricThreshold": "tma_mem_bandwidth > 0.2 & (tma_dram_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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_dram_bw_use, tma_sq_full", + "ScaleUnit": "100%" }, { - "BriefDescription": "Giga Floating Point Operations Per Second", - "MetricExpr": "(FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE + 2 * FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + 4 * (FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE) + 8 * SIMD_FP_256.PACKED_SINGLE) / 1e9 / duration_time", - "MetricGroup": "Cor;Flops;HPC", - "MetricName": "GFLOPs", - "PublicDescription": "Giga Floating Point Operations Per Second. Aggregate across all supported options of: FP precisions, scalar and vector instructions, vector-width and AMX engine." + "BriefDescription": "This metric estimates fraction of cycles where the performance was likely hurt due to latency from external memory (DRAM)", + "MetricExpr": "min(CPU_CLK_UNHALTED.THREAD, OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD) / tma_info_clks - tma_mem_bandwidth", + "MetricGroup": "MemoryLat;Offcore;TopdownL4;tma_L4_group;tma_dram_bound_group;tma_issueLat", + "MetricName": "tma_mem_latency", + "MetricThreshold": "tma_mem_latency > 0.1 & (tma_dram_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average Frequency Utilization relative nominal frequency", - "MetricExpr": "CLKS / CPU_CLK_UNHALTED.REF_TSC", - "MetricGroup": "Power", - "MetricName": "Turbo_Utilization" + "BriefDescription": "This metric represents fraction of slots the Memory subsystem within the Backend was a bottleneck", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "(min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.STALLS_LDM_PENDING) + RESOURCE_STALLS.SB) / (min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) + UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC - (UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC if tma_info_ipc > 1.8 else UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC) - (RS_EVENTS.EMPTY_CYCLES if tma_fetch_latency > 0.1 else 0) + RESOURCE_STALLS.SB) * tma_backend_bound", + "MetricGroup": "Backend;TmaL2;TopdownL2;tma_L2_group;tma_backend_bound_group", + "MetricName": "tma_memory_bound", + "MetricThreshold": "tma_memory_bound > 0.2 & tma_backend_bound > 0.2", + "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).", + "ScaleUnit": "100%" }, { - "BriefDescription": "Fraction of cycles where both hardware Logical Processors were active", - "MetricExpr": "(1 - CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / (CPU_CLK_UNHALTED.REF_XCLK_ANY / 2) if #SMT_on else 0)", - "MetricGroup": "SMT", - "MetricName": "SMT_2T_Utilization" + "BriefDescription": "This metric represents fraction of slots the CPU was retiring uops fetched by the Microcode Sequencer (MS) unit", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / UOPS_ISSUED.ANY * IDQ.MS_UOPS / tma_info_slots", + "MetricGroup": "MicroSeq;TopdownL3;tma_L3_group;tma_heavy_operations_group;tma_issueMC;tma_issueMS", + "MetricName": "tma_microcode_sequencer", + "MetricThreshold": "tma_microcode_sequencer > 0.05 & tma_heavy_operations > 0.1", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Fraction of cycles spent in the Operating System (OS) Kernel mode", - "MetricExpr": "CPU_CLK_UNHALTED.THREAD_P:k / CPU_CLK_UNHALTED.THREAD", - "MetricGroup": "OS", - "MetricName": "Kernel_Utilization" + "BriefDescription": "This metric represents Core fraction of cycles in which CPU was likely limited due to the MITE pipeline (the legacy decode pipeline)", + "MetricExpr": "(IDQ.ALL_MITE_CYCLES_ANY_UOPS - IDQ.ALL_MITE_CYCLES_4_UOPS) / tma_info_core_clks / 2", + "MetricGroup": "DSBmiss;FetchBW;TopdownL3;tma_L3_group;tma_fetch_bandwidth_group", + "MetricName": "tma_mite", + "MetricThreshold": "tma_mite > 0.1 & (tma_fetch_bandwidth > 0.1 & tma_frontend_bound > 0.15 & tma_info_ipc / 4 > 0.35)", + "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.", + "ScaleUnit": "100%" }, { - "BriefDescription": "Cycles Per Instruction for the Operating System (OS) Kernel mode", - "MetricExpr": "CPU_CLK_UNHALTED.THREAD_P:k / INST_RETIRED.ANY_P:k", - "MetricGroup": "OS", - "MetricName": "Kernel_CPI" + "BriefDescription": "This metric estimates the fraction of cycles when the CPU was stalled due to switches of uop delivery to the Microcode Sequencer (MS)", + "MetricExpr": "3 * IDQ.MS_SWITCHES / tma_info_clks", + "MetricGroup": "FetchLat;MicroSeq;TopdownL3;tma_L3_group;tma_fetch_latency_group;tma_issueMC;tma_issueMS;tma_issueMV;tma_issueSO", + "MetricName": "tma_ms_switches", + "MetricThreshold": "tma_ms_switches > 0.05 & (tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15)", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]", - "MetricExpr": "64 * (UNC_M_CAS_COUNT.RD + UNC_M_CAS_COUNT.WR) / 1e9 / duration_time", - "MetricGroup": "HPC;Mem;MemoryBW;SoC", - "MetricName": "DRAM_BW_Use" + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 0 ([SNB+] ALU; [HSW+] ALU and 2nd branch)", + "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_0 / tma_info_core_clks", + "MetricGroup": "Compute;TopdownL6;tma_L6_group;tma_alu_op_utilization_group;tma_issue2P", + "MetricName": "tma_port_0", + "MetricThreshold": "tma_port_0 > 0.6", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average latency of data read request to external memory (in nanoseconds). Accounts for demand loads and L1/L2 prefetches", - "MetricExpr": "1e9 * (UNC_C_TOR_OCCUPANCY.MISS_OPCODE@filter_opc\\=0x182@ / UNC_C_TOR_INSERTS.MISS_OPCODE@filter_opc\\=0x182@) / (Socket_CLKS / duration_time)", - "MetricGroup": "Mem;MemoryLat;SoC", - "MetricName": "MEM_Read_Latency" + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 1 (ALU)", + "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_1 / tma_info_core_clks", + "MetricGroup": "TopdownL6;tma_L6_group;tma_alu_op_utilization_group;tma_issue2P", + "MetricName": "tma_port_1", + "MetricThreshold": "tma_port_1 > 0.6", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Average number of parallel data read requests to external memory. Accounts for demand loads and L1/L2 prefetches", - "MetricExpr": "UNC_C_TOR_OCCUPANCY.MISS_OPCODE@filter_opc\\=0x182@ / UNC_C_TOR_OCCUPANCY.MISS_OPCODE@filter_opc\\=0x182\\,thresh\\=1@", - "MetricGroup": "Mem;MemoryBW;SoC", - "MetricName": "MEM_Parallel_Reads" + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 2 ([SNB+]Loads and Store-address; [ICL+] Loads)", + "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_2 / tma_info_core_clks", + "MetricGroup": "TopdownL6;tma_L6_group;tma_load_op_utilization_group", + "MetricName": "tma_port_2", + "MetricThreshold": "tma_port_2 > 0.6", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Socket actual clocks when any core is active on that socket", - "MetricExpr": "cbox_0@event\\=0x0@", - "MetricGroup": "SoC", - "MetricName": "Socket_CLKS" + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 3 ([SNB+]Loads and Store-address; [ICL+] Loads)", + "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_3 / tma_info_core_clks", + "MetricGroup": "TopdownL6;tma_L6_group;tma_load_op_utilization_group", + "MetricName": "tma_port_3", + "MetricThreshold": "tma_port_3 > 0.6", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Instructions per Far Branch ( Far Branches apply upon transition from application to operating system, handling interrupts, exceptions) [lower number means higher occurrence rate]", - "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.FAR_BRANCH:u", - "MetricGroup": "Branches;OS", - "MetricName": "IpFarBranch" + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 4 (Store-data)", + "MetricExpr": "tma_store_op_utilization", + "MetricGroup": "TopdownL6;tma_L6_group;tma_issueSpSt;tma_store_op_utilization_group", + "MetricName": "tma_port_4", + "MetricThreshold": "tma_port_4 > 0.6", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "Uncore frequency per die [GHZ]", - "MetricExpr": "Socket_CLKS / #num_dies / duration_time / 1e9", - "MetricGroup": "SoC", - "MetricName": "UNCORE_FREQ" + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port 5 ([SNB+] Branches and ALU; [HSW+] ALU)", + "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_5 / tma_info_core_clks", + "MetricGroup": "TopdownL6;tma_L6_group;tma_alu_op_utilization_group;tma_issue2P", + "MetricName": "tma_port_5", + "MetricThreshold": "tma_port_5 > 0.6", + "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", + "ScaleUnit": "100%" }, { - "BriefDescription": "C3 residency percent per core", - "MetricExpr": "cstate_core@c3\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C3_Core_Residency", + "BriefDescription": "This metric estimates fraction of cycles the CPU performance was potentially limited due to Core computation issues (non divider-related)", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "(min(CPU_CLK_UNHALTED.THREAD, CYCLE_ACTIVITY.CYCLES_NO_EXECUTE) + UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC - (UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC if tma_info_ipc > 1.8 else UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC) - (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_clks", + "MetricGroup": "PortsUtil;TopdownL3;tma_L3_group;tma_core_bound_group", + "MetricName": "tma_ports_utilization", + "MetricThreshold": "tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2)", + "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.", "ScaleUnit": "100%" }, { - "BriefDescription": "C6 residency percent per core", - "MetricExpr": "cstate_core@c6\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C6_Core_Residency", + "BriefDescription": "This metric represents fraction of cycles CPU executed no uops on any execution port (Logical Processor cycles since ICL, Physical Core cycles otherwise)", + "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_clks)", + "MetricGroup": "PortsUtil;TopdownL4;tma_L4_group;tma_ports_utilization_group", + "MetricName": "tma_ports_utilized_0", + "MetricThreshold": "tma_ports_utilized_0 > 0.2 & (tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2))", + "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.", "ScaleUnit": "100%" }, { - "BriefDescription": "C7 residency percent per core", - "MetricExpr": "cstate_core@c7\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C7_Core_Residency", + "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)", + "MetricExpr": "((cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ - cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@) / 2 if #SMT_on else (UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC - UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC) / tma_info_core_clks)", + "MetricGroup": "PortsUtil;TopdownL4;tma_L4_group;tma_issueL1;tma_ports_utilization_group", + "MetricName": "tma_ports_utilized_1", + "MetricThreshold": "tma_ports_utilized_1 > 0.2 & (tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2))", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "C2 residency percent per package", - "MetricExpr": "cstate_pkg@c2\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C2_Pkg_Residency", + "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)", + "MetricExpr": "((cpu@UOPS_EXECUTED.CORE\\,cmask\\=2@ - cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@) / 2 if #SMT_on else (UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC - UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC) / tma_info_core_clks)", + "MetricGroup": "PortsUtil;TopdownL4;tma_L4_group;tma_issue2P;tma_ports_utilization_group", + "MetricName": "tma_ports_utilized_2", + "MetricThreshold": "tma_ports_utilized_2 > 0.15 & (tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2))", + "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", "ScaleUnit": "100%" }, { - "BriefDescription": "C3 residency percent per package", - "MetricExpr": "cstate_pkg@c3\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C3_Pkg_Residency", + "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).", + "MetricExpr": "(cpu@UOPS_EXECUTED.CORE\\,cmask\\=3@ / 2 if #SMT_on else UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC) / tma_info_core_clks", + "MetricGroup": "PortsUtil;TopdownL4;tma_L4_group;tma_ports_utilization_group", + "MetricName": "tma_ports_utilized_3m", + "MetricThreshold": "tma_ports_utilized_3m > 0.7 & (tma_ports_utilization > 0.15 & (tma_core_bound > 0.1 & tma_backend_bound > 0.2))", "ScaleUnit": "100%" }, { - "BriefDescription": "C6 residency percent per package", - "MetricExpr": "cstate_pkg@c6\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C6_Pkg_Residency", + "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling loads from remote cache in other sockets including synchronizations issues", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "(200 * (MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD))) + 180 * (MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD)))) / tma_info_clks", + "MetricGroup": "Offcore;Server;Snoop;TopdownL5;tma_L5_group;tma_issueSyncxn;tma_mem_latency_group", + "MetricName": "tma_remote_cache", + "MetricThreshold": "tma_remote_cache > 0.05 & (tma_mem_latency > 0.1 & (tma_dram_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)))", + "PublicDescription": "This metric estimates fraction of cycles while the memory subsystem was handling loads from remote cache in other sockets including synchronizations issues. This is caused often due to non-optimal NUMA allocations. #link to NUMA article. Sample with: MEM_LOAD_UOPS_L3_MISS_RETIRED.REMOTE_HITM_PS;MEM_LOAD_UOPS_L3_MISS_RETIRED.REMOTE_FWD_PS. Related metrics: tma_contested_accesses, tma_data_sharing, tma_false_sharing, tma_machine_clears", "ScaleUnit": "100%" }, { - "BriefDescription": "C7 residency percent per package", - "MetricExpr": "cstate_pkg@c7\\-residency@ / TSC", - "MetricGroup": "Power", - "MetricName": "C7_Pkg_Residency", + "BriefDescription": "This metric estimates fraction of cycles while the memory subsystem was handling loads from remote memory", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "310 * (MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM * (1 + MEM_LOAD_UOPS_RETIRED.HIT_LFB / (MEM_LOAD_UOPS_RETIRED.L2_HIT + MEM_LOAD_UOPS_RETIRED.LLC_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM + MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS + MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITM + MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWD))) / tma_info_clks", + "MetricGroup": "Server;Snoop;TopdownL5;tma_L5_group;tma_mem_latency_group", + "MetricName": "tma_remote_dram", + "MetricThreshold": "tma_remote_dram > 0.1 & (tma_mem_latency > 0.1 & (tma_dram_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)))", + "PublicDescription": "This metric estimates fraction of cycles while the memory subsystem was handling loads from remote memory. This is caused often due to non-optimal NUMA allocations. #link to NUMA article. Sample with: MEM_LOAD_UOPS_L3_MISS_RETIRED.REMOTE_DRAM_PS", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / tma_info_slots", + "MetricGroup": "TmaL1;TopdownL1;tma_L1_group", + "MetricName": "tma_retiring", + "MetricThreshold": "tma_retiring > 0.7 | tma_heavy_operations > 0.1", + "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", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This metric estimates fraction of cycles handling memory load split accesses - load that cross 64-byte cache line boundary", + "MetricConstraint": "NO_GROUP_EVENTS", + "MetricExpr": "13 * LD_BLOCKS.NO_SR / tma_info_clks", + "MetricGroup": "TopdownL4;tma_L4_group;tma_l1_bound_group", + "MetricName": "tma_split_loads", + "MetricThreshold": "tma_split_loads > 0.2 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This metric represents rate of split store accesses", + "MetricExpr": "2 * MEM_UOPS_RETIRED.SPLIT_STORES / tma_info_core_clks", + "MetricGroup": "TopdownL4;tma_L4_group;tma_issueSpSt;tma_store_bound_group", + "MetricName": "tma_split_stores", + "MetricThreshold": "tma_split_stores > 0.2 & (tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" + }, + { + "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)", + "MetricExpr": "(OFFCORE_REQUESTS_BUFFER.SQ_FULL / 2 if #SMT_on else OFFCORE_REQUESTS_BUFFER.SQ_FULL) / tma_info_core_clks", + "MetricGroup": "MemoryBW;Offcore;TopdownL4;tma_L4_group;tma_issueBW;tma_l3_bound_group", + "MetricName": "tma_sq_full", + "MetricThreshold": "tma_sq_full > 0.3 & (tma_l3_bound > 0.05 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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_dram_bw_use, tma_mem_bandwidth", + "ScaleUnit": "100%" + }, + { + "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", + "MetricExpr": "RESOURCE_STALLS.SB / tma_info_clks", + "MetricGroup": "MemoryBound;TmaL3mem;TopdownL3;tma_L3_group;tma_memory_bound_group", + "MetricName": "tma_store_bound", + "MetricThreshold": "tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2)", + "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", + "ScaleUnit": "100%" + }, + { + "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", + "MetricExpr": "13 * LD_BLOCKS.STORE_FORWARD / tma_info_clks", + "MetricGroup": "TopdownL4;tma_L4_group;tma_l1_bound_group", + "MetricName": "tma_store_fwd_blk", + "MetricThreshold": "tma_store_fwd_blk > 0.1 & (tma_l1_bound > 0.1 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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.", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This metric estimates fraction of cycles the CPU spent handling L1D store misses", + "MetricConstraint": "NO_GROUP_EVENTS", + "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_clks", + "MetricGroup": "MemoryLat;Offcore;TopdownL4;tma_L4_group;tma_issueRFO;tma_issueSL;tma_store_bound_group", + "MetricName": "tma_store_latency", + "MetricThreshold": "tma_store_latency > 0.1 & (tma_store_bound > 0.2 & (tma_memory_bound > 0.2 & tma_backend_bound > 0.2))", + "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", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This metric represents Core fraction of cycles CPU dispatched uops on execution port for Store operations", + "MetricExpr": "UOPS_DISPATCHED_PORT.PORT_4 / tma_info_core_clks", + "MetricGroup": "TopdownL5;tma_L5_group;tma_ports_utilized_3m_group", + "MetricName": "tma_store_op_utilization", + "MetricThreshold": "tma_store_op_utilization > 0.6", + "ScaleUnit": "100%" + }, + { + "BriefDescription": "This metric serves as an approximation of legacy x87 usage", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS * FP_COMP_OPS_EXE.X87 / UOPS_EXECUTED.THREAD", + "MetricGroup": "Compute;TopdownL4;tma_L4_group;tma_fp_arith_group", + "MetricName": "tma_x87_use", + "MetricThreshold": "tma_x87_use > 0.1 & (tma_fp_arith > 0.2 & tma_light_operations > 0.6)", + "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.", "ScaleUnit": "100%" } ]
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 23/51 perf vendor events intel: Refresh jaketown events
In reply to Ian RogersUpdate the jaketown events from 21 to 22. Generation was done using https://github.com/intel/perfmon.
Notable changes are improved event descriptions, TMA metrics are updated to version 4.5, TMA info metrics are renamed from their node name to be lower case and prefixed by tma_info_, MetricThreshold expressions are added, and the smi_cost metric group is added replicating existing hard coded metrics in stat-shadow.
--- .../pmu-events/arch/x86/jaketown/cache.json | 6 +- .../arch/x86/jaketown/floating-point.json | 2 +- .../arch/x86/jaketown/frontend.json | 12 +- .../arch/x86/jaketown/jkt-metrics.json | 602 ++++++++++-------- .../arch/x86/jaketown/pipeline.json | 2 +- .../arch/x86/jaketown/uncore-cache.json | 22 +- .../x86/jaketown/uncore-interconnect.json | 74 +-- .../arch/x86/jaketown/uncore-memory.json | 4 +- .../arch/x86/jaketown/uncore-other.json | 22 +- .../arch/x86/jaketown/uncore-power.json | 8 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 11 files changed, 409 insertions(+), 347 deletions(-)
tools/perf/pmu-events/arch/x86/jaketown/cache.json +3 -3
@@ -37,7 +37,7 @@ "UMask": "0x5" }, { - "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.", + "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers unavailability.", "CounterMask": "1", "EventCode": "0x48", "EventName": "L1D_PEND_MISS.FB_FULL",
@@ -45,7 +45,7 @@ "UMask": "0x2" }, { - "BriefDescription": "L1D miss oustandings duration in cycles.", + "BriefDescription": "L1D miss outstanding duration in cycles.", "EventCode": "0x48", "EventName": "L1D_PEND_MISS.PENDING", "SampleAfterValue": "2000003",
@@ -500,7 +500,7 @@ "UMask": "0x8" }, { - "BriefDescription": "Cacheable and noncachaeble code read requests.", + "BriefDescription": "Cacheable and non-cacheable code read requests.", "EventCode": "0xB0", "EventName": "OFFCORE_REQUESTS.DEMAND_CODE_RD", "SampleAfterValue": "100003",
tools/perf/pmu-events/arch/x86/jaketown/floating-point.json +1 -1
@@ -64,7 +64,7 @@ "UMask": "0x20" }, { - "BriefDescription": "Number of FP Computational Uops Executed this cycle. The number of FADD, FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer DIVs, and IDIVs. This event does not distinguish an FADD used in the middle of a transcendental flow from a s.", + "BriefDescription": "Number of FP Computational Uops Executed this cycle. The number of FADD, FSUB, FCOM, FMULs, integer MULs and IMULs, FDIVs, FPREMs, FSQRTS, integer DIVs, and IDIVs. This event does not distinguish an FADD used in the middle of a transcendental flow from a s.", "EventCode": "0x10", "EventName": "FP_COMP_OPS_EXE.X87", "SampleAfterValue": "2000003",
tools/perf/pmu-events/arch/x86/jaketown/frontend.json +6 -6
@@ -134,7 +134,7 @@ "UMask": "0x4" }, { - "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.", + "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy.", "CounterMask": "1", "EventCode": "0x79", "EventName": "IDQ.MS_CYCLES",
@@ -143,7 +143,7 @@ "UMask": "0x30" }, { - "BriefDescription": "Cycles when uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.", + "BriefDescription": "Cycles when uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy.", "CounterMask": "1", "EventCode": "0x79", "EventName": "IDQ.MS_DSB_CYCLES",
@@ -151,7 +151,7 @@ "UMask": "0x10" }, { - "BriefDescription": "Deliveries to Instruction Decode Queue (IDQ) initiated by Decode Stream Buffer (DSB) while Microcode Sequenser (MS) is busy.", + "BriefDescription": "Deliveries to Instruction Decode Queue (IDQ) initiated by Decode Stream Buffer (DSB) while Microcode Sequencer (MS) is busy.", "CounterMask": "1", "EdgeDetect": "1", "EventCode": "0x79",
@@ -160,14 +160,14 @@ "UMask": "0x10" }, { - "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.", + "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy.", "EventCode": "0x79", "EventName": "IDQ.MS_DSB_UOPS", "SampleAfterValue": "2000003", "UMask": "0x10" }, { - "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.", + "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy.", "EventCode": "0x79", "EventName": "IDQ.MS_MITE_UOPS", "SampleAfterValue": "2000003",
@@ -183,7 +183,7 @@ "UMask": "0x30" }, { - "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.", + "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy.", "EventCode": "0x79", "EventName": "IDQ.MS_UOPS", "SampleAfterValue": "2000003",
tools/perf/pmu-events/arch/x86/jaketown/jkt-metrics.json +332 -270
781 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/jaketown/pipeline.json +1 -1
@@ -501,7 +501,7 @@ "BriefDescription": "Cases when loads get true Block-on-Store blocking code preventing store forwarding.", "EventCode": "0x03", "EventName": "LD_BLOCKS.STORE_FORWARD", - "PublicDescription": "This event counts loads that followed a store to the same address, where the data could not be forwarded inside the pipeline from the store to the load. The most common reason why store forwarding would be blocked is when a load's address range overlaps with a preceeding smaller uncompleted store. See the table of not supported store forwards in the Intel? 64 and IA-32 Architectures Optimization Reference Manual. The penalty for blocked store forwarding is that the load must wait for the store to complete before it can be issued.", + "PublicDescription": "This event counts loads that followed a store to the same address, where the data could not be forwarded inside the pipeline from the store to the load. The most common reason why store forwarding would be blocked is when a load's address range overlaps with a preceding smaller uncompleted store. See the table of not supported store forwards in the Intel? 64 and IA-32 Architectures Optimization Reference Manual. The penalty for blocked store forwarding is that the load must wait for the store to complete before it can be issued.", "SampleAfterValue": "100003", "UMask": "0x2" },
tools/perf/pmu-events/arch/x86/jaketown/uncore-cache.json +11 -11
@@ -572,7 +572,7 @@ "EventCode": "0x35", "EventName": "UNC_C_TOR_INSERTS.EVICTION", "PerPkg": "1", - "PublicDescription": "Counts the number of entries successfuly inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", + "PublicDescription": "Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", "UMask": "0x4", "Unit": "CBO" },
@@ -581,7 +581,7 @@ "EventCode": "0x35", "EventName": "UNC_C_TOR_INSERTS.MISS_ALL", "PerPkg": "1", - "PublicDescription": "Counts the number of entries successfuly inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", + "PublicDescription": "Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", "UMask": "0xa", "Unit": "CBO" },
@@ -590,7 +590,7 @@ "EventCode": "0x35", "EventName": "UNC_C_TOR_INSERTS.MISS_OPCODE", "PerPkg": "1", - "PublicDescription": "Counts the number of entries successfuly inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", + "PublicDescription": "Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", "UMask": "0x3", "Unit": "CBO" },
@@ -599,7 +599,7 @@ "EventCode": "0x35", "EventName": "UNC_C_TOR_INSERTS.NID_ALL", "PerPkg": "1", - "PublicDescription": "Counts the number of entries successfuly inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", + "PublicDescription": "Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", "UMask": "0x48", "Unit": "CBO" },
@@ -608,7 +608,7 @@ "EventCode": "0x35", "EventName": "UNC_C_TOR_INSERTS.NID_EVICTION", "PerPkg": "1", - "PublicDescription": "Counts the number of entries successfuly inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", + "PublicDescription": "Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", "UMask": "0x44", "Unit": "CBO" },
@@ -617,7 +617,7 @@ "EventCode": "0x35", "EventName": "UNC_C_TOR_INSERTS.NID_MISS_ALL", "PerPkg": "1", - "PublicDescription": "Counts the number of entries successfuly inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", + "PublicDescription": "Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", "UMask": "0x4a", "Unit": "CBO" },
@@ -626,7 +626,7 @@ "EventCode": "0x35", "EventName": "UNC_C_TOR_INSERTS.NID_MISS_OPCODE", "PerPkg": "1", - "PublicDescription": "Counts the number of entries successfuly inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", + "PublicDescription": "Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", "UMask": "0x43", "Unit": "CBO" },
@@ -635,7 +635,7 @@ "EventCode": "0x35", "EventName": "UNC_C_TOR_INSERTS.NID_OPCODE", "PerPkg": "1", - "PublicDescription": "Counts the number of entries successfuly inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", + "PublicDescription": "Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", "UMask": "0x41", "Unit": "CBO" },
@@ -644,7 +644,7 @@ "EventCode": "0x35", "EventName": "UNC_C_TOR_INSERTS.NID_WB", "PerPkg": "1", - "PublicDescription": "Counts the number of entries successfuly inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", + "PublicDescription": "Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", "UMask": "0x50", "Unit": "CBO" },
@@ -653,7 +653,7 @@ "EventCode": "0x35", "EventName": "UNC_C_TOR_INSERTS.OPCODE", "PerPkg": "1", - "PublicDescription": "Counts the number of entries successfuly inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", + "PublicDescription": "Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", "UMask": "0x1", "Unit": "CBO" },
@@ -662,7 +662,7 @@ "EventCode": "0x35", "EventName": "UNC_C_TOR_INSERTS.WB", "PerPkg": "1", - "PublicDescription": "Counts the number of entries successfuly inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", + "PublicDescription": "Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. There are a number of subevent 'filters' but only a subset of the subevent combinations are valid. Subevents that require an opcode or NID match require the Cn_MSR_PMON_BOX_FILTER.{opc, nid} field to be set. If, for example, one wanted to count DRD Local Misses, one should select 'MISS_OPC_MATCH' and set Cn_MSR_PMON_BOX_FILTER.opc to DRD (0x182).", "UMask": "0x10", "Unit": "CBO" },
tools/perf/pmu-events/arch/x86/jaketown/uncore-interconnect.json +37 -37
296 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/jaketown/uncore-memory.json +2 -2
@@ -101,7 +101,7 @@ "EventCode": "0x9", "EventName": "UNC_M_ECC_CORRECTABLE_ERRORS", "PerPkg": "1", - "PublicDescription": "Counts the number of ECC errors detected and corrected by the iMC on this channel. This counter is only useful with ECC DRAM devices. This count will increment one time for each correction regardless of the number of bits corrected. The iMC can correct up to 4 bit errors in independent channel mode and 8 bit erros in lockstep mode.", + "PublicDescription": "Counts the number of ECC errors detected and corrected by the iMC on this channel. This counter is only useful with ECC DRAM devices. This count will increment one time for each correction regardless of the number of bits corrected. The iMC can correct up to 4 bit errors in independent channel mode and 8 bit errors in lockstep mode.", "Unit": "iMC" }, {
@@ -413,7 +413,7 @@ "EventCode": "0x81", "EventName": "UNC_M_WPQ_OCCUPANCY", "PerPkg": "1", - "PublicDescription": "Accumulates the occupancies of the Write Pending Queue each cycle. This can then be used to calculate both the average queue occupancy (in conjunction with the number of cycles not empty) and the average latency (in conjunction with the number of allocations). The WPQ is used to schedule write out to the memory controller and to track the writes. Requests allocate into the WPQ soon after they enter the memory controller, and need credits for an entry in this buffer before being sent from the HA to the iMC. They deallocate after being issued to DRAM. Write requests themselves are able to complete (from the perspective of the rest of the system) as soon they have 'posted' to the iMC. This is not to be confused with actually performing the write to DRAM. Therefore, the average latency for this queue is actually not useful for deconstruction intermediate write latencies. So, we provide filtering based on if the request has posted or not. By using the 'not posted' filter, we can track how long writes spent in the iMC before completions were sent to the HA. The 'posted' filter, on the other hand, provides information about how much queueing is actually happenning in the iMC for writes before they are actually issued to memory. High average occupancies will generally coincide with high write major mode counts.", + "PublicDescription": "Accumulates the occupancies of the Write Pending Queue each cycle. This can then be used to calculate both the average queue occupancy (in conjunction with the number of cycles not empty) and the average latency (in conjunction with the number of allocations). The WPQ is used to schedule write out to the memory controller and to track the writes. Requests allocate into the WPQ soon after they enter the memory controller, and need credits for an entry in this buffer before being sent from the HA to the iMC. They deallocate after being issued to DRAM. Write requests themselves are able to complete (from the perspective of the rest of the system) as soon they have 'posted' to the iMC. This is not to be confused with actually performing the write to DRAM. Therefore, the average latency for this queue is actually not useful for deconstruction intermediate write latencies. So, we provide filtering based on if the request has posted or not. By using the 'not posted' filter, we can track how long writes spent in the iMC before completions were sent to the HA. The 'posted' filter, on the other hand, provides information about how much queueing is actually happening in the iMC for writes before they are actually issued to memory. High average occupancies will generally coincide with high write major mode counts.", "Unit": "iMC" }, {
tools/perf/pmu-events/arch/x86/jaketown/uncore-other.json +11 -11
@@ -284,7 +284,7 @@ "EventCode": "0xD", "EventName": "UNC_I_TxR_REQUEST_OCCUPANCY", "PerPkg": "1", - "PublicDescription": "Accumultes the number of outstanding outbound requests from the IRP to the switch (towards the devices). This can be used in conjuection with the allocations event in order to calculate average latency of outbound requests.", + "PublicDescription": "Accumulates the number of outstanding outbound requests from the IRP to the switch (towards the devices). This can be used in conjunction with the allocations event in order to calculate average latency of outbound requests.", "Unit": "IRP" }, {
@@ -630,7 +630,7 @@ "EventCode": "0x20", "EventName": "UNC_R3_IIO_CREDITS_ACQUIRED.DRS", "PerPkg": "1", - "PublicDescription": "Counts the number of times the NCS/NCB/DRS credit is acquried in the QPI for sending messages on BL to the IIO. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transfering data without coherency, and DRS is used for transfering data with coherency (cachable PCI transactions). This event can only track one message class at a time.", + "PublicDescription": "Counts the number of times the NCS/NCB/DRS credit is acquired in the QPI for sending messages on BL to the IIO. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transferring data without coherency, and DRS is used for transferring data with coherency (cacheable PCI transactions). This event can only track one message class at a time.", "UMask": "0x8", "Unit": "R3QPI" },
@@ -639,7 +639,7 @@ "EventCode": "0x20", "EventName": "UNC_R3_IIO_CREDITS_ACQUIRED.NCB", "PerPkg": "1", - "PublicDescription": "Counts the number of times the NCS/NCB/DRS credit is acquried in the QPI for sending messages on BL to the IIO. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transfering data without coherency, and DRS is used for transfering data with coherency (cachable PCI transactions). This event can only track one message class at a time.", + "PublicDescription": "Counts the number of times the NCS/NCB/DRS credit is acquired in the QPI for sending messages on BL to the IIO. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transferring data without coherency, and DRS is used for transferring data with coherency (cacheable PCI transactions). This event can only track one message class at a time.", "UMask": "0x10", "Unit": "R3QPI" },
@@ -648,7 +648,7 @@ "EventCode": "0x20", "EventName": "UNC_R3_IIO_CREDITS_ACQUIRED.NCS", "PerPkg": "1", - "PublicDescription": "Counts the number of times the NCS/NCB/DRS credit is acquried in the QPI for sending messages on BL to the IIO. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transfering data without coherency, and DRS is used for transfering data with coherency (cachable PCI transactions). This event can only track one message class at a time.", + "PublicDescription": "Counts the number of times the NCS/NCB/DRS credit is acquired in the QPI for sending messages on BL to the IIO. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transferring data without coherency, and DRS is used for transferring data with coherency (cacheable PCI transactions). This event can only track one message class at a time.", "UMask": "0x20", "Unit": "R3QPI" },
@@ -657,7 +657,7 @@ "EventCode": "0x21", "EventName": "UNC_R3_IIO_CREDITS_REJECT.DRS", "PerPkg": "1", - "PublicDescription": "Counts the number of times that a request attempted to acquire an NCS/NCB/DRS credit in the QPI for sending messages on BL to the IIO but was rejected because no credit was available. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transfering data without coherency, and DRS is used for transfering data with coherency (cachable PCI transactions). This event can only track one message class at a time.", + "PublicDescription": "Counts the number of times that a request attempted to acquire an NCS/NCB/DRS credit in the QPI for sending messages on BL to the IIO but was rejected because no credit was available. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transferring data without coherency, and DRS is used for transferring data with coherency (cacheable PCI transactions). This event can only track one message class at a time.", "UMask": "0x8", "Unit": "R3QPI" },
@@ -666,7 +666,7 @@ "EventCode": "0x21", "EventName": "UNC_R3_IIO_CREDITS_REJECT.NCB", "PerPkg": "1", - "PublicDescription": "Counts the number of times that a request attempted to acquire an NCS/NCB/DRS credit in the QPI for sending messages on BL to the IIO but was rejected because no credit was available. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transfering data without coherency, and DRS is used for transfering data with coherency (cachable PCI transactions). This event can only track one message class at a time.", + "PublicDescription": "Counts the number of times that a request attempted to acquire an NCS/NCB/DRS credit in the QPI for sending messages on BL to the IIO but was rejected because no credit was available. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transferring data without coherency, and DRS is used for transferring data with coherency (cacheable PCI transactions). This event can only track one message class at a time.", "UMask": "0x10", "Unit": "R3QPI" },
@@ -675,7 +675,7 @@ "EventCode": "0x21", "EventName": "UNC_R3_IIO_CREDITS_REJECT.NCS", "PerPkg": "1", - "PublicDescription": "Counts the number of times that a request attempted to acquire an NCS/NCB/DRS credit in the QPI for sending messages on BL to the IIO but was rejected because no credit was available. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transfering data without coherency, and DRS is used for transfering data with coherency (cachable PCI transactions). This event can only track one message class at a time.", + "PublicDescription": "Counts the number of times that a request attempted to acquire an NCS/NCB/DRS credit in the QPI for sending messages on BL to the IIO but was rejected because no credit was available. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transferring data without coherency, and DRS is used for transferring data with coherency (cacheable PCI transactions). This event can only track one message class at a time.", "UMask": "0x20", "Unit": "R3QPI" },
@@ -684,7 +684,7 @@ "EventCode": "0x22", "EventName": "UNC_R3_IIO_CREDITS_USED.DRS", "PerPkg": "1", - "PublicDescription": "Counts the number of cycles when the NCS/NCB/DRS credit is in use in the QPI for sending messages on BL to the IIO. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transfering data without coherency, and DRS is used for transfering data with coherency (cachable PCI transactions). This event can only track one message class at a time.", + "PublicDescription": "Counts the number of cycles when the NCS/NCB/DRS credit is in use in the QPI for sending messages on BL to the IIO. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transferring data without coherency, and DRS is used for transferring data with coherency (cacheable PCI transactions). This event can only track one message class at a time.", "UMask": "0x8", "Unit": "R3QPI" },
@@ -693,7 +693,7 @@ "EventCode": "0x22", "EventName": "UNC_R3_IIO_CREDITS_USED.NCB", "PerPkg": "1", - "PublicDescription": "Counts the number of cycles when the NCS/NCB/DRS credit is in use in the QPI for sending messages on BL to the IIO. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transfering data without coherency, and DRS is used for transfering data with coherency (cachable PCI transactions). This event can only track one message class at a time.", + "PublicDescription": "Counts the number of cycles when the NCS/NCB/DRS credit is in use in the QPI for sending messages on BL to the IIO. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transferring data without coherency, and DRS is used for transferring data with coherency (cacheable PCI transactions). This event can only track one message class at a time.", "UMask": "0x10", "Unit": "R3QPI" },
@@ -702,7 +702,7 @@ "EventCode": "0x22", "EventName": "UNC_R3_IIO_CREDITS_USED.NCS", "PerPkg": "1", - "PublicDescription": "Counts the number of cycles when the NCS/NCB/DRS credit is in use in the QPI for sending messages on BL to the IIO. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transfering data without coherency, and DRS is used for transfering data with coherency (cachable PCI transactions). This event can only track one message class at a time.", + "PublicDescription": "Counts the number of cycles when the NCS/NCB/DRS credit is in use in the QPI for sending messages on BL to the IIO. There is one credit for each of these three message classes (three credits total). NCS is used for reads to PCIe space, NCB is used for transferring data without coherency, and DRS is used for transferring data with coherency (cacheable PCI transactions). This event can only track one message class at a time.", "UMask": "0x20", "Unit": "R3QPI" },
@@ -1107,7 +1107,7 @@ "EventCode": "0x33", "EventName": "UNC_R3_VNA_CREDITS_ACQUIRED", "PerPkg": "1", - "PublicDescription": "Number of QPI VNA Credit acquisitions. This event can be used in conjunction with the VNA In-Use Accumulator to calculate the average lifetime of a credit holder. VNA credits are used by all message classes in order to communicate across QPI. If a packet is unable to acquire credits, it will then attempt to use credts from the VN0 pool. Note that a single packet may require multiple flit buffers (i.e. when data is being transfered). Therefore, this event will increment by the number of credits acquired in each cycle. Filtering based on message class is not provided. One can count the number of packets transfered in a given message class using an qfclk event.", + "PublicDescription": "Number of QPI VNA Credit acquisitions. This event can be used in conjunction with the VNA In-Use Accumulator to calculate the average lifetime of a credit holder. VNA credits are used by all message classes in order to communicate across QPI. If a packet is unable to acquire credits, it will then attempt to use credits from the VN0 pool. Note that a single packet may require multiple flit buffers (i.e. when data is being transferred). Therefore, this event will increment by the number of credits acquired in each cycle. Filtering based on message class is not provided. One can count the number of packets transferred in a given message class using an qfclk event.", "Unit": "R3QPI" }, {
tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json +4 -4
@@ -234,7 +234,7 @@ "EventCode": "0x80", "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0", "PerPkg": "1", - "PublicDescription": "This is an occupancy event that tracks the number of cores that are in C0. It can be used by itself to get the average number of cores in C0, with threshholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.", + "PublicDescription": "This is an occupancy event that tracks the number of cores that are in C0. It can be used by itself to get the average number of cores in C0, with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.", "Unit": "PCU" }, {
@@ -242,7 +242,7 @@ "EventCode": "0x80", "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3", "PerPkg": "1", - "PublicDescription": "This is an occupancy event that tracks the number of cores that are in C0. It can be used by itself to get the average number of cores in C0, with threshholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.", + "PublicDescription": "This is an occupancy event that tracks the number of cores that are in C0. It can be used by itself to get the average number of cores in C0, with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.", "Unit": "PCU" }, {
@@ -250,7 +250,7 @@ "EventCode": "0x80", "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6", "PerPkg": "1", - "PublicDescription": "This is an occupancy event that tracks the number of cores that are in C0. It can be used by itself to get the average number of cores in C0, with threshholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.", + "PublicDescription": "This is an occupancy event that tracks the number of cores that are in C0. It can be used by itself to get the average number of cores in C0, with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.", "Unit": "PCU" }, {
@@ -266,7 +266,7 @@ "EventCode": "0x9", "EventName": "UNC_P_PROCHOT_INTERNAL_CYCLES", "PerPkg": "1", - "PublicDescription": "Counts the number of cycles that we are in Interal PROCHOT mode. This mode is triggered when a sensor on the die determines that we are too hot and must throttle to avoid damaging the chip.", + "PublicDescription": "Counts the number of cycles that we are in Internal PROCHOT mode. This mode is triggered when a sensor on the die determines that we are too hot and must throttle to avoid damaging the chip.", "Unit": "PCU" }, {
tools/perf/pmu-events/arch/x86/mapfile.csv +1 -1
@@ -16,7 +16,7 @@ GenuineIntel-6-(7D|7E|A7),v1.17,icelake,core GenuineIntel-6-6[AC],v1.18,icelakex,core GenuineIntel-6-3A,v23,ivybridge,core GenuineIntel-6-3E,v22,ivytown,core -GenuineIntel-6-2D,v21,jaketown,core +GenuineIntel-6-2D,v22,jaketown,core GenuineIntel-6-(57|85),v9,knightslanding,core GenuineIntel-6-A[AC],v1.00,meteorlake,core GenuineIntel-6-1[AEF],v3,nehalemep,core
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 24/51 perf vendor events intel: Refresh knightslanding events
In reply to Ian RogersUpdate the knightslanding events from 9 to 10. Generation was done using https://github.com/intel/perfmon.
The most notable change is in corrections to event descriptions.
--- .../arch/x86/knightslanding/cache.json | 94 +++++++++---------- .../arch/x86/knightslanding/pipeline.json | 8 +- .../arch/x86/knightslanding/uncore-other.json | 8 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 4 files changed, 56 insertions(+), 56 deletions(-)
tools/perf/pmu-events/arch/x86/knightslanding/cache.json +47 -47
@@ -6,7 +6,7 @@ "SampleAfterValue": "200003" }, { - "BriefDescription": "Counts the number of core cycles the fetch stalls because of an icache miss. This is a cummulative count of core cycles the fetch stalled for all icache misses.", + "BriefDescription": "Counts the number of core cycles the fetch stalls because of an icache miss. This is a cumulative count of core cycles the fetch stalled for all icache misses.", "EventCode": "0x86", "EventName": "FETCH_STALL.ICACHE_FILL_PENDING_CYCLES", "PublicDescription": "This event counts the number of core cycles the fetch stalls because of an icache miss. This is a cumulative count of cycles the NIP stalled for all icache misses.",
@@ -28,7 +28,7 @@ "UMask": "0x4f" }, { - "BriefDescription": "Counts the number of MEC requests from the L2Q that reference a cache line (cacheable requests) exlcuding SW prefetches filling only to L2 cache and L1 evictions (automatically exlcudes L2HWP, UC, WC) that were rejected - Multiple repeated rejects should be counted multiple times", + "BriefDescription": "Counts the number of MEC requests from the L2Q that reference a cache line (cacheable requests) excluding SW prefetches filling only to L2 cache and L1 evictions (automatically exlcudes L2HWP, UC, WC) that were rejected - Multiple repeated rejects should be counted multiple times", "EventCode": "0x30", "EventName": "L2_REQUESTS_REJECT.ALL", "SampleAfterValue": "200003"
@@ -108,7 +108,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Demand code reads and prefetch code read requests that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts Demand code reads and prefetch code read requests that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_CODE_RD.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -135,7 +135,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Demand code reads and prefetch code read requests that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts Demand code reads and prefetch code read requests that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_CODE_RD.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -198,7 +198,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Demand code reads and prefetch code read requests that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts Demand code reads and prefetch code read requests that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_CODE_RD.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -216,7 +216,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Demand cacheable data and L1 prefetch data read requests that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts Demand cacheable data and L1 prefetch data read requests that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_DATA_RD.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -243,7 +243,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Demand cacheable data and L1 prefetch data read requests that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts Demand cacheable data and L1 prefetch data read requests that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_DATA_RD.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -306,7 +306,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Demand cacheable data and L1 prefetch data read requests that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts Demand cacheable data and L1 prefetch data read requests that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_DATA_RD.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -324,7 +324,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts any Prefetch requests that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts any Prefetch requests that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_PF_L2.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -351,7 +351,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts any Prefetch requests that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts any Prefetch requests that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_PF_L2.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -405,7 +405,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts any Prefetch requests that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts any Prefetch requests that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_PF_L2.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -423,7 +423,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts any Read request that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts any Read request that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_READ.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -450,7 +450,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts any Read request that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts any Read request that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_READ.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -513,7 +513,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts any Read request that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts any Read request that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_READ.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -531,7 +531,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts any request that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts any request that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_REQUEST.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -558,7 +558,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts any request that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts any request that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_REQUEST.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -621,7 +621,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts any request that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts any request that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_REQUEST.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -639,7 +639,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Demand cacheable data write requests that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts Demand cacheable data write requests that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_RFO.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -666,7 +666,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Demand cacheable data write requests that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts Demand cacheable data write requests that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_RFO.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -729,7 +729,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Demand cacheable data write requests that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts Demand cacheable data write requests that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.ANY_RFO.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -747,7 +747,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Bus locks and split lock requests that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts Bus locks and split lock requests that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -774,7 +774,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Bus locks and split lock requests that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts Bus locks and split lock requests that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -837,7 +837,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Bus locks and split lock requests that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts Bus locks and split lock requests that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -855,7 +855,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts demand code reads and prefetch code reads that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts demand code reads and prefetch code reads that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -882,7 +882,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts demand code reads and prefetch code reads that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts demand code reads and prefetch code reads that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -945,7 +945,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts demand code reads and prefetch code reads that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts demand code reads and prefetch code reads that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -1035,7 +1035,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts demand cacheable data and L1 prefetch data reads that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts demand cacheable data and L1 prefetch data reads that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -1053,7 +1053,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Demand cacheable data writes that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts Demand cacheable data writes that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -1080,7 +1080,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Demand cacheable data writes that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts Demand cacheable data writes that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -1143,7 +1143,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Demand cacheable data writes that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts Demand cacheable data writes that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -1170,7 +1170,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Partial reads (UC or WC and is valid only for Outstanding response type). that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts Partial reads (UC or WC and is valid only for Outstanding response type). that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PARTIAL_READS.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -1197,7 +1197,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Partial reads (UC or WC and is valid only for Outstanding response type). that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts Partial reads (UC or WC and is valid only for Outstanding response type). that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PARTIAL_READS.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -1260,7 +1260,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Partial reads (UC or WC and is valid only for Outstanding response type). that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts Partial reads (UC or WC and is valid only for Outstanding response type). that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PARTIAL_READS.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -1287,7 +1287,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Partial writes (UC or WT or WP and should be programmed on PMC1) that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts Partial writes (UC or WT or WP and should be programmed on PMC1) that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PARTIAL_WRITES.L2_HIT_FAR_TILE", "MSRIndex": "0x1a7",
@@ -1314,7 +1314,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Partial writes (UC or WT or WP and should be programmed on PMC1) that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts Partial writes (UC or WT or WP and should be programmed on PMC1) that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PARTIAL_WRITES.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a7",
@@ -1386,7 +1386,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts L1 data HW prefetches that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts L1 data HW prefetches that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PF_L1_DATA_RD.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -1413,7 +1413,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts L1 data HW prefetches that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts L1 data HW prefetches that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PF_L1_DATA_RD.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -1476,7 +1476,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts L1 data HW prefetches that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts L1 data HW prefetches that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PF_L1_DATA_RD.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -1494,7 +1494,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts L2 code HW prefetches that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts L2 code HW prefetches that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PF_L2_CODE_RD.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -1521,7 +1521,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts L2 code HW prefetches that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts L2 code HW prefetches that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PF_L2_CODE_RD.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -1566,7 +1566,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts L2 code HW prefetches that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts L2 code HW prefetches that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PF_L2_CODE_RD.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -1602,7 +1602,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts L2 data RFO prefetches (includes PREFETCHW instruction) that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts L2 data RFO prefetches (includes PREFETCHW instruction) that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -1683,7 +1683,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Software Prefetches that accounts for reponses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", + "BriefDescription": "Counts Software Prefetches that accounts for responses from snoop request hit with data forwarded from it Far(not in the same quadrant as the request)-other tile L2 in E/F/M state. Valid only in SNC4 Cluster mode.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PF_SOFTWARE.L2_HIT_FAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -1710,7 +1710,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Software Prefetches that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts Software Prefetches that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PF_SOFTWARE.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -1773,7 +1773,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts Software Prefetches that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts Software Prefetches that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.PF_SOFTWARE.OUTSTANDING", "MSRIndex": "0x1a6",
@@ -1818,7 +1818,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts UC code reads (valid only for Outstanding response type) that accounts for reponses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", + "BriefDescription": "Counts UC code reads (valid only for Outstanding response type) that accounts for responses from snoop request hit with data forwarded from its Near-other tile L2 in E/F/M state", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.UC_CODE_READS.L2_HIT_NEAR_TILE", "MSRIndex": "0x1a6,0x1a7",
@@ -1881,7 +1881,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts UC code reads (valid only for Outstanding response type) that are outstanding, per weighted cycle, from the time of the request to when any response is received. The oustanding response should be programmed only on PMC0.", + "BriefDescription": "Counts UC code reads (valid only for Outstanding response type) that are outstanding, per weighted cycle, from the time of the request to when any response is received. The outstanding response should be programmed only on PMC0.", "EventCode": "0xB7", "EventName": "OFFCORE_RESPONSE.UC_CODE_READS.OUTSTANDING", "MSRIndex": "0x1a6",
tools/perf/pmu-events/arch/x86/knightslanding/pipeline.json +4 -4
@@ -254,14 +254,14 @@ "UMask": "0x80" }, { - "BriefDescription": "Counts the number of occurences a retired load gets blocked because its address overlaps with a store whose data is not ready", + "BriefDescription": "Counts the number of occurrences a retired load gets blocked because its address overlaps with a store whose data is not ready", "EventCode": "0x03", "EventName": "RECYCLEQ.LD_BLOCK_STD_NOTREADY", "SampleAfterValue": "200003", "UMask": "0x2" }, { - "BriefDescription": "Counts the number of occurences a retired load gets blocked because its address partially overlaps with a store", + "BriefDescription": "Counts the number of occurrences a retired load gets blocked because its address partially overlaps with a store", "Data_LA": "1", "EventCode": "0x03", "EventName": "RECYCLEQ.LD_BLOCK_ST_FORWARD",
@@ -270,7 +270,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts the number of occurences a retired load that is a cache line split. Each split should be counted only once.", + "BriefDescription": "Counts the number of occurrences a retired load that is a cache line split. Each split should be counted only once.", "Data_LA": "1", "EventCode": "0x03", "EventName": "RECYCLEQ.LD_SPLITS",
@@ -293,7 +293,7 @@ "UMask": "0x20" }, { - "BriefDescription": "Counts the number of occurences a retired store that is a cache line split. Each split should be counted only once.", + "BriefDescription": "Counts the number of occurrences a retired store that is a cache line split. Each split should be counted only once.", "EventCode": "0x03", "EventName": "RECYCLEQ.ST_SPLITS", "PublicDescription": "This event counts the number of retired store that experienced a cache line boundary split(Precise Event). Note that each spilt should be counted only once.",
tools/perf/pmu-events/arch/x86/knightslanding/uncore-other.json +4 -4
@@ -1084,7 +1084,7 @@ "Unit": "CHA" }, { - "BriefDescription": "Cache Lookups. Counts the number of times the LLC was accessed. Writeback transactions from L2 to the LLC This includes all write transactions -- both Cachable and UC.", + "BriefDescription": "Cache Lookups. Counts the number of times the LLC was accessed. Writeback transactions from L2 to the LLC This includes all write transactions -- both Cacheable and UC.", "EventCode": "0x37", "EventName": "UNC_H_CACHE_LINES_VICTIMIZED.E_STATE", "PerPkg": "1",
@@ -1843,7 +1843,7 @@ "Unit": "CHA" }, { - "BriefDescription": "Counts cycles source throttling is adderted - horizontal", + "BriefDescription": "Counts cycles source throttling is asserted - horizontal", "EventCode": "0xA5", "EventName": "UNC_H_FAST_ASSERTED.HORZ", "PerPkg": "1",
@@ -1851,7 +1851,7 @@ "Unit": "CHA" }, { - "BriefDescription": "Counts cycles source throttling is adderted - vertical", + "BriefDescription": "Counts cycles source throttling is asserted - vertical", "EventCode": "0xA5", "EventName": "UNC_H_FAST_ASSERTED.VERT", "PerPkg": "1",
@@ -2929,7 +2929,7 @@ "Unit": "CHA" }, { - "BriefDescription": "Cache Lookups. Counts the number of times the LLC was accessed. Writeback transactions from L2 to the LLC This includes all write transactions -- both Cachable and UC.", + "BriefDescription": "Cache Lookups. Counts the number of times the LLC was accessed. Writeback transactions from L2 to the LLC This includes all write transactions -- both Cacheable and UC.", "EventCode": "0x34", "EventName": "UNC_H_SF_LOOKUP.WRITE", "PerPkg": "1",
tools/perf/pmu-events/arch/x86/mapfile.csv +1 -1
@@ -17,7 +17,7 @@ GenuineIntel-6-6[AC],v1.18,icelakex,core GenuineIntel-6-3A,v23,ivybridge,core GenuineIntel-6-3E,v22,ivytown,core GenuineIntel-6-2D,v22,jaketown,core -GenuineIntel-6-(57|85),v9,knightslanding,core +GenuineIntel-6-(57|85),v10,knightslanding,core GenuineIntel-6-A[AC],v1.00,meteorlake,core GenuineIntel-6-1[AEF],v3,nehalemep,core GenuineIntel-6-2E,v3,nehalemex,core
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 25/51 perf vendor events intel: Refresh sandybridge events
In reply to Ian RogersUpdate the sandybridge events from 17 to 18. Generation was done using https://github.com/intel/perfmon.
Notable changes are improved event descriptions, TMA metrics are updated to version 4.5, TMA info metrics are renamed from their node name to be lower case and prefixed by tma_info_, MetricThreshold expressions are added, and the smi_cost metric group is added replicating existing hard coded metrics in stat-shadow.
--- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../arch/x86/sandybridge/cache.json | 8 +- .../arch/x86/sandybridge/floating-point.json | 2 +- .../arch/x86/sandybridge/frontend.json | 12 +- .../arch/x86/sandybridge/pipeline.json | 2 +- .../arch/x86/sandybridge/snb-metrics.json | 601 ++++++++++-------- 6 files changed, 344 insertions(+), 283 deletions(-)
tools/perf/pmu-events/arch/x86/mapfile.csv +1 -1
@@ -21,7 +21,7 @@ GenuineIntel-6-(57|85),v10,knightslanding,core GenuineIntel-6-A[AC],v1.00,meteorlake,core GenuineIntel-6-1[AEF],v3,nehalemep,core GenuineIntel-6-2E,v3,nehalemex,core -GenuineIntel-6-2A,v17,sandybridge,core +GenuineIntel-6-2A,v18,sandybridge,core GenuineIntel-6-(8F|CF),v1.09,sapphirerapids,core GenuineIntel-6-(37|4A|4C|4D|5A),v14,silvermont,core GenuineIntel-6-(4E|5E|8E|9E|A5|A6),v53,skylake,core
tools/perf/pmu-events/arch/x86/sandybridge/cache.json +4 -4
@@ -37,7 +37,7 @@ "UMask": "0x5" }, { - "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.", + "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers unavailability.", "CounterMask": "1", "EventCode": "0x48", "EventName": "L1D_PEND_MISS.FB_FULL",
@@ -45,7 +45,7 @@ "UMask": "0x2" }, { - "BriefDescription": "L1D miss oustandings duration in cycles.", + "BriefDescription": "L1D miss outstanding duration in cycles.", "EventCode": "0x48", "EventName": "L1D_PEND_MISS.PENDING", "SampleAfterValue": "2000003",
@@ -493,7 +493,7 @@ "UMask": "0x8" }, { - "BriefDescription": "Cacheable and noncachaeble code read requests.", + "BriefDescription": "Cacheable and noncacheable code read requests.", "EventCode": "0xB0", "EventName": "OFFCORE_REQUESTS.DEMAND_CODE_RD", "SampleAfterValue": "100003",
@@ -898,7 +898,7 @@ "UMask": "0x1" }, { - "BriefDescription": "COREWB & ANY_RESPONSE", + "BriefDescription": "OFFCORE_RESPONSE.COREWB.ANY_RESPONSE", "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.COREWB.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7",
tools/perf/pmu-events/arch/x86/sandybridge/floating-point.json +1 -1
@@ -64,7 +64,7 @@ "UMask": "0x20" }, { - "BriefDescription": "Number of FP Computational Uops Executed this cycle. The number of FADD, FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer DIVs, and IDIVs. This event does not distinguish an FADD used in the middle of a transcendental flow from a s.", + "BriefDescription": "Number of FP Computational Uops Executed this cycle. The number of FADD, FSUB, FCOM, FMULs, integer MULs and IMULs, FDIVs, FPREMs, FSQRTS, integer DIVs, and IDIVs. This event does not distinguish an FADD used in the middle of a transcendental flow from a s.", "EventCode": "0x10", "EventName": "FP_COMP_OPS_EXE.X87", "SampleAfterValue": "2000003",
tools/perf/pmu-events/arch/x86/sandybridge/frontend.json +6 -6
@@ -134,7 +134,7 @@ "UMask": "0x4" }, { - "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.", + "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy.", "CounterMask": "1", "EventCode": "0x79", "EventName": "IDQ.MS_CYCLES",
@@ -143,7 +143,7 @@ "UMask": "0x30" }, { - "BriefDescription": "Cycles when uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.", + "BriefDescription": "Cycles when uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy.", "CounterMask": "1", "EventCode": "0x79", "EventName": "IDQ.MS_DSB_CYCLES",
@@ -151,7 +151,7 @@ "UMask": "0x10" }, { - "BriefDescription": "Deliveries to Instruction Decode Queue (IDQ) initiated by Decode Stream Buffer (DSB) while Microcode Sequenser (MS) is busy.", + "BriefDescription": "Deliveries to Instruction Decode Queue (IDQ) initiated by Decode Stream Buffer (DSB) while Microcode Sequencer (MS) is busy.", "CounterMask": "1", "EdgeDetect": "1", "EventCode": "0x79",
@@ -160,14 +160,14 @@ "UMask": "0x10" }, { - "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.", + "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy.", "EventCode": "0x79", "EventName": "IDQ.MS_DSB_UOPS", "SampleAfterValue": "2000003", "UMask": "0x10" }, { - "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.", + "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy.", "EventCode": "0x79", "EventName": "IDQ.MS_MITE_UOPS", "SampleAfterValue": "2000003",
@@ -183,7 +183,7 @@ "UMask": "0x30" }, { - "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.", + "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy.", "EventCode": "0x79", "EventName": "IDQ.MS_UOPS", "SampleAfterValue": "2000003",
tools/perf/pmu-events/arch/x86/sandybridge/pipeline.json +1 -1
@@ -509,7 +509,7 @@ "BriefDescription": "Cases when loads get true Block-on-Store blocking code preventing store forwarding.", "EventCode": "0x03", "EventName": "LD_BLOCKS.STORE_FORWARD", - "PublicDescription": "This event counts loads that followed a store to the same address, where the data could not be forwarded inside the pipeline from the store to the load. The most common reason why store forwarding would be blocked is when a load's address range overlaps with a preceeding smaller uncompleted store. See the table of not supported store forwards in the Intel(R) 64 and IA-32 Architectures Optimization Reference Manual. The penalty for blocked store forwarding is that the load must wait for the store to complete before it can be issued.", + "PublicDescription": "This event counts loads that followed a store to the same address, where the data could not be forwarded inside the pipeline from the store to the load. The most common reason why store forwarding would be blocked is when a load's address range overlaps with a preceding smaller uncompleted store. See the table of not supported store forwards in the Intel(R) 64 and IA-32 Architectures Optimization Reference Manual. The penalty for blocked store forwarding is that the load must wait for the store to complete before it can be issued.", "SampleAfterValue": "100003", "UMask": "0x2" },
tools/perf/pmu-events/arch/x86/sandybridge/snb-metrics.json +331 -270
780 lines not on this page · raw message
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 26/51 perf vendor events intel: Refresh sapphirerapids events
In reply to Ian RogersUpdate the sapphirerapids events from 1.09 to 1.11. Generation was done using https://github.com/intel/perfmon.
Notable changes are new events and event descriptions, TMA metrics are updated to version 4.5, TMA info metrics are renamed from their node name to be lower case and prefixed by tma_info_, MetricThreshold expressions are added, smi_cost and transaction metric groups are added replicating existing hard coded metrics in stat-shadow.
--- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../arch/x86/sapphirerapids/cache.json | 24 +- .../x86/sapphirerapids/floating-point.json | 32 + .../arch/x86/sapphirerapids/frontend.json | 8 + .../arch/x86/sapphirerapids/pipeline.json | 19 +- .../arch/x86/sapphirerapids/spr-metrics.json | 2283 +++++++++-------- .../arch/x86/sapphirerapids/uncore-other.json | 60 + 7 files changed, 1304 insertions(+), 1124 deletions(-)
tools/perf/pmu-events/arch/x86/mapfile.csv +1 -1
@@ -22,7 +22,7 @@ GenuineIntel-6-A[AC],v1.00,meteorlake,core GenuineIntel-6-1[AEF],v3,nehalemep,core GenuineIntel-6-2E,v3,nehalemex,core GenuineIntel-6-2A,v18,sandybridge,core -GenuineIntel-6-(8F|CF),v1.09,sapphirerapids,core +GenuineIntel-6-(8F|CF),v1.11,sapphirerapids,core GenuineIntel-6-(37|4A|4C|4D|5A),v14,silvermont,core GenuineIntel-6-(4E|5E|8E|9E|A5|A6),v53,skylake,core GenuineIntel-6-55-[01234],v1.28,skylakex,core
tools/perf/pmu-events/arch/x86/sapphirerapids/cache.json +16 -8
@@ -97,18 +97,18 @@ "UMask": "0x4" }, { - "BriefDescription": "All accesses to L2 cache[This event is alias to L2_RQSTS.REFERENCES]", + "BriefDescription": "All accesses to L2 cache [This event is alias to L2_RQSTS.REFERENCES]", "EventCode": "0x24", "EventName": "L2_REQUEST.ALL", - "PublicDescription": "Counts all requests that were hit or true misses in L2 cache. True-miss excludes misses that were merged with ongoing L2 misses.[This event is alias to L2_RQSTS.REFERENCES]", + "PublicDescription": "Counts all requests that were hit or true misses in L2 cache. True-miss excludes misses that were merged with ongoing L2 misses. [This event is alias to L2_RQSTS.REFERENCES]", "SampleAfterValue": "200003", "UMask": "0xff" }, { - "BriefDescription": "Read requests with true-miss in L2 cache.[This event is alias to L2_RQSTS.MISS]", + "BriefDescription": "Read requests with true-miss in L2 cache. [This event is alias to L2_RQSTS.MISS]", "EventCode": "0x24", "EventName": "L2_REQUEST.MISS", - "PublicDescription": "Counts read requests of any type with true-miss in the L2 cache. True-miss excludes L2 misses that were merged with ongoing L2 misses.[This event is alias to L2_RQSTS.MISS]", + "PublicDescription": "Counts read requests of any type with true-miss in the L2 cache. True-miss excludes L2 misses that were merged with ongoing L2 misses. [This event is alias to L2_RQSTS.MISS]", "SampleAfterValue": "200003", "UMask": "0x3f" },
@@ -199,18 +199,18 @@ "UMask": "0x30" }, { - "BriefDescription": "Read requests with true-miss in L2 cache.[This event is alias to L2_REQUEST.MISS]", + "BriefDescription": "Read requests with true-miss in L2 cache. [This event is alias to L2_REQUEST.MISS]", "EventCode": "0x24", "EventName": "L2_RQSTS.MISS", - "PublicDescription": "Counts read requests of any type with true-miss in the L2 cache. True-miss excludes L2 misses that were merged with ongoing L2 misses.[This event is alias to L2_REQUEST.MISS]", + "PublicDescription": "Counts read requests of any type with true-miss in the L2 cache. True-miss excludes L2 misses that were merged with ongoing L2 misses. [This event is alias to L2_REQUEST.MISS]", "SampleAfterValue": "200003", "UMask": "0x3f" }, { - "BriefDescription": "All accesses to L2 cache[This event is alias to L2_REQUEST.ALL]", + "BriefDescription": "All accesses to L2 cache [This event is alias to L2_REQUEST.ALL]", "EventCode": "0x24", "EventName": "L2_RQSTS.REFERENCES", - "PublicDescription": "Counts all requests that were hit or true misses in L2 cache. True-miss excludes misses that were merged with ongoing L2 misses.[This event is alias to L2_REQUEST.ALL]", + "PublicDescription": "Counts all requests that were hit or true misses in L2 cache. True-miss excludes misses that were merged with ongoing L2 misses. [This event is alias to L2_REQUEST.ALL]", "SampleAfterValue": "200003", "UMask": "0xff" },
@@ -863,6 +863,14 @@ "SampleAfterValue": "1000003", "UMask": "0x1" }, + { + "BriefDescription": "Counts bus locks, accounts for cache line split locks and UC locks.", + "EventCode": "0x2c", + "EventName": "SQ_MISC.BUS_LOCK", + "PublicDescription": "Counts the more expensive bus lock needed to enforce cache coherency for certain memory accesses that need to be done atomically. Can be created by issuing an atomic instruction (via the LOCK prefix) which causes a cache line split or accesses uncacheable memory.", + "SampleAfterValue": "100003", + "UMask": "0x10" + }, { "BriefDescription": "Number of PREFETCHNTA instructions executed.", "EventCode": "0x40",
tools/perf/pmu-events/arch/x86/sapphirerapids/floating-point.json +32 -0
@@ -75,6 +75,14 @@ "SampleAfterValue": "100003", "UMask": "0x20" }, + { + "BriefDescription": "Number of SSE/AVX computational 128-bit packed single and 256-bit packed double precision FP instructions retired; some instructions will count twice as noted below. Each count represents 2 or/and 4 computation operations, 1 for each element. Applies to SSE* and AVX* packed single precision and packed double precision FP instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX RCP14 RSQRT14 SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB count twice as they perform 2 calculations per element.", + "EventCode": "0xc7", + "EventName": "FP_ARITH_INST_RETIRED.4_FLOPS", + "PublicDescription": "Number of SSE/AVX computational 128-bit packed single precision and 256-bit packed double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 2 or/and 4 computation operations, one for each element. Applies to SSE* and AVX* packed single precision floating-point and packed double precision floating-point instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX RCP14 RSQRT14 SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", + "SampleAfterValue": "100003", + "UMask": "0x18" + }, { "BriefDescription": "Counts number of SSE/AVX computational 512-bit packed double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 8 computation operations, one for each element. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT RSQRT14 RCP14 FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element.", "EventCode": "0xc7",
@@ -91,6 +99,22 @@ "SampleAfterValue": "100003", "UMask": "0x80" }, + { + "BriefDescription": "Number of SSE/AVX computational 256-bit packed single precision and 512-bit packed double precision FP instructions retired; some instructions will count twice as noted below. Each count represents 8 computation operations, 1 for each element. Applies to SSE* and AVX* packed single precision and double precision FP instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX SQRT RSQRT RSQRT14 RCP RCP14 DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB count twice as they perform 2 calculations per element.", + "EventCode": "0xc7", + "EventName": "FP_ARITH_INST_RETIRED.8_FLOPS", + "PublicDescription": "Number of SSE/AVX computational 256-bit packed single precision and 512-bit packed double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 8 computation operations, one for each element. Applies to SSE* and AVX* packed single precision and double precision floating-point instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX SQRT RSQRT RSQRT14 RCP RCP14 DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", + "SampleAfterValue": "100003", + "UMask": "0x60" + }, + { + "BriefDescription": "Number of SSE/AVX computational scalar floating-point instructions retired; some instructions will count twice as noted below. Applies to SSE* and AVX* scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RCP14 RSQRT14 RANGE SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.", + "EventCode": "0xc7", + "EventName": "FP_ARITH_INST_RETIRED.SCALAR", + "PublicDescription": "Number of SSE/AVX computational scalar single precision and double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 1 computational operation. Applies to SSE* and AVX* scalar single precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT RSQRT RCP FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", + "SampleAfterValue": "1000003", + "UMask": "0x3" + }, { "BriefDescription": "Counts number of SSE/AVX computational scalar double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 1 computational operation. Applies to SSE* and AVX* scalar double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element.", "EventCode": "0xc7",
@@ -107,6 +131,14 @@ "SampleAfterValue": "100003", "UMask": "0x2" }, + { + "BriefDescription": "Number of any Vector retired FP arithmetic instructions", + "EventCode": "0xc7", + "EventName": "FP_ARITH_INST_RETIRED.VECTOR", + "PublicDescription": "Number of any Vector retired FP arithmetic instructions. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", + "SampleAfterValue": "1000003", + "UMask": "0xfc" + }, { "BriefDescription": "FP_ARITH_INST_RETIRED2.128B_PACKED_HALF", "EventCode": "0xcf",
tools/perf/pmu-events/arch/x86/sapphirerapids/frontend.json +8 -0
@@ -1,4 +1,12 @@ [ + { + "BriefDescription": "Clears due to Unknown Branches.", + "EventCode": "0x60", + "EventName": "BACLEARS.ANY", + "PublicDescription": "Number of times the front-end is resteered when it finds a branch instruction in a fetch line. This is called Unknown Branch which occurs for the first time a branch instruction is fetched or when the branch is not tracked by the BPU (Branch Prediction Unit) anymore.", + "SampleAfterValue": "100003", + "UMask": "0x1" + }, { "BriefDescription": "Stalls caused by changing prefix length of the instruction.", "EventCode": "0x87",
tools/perf/pmu-events/arch/x86/sapphirerapids/pipeline.json +16 -3
@@ -1,15 +1,17 @@ [ { - "BriefDescription": "AMX_OPS_RETIRED.BF16", + "BriefDescription": "AMX retired arithmetic BF16 operations.", "EventCode": "0xce", "EventName": "AMX_OPS_RETIRED.BF16", + "PublicDescription": "Number of AMX-based retired arithmetic bfloat16 (BF16) floating-point operations. Counts TDPBF16PS FP instructions. SW to use operation multiplier of 4", "SampleAfterValue": "1000003", "UMask": "0x2" }, { - "BriefDescription": "AMX_OPS_RETIRED.INT8", + "BriefDescription": "AMX retired arithmetic integer 8-bit operations.", "EventCode": "0xce", "EventName": "AMX_OPS_RETIRED.INT8", + "PublicDescription": "Number of AMX-based retired arithmetic integer operations of 8-bit width source operands. Counts TDPB[SS,UU,US,SU]D instructions. SW should use operation multiplier of 8.", "SampleAfterValue": "1000003", "UMask": "0x1" },
@@ -461,12 +463,23 @@ "UMask": "0x1" }, { - "BriefDescription": "INST_RETIRED.REP_ITERATION", + "BriefDescription": "Iterations of Repeat string retired instructions.", "EventCode": "0xc0", "EventName": "INST_RETIRED.REP_ITERATION", + "PublicDescription": "Number of iterations of Repeat (REP) string retired instructions such as MOVS, CMPS, and SCAS. Each has a byte, word, and doubleword version and string instructions can be repeated using a repetition prefix, REP, that allows their architectural execution to be repeated a number of times as specified by the RCX register. Note the number of iterations is implementation-dependent.", "SampleAfterValue": "2000003", "UMask": "0x8" }, + { + "BriefDescription": "Clears speculative count", + "CounterMask": "1", + "EdgeDetect": "1", + "EventCode": "0xad", + "EventName": "INT_MISC.CLEARS_COUNT", + "PublicDescription": "Counts the number of speculative clears due to any type of branch misprediction or machine clears", + "SampleAfterValue": "500009", + "UMask": "0x1" + }, { "BriefDescription": "Counts cycles after recovery from a branch misprediction or machine clear till the first uop is issued from the resteered path.", "EventCode": "0xad",
tools/perf/pmu-events/arch/x86/sapphirerapids/spr-metrics.json +1171 -1112
2,787 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/sapphirerapids/uncore-other.json +60 -0
42 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Part of the diff is not shown here. View the raw message.
Ian Rogers
reviewerPATCH 27/51 perf vendor events intel: Refresh silvermont events
In reply to Ian RogersUpdate the silvermont events from 14 to 15. Generation was done using
https://github.com/intel/perfmon.
The most notable change is in corrections to event descriptions.
--- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- tools/perf/pmu-events/arch/x86/silvermont/frontend.json | 2 +- tools/perf/pmu-events/arch/x86/silvermont/pipeline.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
tools/perf/pmu-events/arch/x86/mapfile.csv +1 -1
@@ -23,7 +23,7 @@ GenuineIntel-6-1[AEF],v3,nehalemep,core GenuineIntel-6-2E,v3,nehalemex,core GenuineIntel-6-2A,v18,sandybridge,core GenuineIntel-6-(8F|CF),v1.11,sapphirerapids,core -GenuineIntel-6-(37|4A|4C|4D|5A),v14,silvermont,core +GenuineIntel-6-(37|4A|4C|4D|5A),v15,silvermont,core GenuineIntel-6-(4E|5E|8E|9E|A5|A6),v53,skylake,core GenuineIntel-6-55-[01234],v1.28,skylakex,core GenuineIntel-6-86,v1.20,snowridgex,core
tools/perf/pmu-events/arch/x86/silvermont/frontend.json +1 -1
@@ -11,7 +11,7 @@ "BriefDescription": "Counts the number of JCC baclears", "EventCode": "0xE6", "EventName": "BACLEARS.COND", - "PublicDescription": "The BACLEARS event counts the number of times the front end is resteered, mainly when the Branch Prediction Unit cannot provide a correct prediction and this is corrected by the Branch Address Calculator at the front end. The BACLEARS.COND event counts the number of JCC (Jump on Condtional Code) baclears.", + "PublicDescription": "The BACLEARS event counts the number of times the front end is resteered, mainly when the Branch Prediction Unit cannot provide a correct prediction and this is corrected by the Branch Address Calculator at the front end. The BACLEARS.COND event counts the number of JCC (Jump on Conditional Code) baclears.", "SampleAfterValue": "200003", "UMask": "0x10" },
tools/perf/pmu-events/arch/x86/silvermont/pipeline.json +1 -1
@@ -228,7 +228,7 @@ "BriefDescription": "Counts the number of cycles when no uops are allocated, the IQ is empty, and no other condition is blocking allocation.", "EventCode": "0xCA", "EventName": "NO_ALLOC_CYCLES.NOT_DELIVERED", - "PublicDescription": "The NO_ALLOC_CYCLES.NOT_DELIVERED event is used to measure front-end inefficiencies, i.e. when front-end of the machine is not delivering micro-ops to the back-end and the back-end is not stalled. This event can be used to identify if the machine is truly front-end bound. When this event occurs, it is an indication that the front-end of the machine is operating at less than its theoretical peak performance. Background: We can think of the processor pipeline as being divided into 2 broader parts: Front-end and Back-end. Front-end is responsible for fetching the instruction, decoding into micro-ops (uops) in machine understandable format and putting them into a micro-op queue to be consumed by back end. The back-end then takes these micro-ops, allocates the required resources. When all resources are ready, micro-ops are executed. If the back-end is not ready to accept micro-ops from the front-end, then we do not want to count these as front-end bottlenecks. However, whenever we have bottlenecks in the back-end, we will have allocation unit stalls and eventually forcing the front-end to wait until the back-end is ready to receive more UOPS. This event counts the cycles only when back-end is requesting more uops and front-end is not able to provide them. Some examples of conditions that cause front-end efficiencies are: Icache misses, ITLB misses, and decoder restrictions that limit the the front-end bandwidth.", + "PublicDescription": "The NO_ALLOC_CYCLES.NOT_DELIVERED event is used to measure front-end inefficiencies, i.e. when front-end of the machine is not delivering micro-ops to the back-end and the back-end is not stalled. This event can be used to identify if the machine is truly front-end bound. When this event occurs, it is an indication that the front-end of the machine is operating at less than its theoretical peak performance. Background: We can think of the processor pipeline as being divided into 2 broader parts: Front-end and Back-end. Front-end is responsible for fetching the instruction, decoding into micro-ops (uops) in machine understandable format and putting them into a micro-op queue to be consumed by back end. The back-end then takes these micro-ops, allocates the required resources. When all resources are ready, micro-ops are executed. If the back-end is not ready to accept micro-ops from the front-end, then we do not want to count these as front-end bottlenecks. However, whenever we have bottlenecks in the back-end, we will have allocation unit stalls and eventually forcing the front-end to wait until the back-end is ready to receive more UOPS. This event counts the cycles only when back-end is requesting more uops and front-end is not able to provide them. Some examples of conditions that cause front-end efficiencies are: Icache misses, ITLB misses, and decoder restrictions that limit the front-end bandwidth.", "SampleAfterValue": "200003", "UMask": "0x50" },
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 28/51 perf vendor events intel: Refresh skylake events
In reply to Ian RogersUpdate the skylake events from 53 to 54. Generation was done using
https://github.com/intel/perfmon.
Notable changes are updated events and event descriptions, TMA metrics are updated to version 4.5, TMA info metrics are renamed from their node name to be lower case and prefixed by tma_info_ and MetricThreshold expressions are added, smi_cost and transaction metric groups are added replicating existing hard coded metrics in stat-shadow.
--- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../pmu-events/arch/x86/skylake/cache.json | 25 +- .../pmu-events/arch/x86/skylake/frontend.json | 8 +- .../pmu-events/arch/x86/skylake/other.json | 1 + .../pmu-events/arch/x86/skylake/pipeline.json | 16 + .../arch/x86/skylake/skl-metrics.json | 1877 ++++++++++------- .../arch/x86/skylake/uncore-other.json | 1 + 7 files changed, 1115 insertions(+), 815 deletions(-)
tools/perf/pmu-events/arch/x86/mapfile.csv +1 -1
@@ -24,7 +24,7 @@ GenuineIntel-6-2E,v3,nehalemex,core GenuineIntel-6-2A,v18,sandybridge,core GenuineIntel-6-(8F|CF),v1.11,sapphirerapids,core GenuineIntel-6-(37|4A|4C|4D|5A),v15,silvermont,core -GenuineIntel-6-(4E|5E|8E|9E|A5|A6),v53,skylake,core +GenuineIntel-6-(4E|5E|8E|9E|A5|A6),v54,skylake,core GenuineIntel-6-55-[01234],v1.28,skylakex,core GenuineIntel-6-86,v1.20,snowridgex,core GenuineIntel-6-8[CD],v1.08,tigerlake,core
tools/perf/pmu-events/arch/x86/skylake/cache.json +10 -15
@@ -72,6 +72,7 @@ }, { "BriefDescription": "This event is deprecated. Refer to new event L2_LINES_OUT.USELESS_HWPF", + "Deprecated": "1", "EventCode": "0xF2", "EventName": "L2_LINES_OUT.USELESS_PREF", "SampleAfterValue": "200003",
@@ -232,20 +233,22 @@ "UMask": "0x4f" }, { - "BriefDescription": "All retired load instructions.", + "BriefDescription": "Retired load instructions.", "Data_LA": "1", "EventCode": "0xD0", "EventName": "MEM_INST_RETIRED.ALL_LOADS", "PEBS": "1", + "PublicDescription": "Counts all retired load instructions. This event accounts for SW prefetch instructions of PREFETCHNTA or PREFETCHT0/1/2 or PREFETCHW.", "SampleAfterValue": "2000003", "UMask": "0x81" }, { - "BriefDescription": "All retired store instructions.", + "BriefDescription": "Retired store instructions.", "Data_LA": "1", "EventCode": "0xD0", "EventName": "MEM_INST_RETIRED.ALL_STORES", "PEBS": "1", + "PublicDescription": "Counts all retired store instructions.", "SampleAfterValue": "2000003", "UMask": "0x82" },
@@ -443,7 +446,7 @@ "UMask": "0x80" }, { - "BriefDescription": "Cacheable and noncachaeble code read requests", + "BriefDescription": "Cacheable and non-cacheable code read requests", "EventCode": "0xB0", "EventName": "OFFCORE_REQUESTS.DEMAND_CODE_RD", "PublicDescription": "Counts both cacheable and non-cacheable code read requests.",
@@ -551,15 +554,7 @@ "UMask": "0x4" }, { - "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction", - "EventCode": "0xB7, 0xBB", - "EventName": "OFFCORE_RESPONSE", - "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", - "SampleAfterValue": "100003", - "UMask": "0x1" - }, - { - "BriefDescription": "Counts all demand code readshave any response type.", + "BriefDescription": "Counts all demand code reads have any response type.", "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7",
@@ -946,7 +941,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts demand data readshave any response type.", + "BriefDescription": "Counts demand data reads have any response type.", "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7",
@@ -1333,7 +1328,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts all demand data writes (RFOs)have any response type.", + "BriefDescription": "Counts all demand data writes (RFOs) have any response type.", "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7",
@@ -1720,7 +1715,7 @@ "UMask": "0x1" }, { - "BriefDescription": "Counts any other requestshave any response type.", + "BriefDescription": "Counts any other requests have any response type.", "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.OTHER.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7",
tools/perf/pmu-events/arch/x86/skylake/frontend.json +4 -4
@@ -322,7 +322,7 @@ "UMask": "0x4" }, { - "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", + "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy", "CounterMask": "1", "EventCode": "0x79", "EventName": "IDQ.MS_CYCLES",
@@ -331,7 +331,7 @@ "UMask": "0x30" }, { - "BriefDescription": "Cycles when uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", + "BriefDescription": "Cycles when uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy", "CounterMask": "1", "EventCode": "0x79", "EventName": "IDQ.MS_DSB_CYCLES",
@@ -340,7 +340,7 @@ "UMask": "0x10" }, { - "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", + "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy", "EventCode": "0x79", "EventName": "IDQ.MS_MITE_UOPS", "PublicDescription": "Counts the number of uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may 'bypass' the IDQ.",
@@ -358,7 +358,7 @@ "UMask": "0x30" }, { - "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", + "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy", "EventCode": "0x79", "EventName": "IDQ.MS_UOPS", "PublicDescription": "Counts the total number of uops delivered by the Microcode Sequencer (MS). Any instruction over 4 uops will be delivered by the MS. Some instructions such as transcendentals may additionally generate uops from the MS.",
tools/perf/pmu-events/arch/x86/skylake/other.json +1 -0
@@ -8,6 +8,7 @@ "UMask": "0x1" }, { + "BriefDescription": "MEMORY_DISAMBIGUATION.HISTORY_RESET", "EventCode": "0x09", "EventName": "MEMORY_DISAMBIGUATION.HISTORY_RESET", "SampleAfterValue": "2000003",
tools/perf/pmu-events/arch/x86/skylake/pipeline.json +16 -0
@@ -93,6 +93,22 @@ "SampleAfterValue": "400009", "UMask": "0x10" }, + { + "BriefDescription": "Speculative and retired mispredicted macro conditional branches", + "EventCode": "0x89", + "EventName": "BR_MISP_EXEC.ALL_BRANCHES", + "PublicDescription": "This event counts both taken and not taken speculative and retired mispredicted branch instructions.", + "SampleAfterValue": "200003", + "UMask": "0xff" + }, + { + "BriefDescription": "Speculative mispredicted indirect branches", + "EventCode": "0x89", + "EventName": "BR_MISP_EXEC.INDIRECT", + "PublicDescription": "Counts speculatively miss-predicted indirect branches at execution time. Counts for indirect near CALL or JMP instructions (RET excluded).", + "SampleAfterValue": "200003", + "UMask": "0xe4" + }, { "BriefDescription": "All mispredicted macro branch instructions retired.", "EventCode": "0xC5",
tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json +1082 -795
2,279 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/skylake/uncore-other.json +1 -0
@@ -33,6 +33,7 @@ "Unit": "ARB" }, { + "BriefDescription": "UNC_ARB_TRK_REQUESTS.ALL", "EventCode": "0x81", "EventName": "UNC_ARB_TRK_REQUESTS.ALL", "PerPkg": "1",
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 29/51 perf vendor events intel: Refresh skylakex metrics
In reply to Ian RogersUpdate the skylakex events from 1.28 to 1.29 and metrics to TMA version 4.5. Generation was done using
https://github.com/intel/perfmon.
Notable changes are TMA info metrics are renamed from their node name to be lower case and prefixed by tma_info_, MetricThreshold expressions are added, "Sample with" documentation is added to many TMA metrics, smi_cost and transaction metric groups are added replicating existing hard coded metrics in stat-shadow.
--- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../pmu-events/arch/x86/skylakex/cache.json | 8 +- .../arch/x86/skylakex/frontend.json | 8 +- .../arch/x86/skylakex/pipeline.json | 16 + .../arch/x86/skylakex/skx-metrics.json | 2097 +++++++++-------- .../arch/x86/skylakex/uncore-memory.json | 2 +- .../arch/x86/skylakex/uncore-other.json | 96 +- .../arch/x86/skylakex/uncore-power.json | 6 +- 8 files changed, 1167 insertions(+), 1068 deletions(-)
tools/perf/pmu-events/arch/x86/mapfile.csv +1 -1
@@ -25,7 +25,7 @@ GenuineIntel-6-2A,v18,sandybridge,core GenuineIntel-6-(8F|CF),v1.11,sapphirerapids,core GenuineIntel-6-(37|4A|4C|4D|5A),v15,silvermont,core GenuineIntel-6-(4E|5E|8E|9E|A5|A6),v54,skylake,core -GenuineIntel-6-55-[01234],v1.28,skylakex,core +GenuineIntel-6-55-[01234],v1.29,skylakex,core GenuineIntel-6-86,v1.20,snowridgex,core GenuineIntel-6-8[CD],v1.08,tigerlake,core GenuineIntel-6-2C,v3,westmereep-dp,core
tools/perf/pmu-events/arch/x86/skylakex/cache.json +5 -3
@@ -234,20 +234,22 @@ "UMask": "0x4f" }, { - "BriefDescription": "All retired load instructions.", + "BriefDescription": "Retired load instructions.", "Data_LA": "1", "EventCode": "0xD0", "EventName": "MEM_INST_RETIRED.ALL_LOADS", "PEBS": "1", + "PublicDescription": "Counts all retired load instructions. This event accounts for SW prefetch instructions of PREFETCHNTA or PREFETCHT0/1/2 or PREFETCHW.", "SampleAfterValue": "2000003", "UMask": "0x81" }, { - "BriefDescription": "All retired store instructions.", + "BriefDescription": "Retired store instructions.", "Data_LA": "1", "EventCode": "0xD0", "EventName": "MEM_INST_RETIRED.ALL_STORES", "PEBS": "1", + "PublicDescription": "Counts all retired store instructions.", "SampleAfterValue": "2000003", "UMask": "0x82" },
@@ -484,7 +486,7 @@ "UMask": "0x80" }, { - "BriefDescription": "Cacheable and noncachaeble code read requests", + "BriefDescription": "Cacheable and non-cacheable code read requests", "EventCode": "0xB0", "EventName": "OFFCORE_REQUESTS.DEMAND_CODE_RD", "PublicDescription": "Counts both cacheable and non-cacheable code read requests.",
tools/perf/pmu-events/arch/x86/skylakex/frontend.json +4 -4
@@ -322,7 +322,7 @@ "UMask": "0x4" }, { - "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", + "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy", "CounterMask": "1", "EventCode": "0x79", "EventName": "IDQ.MS_CYCLES",
@@ -331,7 +331,7 @@ "UMask": "0x30" }, { - "BriefDescription": "Cycles when uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", + "BriefDescription": "Cycles when uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy", "CounterMask": "1", "EventCode": "0x79", "EventName": "IDQ.MS_DSB_CYCLES",
@@ -340,7 +340,7 @@ "UMask": "0x10" }, { - "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", + "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy", "EventCode": "0x79", "EventName": "IDQ.MS_MITE_UOPS", "PublicDescription": "Counts the number of uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may 'bypass' the IDQ.",
@@ -358,7 +358,7 @@ "UMask": "0x30" }, { - "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", + "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequencer (MS) is busy", "EventCode": "0x79", "EventName": "IDQ.MS_UOPS", "PublicDescription": "Counts the total number of uops delivered by the Microcode Sequencer (MS). Any instruction over 4 uops will be delivered by the MS. Some instructions such as transcendentals may additionally generate uops from the MS.",
tools/perf/pmu-events/arch/x86/skylakex/pipeline.json +16 -0
@@ -93,6 +93,22 @@ "SampleAfterValue": "400009", "UMask": "0x10" }, + { + "BriefDescription": "Speculative and retired mispredicted macro conditional branches", + "EventCode": "0x89", + "EventName": "BR_MISP_EXEC.ALL_BRANCHES", + "PublicDescription": "This event counts both taken and not taken speculative and retired mispredicted branch instructions.", + "SampleAfterValue": "200003", + "UMask": "0xff" + }, + { + "BriefDescription": "Speculative mispredicted indirect branches", + "EventCode": "0x89", + "EventName": "BR_MISP_EXEC.INDIRECT", + "PublicDescription": "Counts speculatively miss-predicted indirect branches at execution time. Counts for indirect near CALL or JMP instructions (RET excluded).", + "SampleAfterValue": "200003", + "UMask": "0xe4" + }, { "BriefDescription": "All mispredicted macro branch instructions retired.", "EventCode": "0xC5",
tools/perf/pmu-events/arch/x86/skylakex/skx-metrics.json +1085 -1012
2,582 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/skylakex/uncore-memory.json +1 -1
@@ -1952,7 +1952,7 @@ "EventCode": "0x81", "EventName": "UNC_M_WPQ_OCCUPANCY", "PerPkg": "1", - "PublicDescription": "Counts the number of entries in the Write Pending Queue (WPQ) at each cycle. This can then be used to calculate both the average queue occupancy (in conjunction with the number of cycles not empty) and the average latency (in conjunction with the number of allocations). The WPQ is used to schedule writes out to the memory controller and to track the requests. Requests allocate into the WPQ soon after they enter the memory controller, and need credits for an entry in this buffer before being sent from the CHA to the iMC (memory controller). They deallocate after being issued to DRAM. Write requests themselves are able to complete (from the perspective of the rest of the system) as soon they have 'posted' to the iMC. This is not to be confused with actually performing the write to DRAM. Therefore, the average latency for this queue is actually not useful for deconstruction intermediate write latencies. So, we provide filtering based on if the request has posted or not. By using the 'not posted' filter, we can track how long writes spent in the iMC before completions were sent to the HA. The 'posted' filter, on the other hand, provides information about how much queueing is actually happenning in the iMC for writes before they are actually issued to memory. High average occupancies will generally coincide with high write major mode counts. Is there a filter of sorts???", + "PublicDescription": "Counts the number of entries in the Write Pending Queue (WPQ) at each cycle. This can then be used to calculate both the average queue occupancy (in conjunction with the number of cycles not empty) and the average latency (in conjunction with the number of allocations). The WPQ is used to schedule writes out to the memory controller and to track the requests. Requests allocate into the WPQ soon after they enter the memory controller, and need credits for an entry in this buffer before being sent from the CHA to the iMC (memory controller). They deallocate after being issued to DRAM. Write requests themselves are able to complete (from the perspective of the rest of the system) as soon they have 'posted' to the iMC. This is not to be confused with actually performing the write to DRAM. Therefore, the average latency for this queue is actually not useful for deconstruction intermediate write latencies. So, we provide filtering based on if the request has posted or not. By using the 'not posted' filter, we can track how long writes spent in the iMC before completions were sent to the HA. The 'posted' filter, on the other hand, provides information about how much queueing is actually happening in the iMC for writes before they are actually issued to memory. High average occupancies will generally coincide with high write major mode counts. Is there a filter of sorts???", "Unit": "iMC" }, {
tools/perf/pmu-events/arch/x86/skylakex/uncore-other.json +52 -44
316 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/skylakex/uncore-power.json +3 -3
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Part of the diff is not shown here. View the raw message.
Ian Rogers
reviewerPATCH 30/51 perf vendor events intel: Refresh tigerlake events
In reply to Ian RogersUpdate the tigerlake events from 1.08 to 1.10. Generation was done using https://github.com/intel/perfmon.
Notable changes are new events and event descriptions, TMA metrics are updated to version 4.5, TMA info metrics are renamed from their node name to be lower case and prefixed by tma_info_, MetricThreshold expressions are added, smi_cost and transaction metric groups are added replicating existing hard coded metrics in stat-shadow.
--- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../arch/x86/tigerlake/floating-point.json | 31 + .../arch/x86/tigerlake/pipeline.json | 18 + .../arch/x86/tigerlake/tgl-metrics.json | 1942 ++++++++++------- .../arch/x86/tigerlake/uncore-other.json | 28 +- 5 files changed, 1198 insertions(+), 823 deletions(-)
tools/perf/pmu-events/arch/x86/mapfile.csv +1 -1
@@ -27,7 +27,7 @@ GenuineIntel-6-(37|4A|4C|4D|5A),v15,silvermont,core GenuineIntel-6-(4E|5E|8E|9E|A5|A6),v54,skylake,core GenuineIntel-6-55-[01234],v1.29,skylakex,core GenuineIntel-6-86,v1.20,snowridgex,core -GenuineIntel-6-8[CD],v1.08,tigerlake,core +GenuineIntel-6-8[CD],v1.10,tigerlake,core GenuineIntel-6-2C,v3,westmereep-dp,core GenuineIntel-6-25,v3,westmereep-sp,core GenuineIntel-6-2F,v3,westmereex,core
tools/perf/pmu-events/arch/x86/tigerlake/floating-point.json +31 -0
@@ -39,6 +39,14 @@ "SampleAfterValue": "100003", "UMask": "0x20" }, + { + "BriefDescription": "Number of SSE/AVX computational 128-bit packed single and 256-bit packed double precision FP instructions retired; some instructions will count twice as noted below. Each count represents 2 or/and 4 computation operations, 1 for each element. Applies to SSE* and AVX* packed single precision and packed double precision FP instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX RCP14 RSQRT14 SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB count twice as they perform 2 calculations per element.", + "EventCode": "0xc7", + "EventName": "FP_ARITH_INST_RETIRED.4_FLOPS", + "PublicDescription": "Number of SSE/AVX computational 128-bit packed single precision and 256-bit packed double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 2 or/and 4 computation operations, one for each element. Applies to SSE* and AVX* packed single precision floating-point and packed double precision floating-point instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX RCP14 RSQRT14 SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", + "SampleAfterValue": "100003", + "UMask": "0x18" + }, { "BriefDescription": "Counts number of SSE/AVX computational 512-bit packed double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 8 computation operations, one for each element. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT RSQRT14 RCP14 FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element.", "EventCode": "0xc7",
@@ -55,6 +63,22 @@ "SampleAfterValue": "100003", "UMask": "0x80" }, + { + "BriefDescription": "Number of SSE/AVX computational 256-bit packed single precision and 512-bit packed double precision FP instructions retired; some instructions will count twice as noted below. Each count represents 8 computation operations, 1 for each element. Applies to SSE* and AVX* packed single precision and double precision FP instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX SQRT RSQRT RSQRT14 RCP RCP14 DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB count twice as they perform 2 calculations per element.", + "EventCode": "0xc7", + "EventName": "FP_ARITH_INST_RETIRED.8_FLOPS", + "PublicDescription": "Number of SSE/AVX computational 256-bit packed single precision and 512-bit packed double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 8 computation operations, one for each element. Applies to SSE* and AVX* packed single precision and double precision floating-point instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX SQRT RSQRT RSQRT14 RCP RCP14 DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", + "SampleAfterValue": "100003", + "UMask": "0x60" + }, + { + "BriefDescription": "Number of SSE/AVX computational scalar floating-point instructions retired; some instructions will count twice as noted below. Applies to SSE* and AVX* scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RCP14 RSQRT14 RANGE SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.", + "EventCode": "0xc7", + "EventName": "FP_ARITH_INST_RETIRED.SCALAR", + "PublicDescription": "Number of SSE/AVX computational scalar single precision and double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 1 computational operation. Applies to SSE* and AVX* scalar single precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT RSQRT RCP FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", + "SampleAfterValue": "1000003", + "UMask": "0x3" + }, { "BriefDescription": "Counts number of SSE/AVX computational scalar double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 1 computational operation. Applies to SSE* and AVX* scalar double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element.", "EventCode": "0xc7",
@@ -70,5 +94,12 @@ "PublicDescription": "Number of SSE/AVX computational scalar single precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 1 computational operation. Applies to SSE* and AVX* scalar single precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT RSQRT RCP FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", "SampleAfterValue": "100003", "UMask": "0x2" + }, + { + "BriefDescription": "Number of any Vector retired FP arithmetic instructions", + "EventCode": "0xc7", + "EventName": "FP_ARITH_INST_RETIRED.VECTOR", + "SampleAfterValue": "1000003", + "UMask": "0xfc" } ]
tools/perf/pmu-events/arch/x86/tigerlake/pipeline.json +18 -0
@@ -158,6 +158,15 @@ "SampleAfterValue": "50021", "UMask": "0x20" }, + { + "BriefDescription": "This event counts the number of mispredicted ret instructions retired. Non PEBS", + "EventCode": "0xc5", + "EventName": "BR_MISP_RETIRED.RET", + "PEBS": "1", + "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts mispredicted return instructions retired.", + "SampleAfterValue": "50021", + "UMask": "0x8" + }, { "BriefDescription": "Cycle counts are evenly distributed between active threads in the Core.", "EventCode": "0xec",
@@ -383,6 +392,15 @@ "SampleAfterValue": "2000003", "UMask": "0x3" }, + { + "BriefDescription": "Clears speculative count", + "CounterMask": "1", + "EventCode": "0x0d", + "EventName": "INT_MISC.CLEARS_COUNT", + "PublicDescription": "Counts the number of speculative clears due to any type of branch misprediction or machine clears", + "SampleAfterValue": "500009", + "UMask": "0x1" + }, { "BriefDescription": "Counts cycles after recovery from a branch misprediction or machine clear till the first uop is issued from the resteered path.", "EventCode": "0x0d",
tools/perf/pmu-events/arch/x86/tigerlake/tgl-metrics.json +1122 -820
2,352 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/tigerlake/uncore-other.json +26 -2
@@ -24,7 +24,7 @@ "Unit": "ARB" }, { - "BriefDescription": "Number of coherent read requests sent to memory controller that were issued by any core.", + "BriefDescription": "This event is deprecated. Refer to new event UNC_ARB_REQ_TRK_REQUEST.DRD", "EventCode": "0x81", "EventName": "UNC_ARB_DAT_REQUESTS.RD", "PerPkg": "1",
@@ -40,7 +40,15 @@ "Unit": "ARB" }, { - "BriefDescription": "This event is deprecated. Refer to new event UNC_ARB_DAT_REQUESTS.RD", + "BriefDescription": "Each cycle count number of 'valid' coherent Data Read entries . Such entry is defined as valid when it is allocated till deallocation. Doesn't include prefetches [This event is alias to UNC_ARB_TRK_OCCUPANCY.RD]", + "EventCode": "0x80", + "EventName": "UNC_ARB_REQ_TRK_OCCUPANCY.DRD", + "PerPkg": "1", + "UMask": "0x2", + "Unit": "ARB" + }, + { + "BriefDescription": "Number of all coherent Data Read entries. Doesn't include prefetches [This event is alias to UNC_ARB_TRK_REQUESTS.RD]", "EventCode": "0x81", "EventName": "UNC_ARB_REQ_TRK_REQUEST.DRD", "PerPkg": "1",
@@ -55,6 +63,14 @@ "UMask": "0x1", "Unit": "ARB" }, + { + "BriefDescription": "Each cycle count number of 'valid' coherent Data Read entries . Such entry is defined as valid when it is allocated till deallocation. Doesn't include prefetches [This event is alias to UNC_ARB_REQ_TRK_OCCUPANCY.DRD]", + "EventCode": "0x80", + "EventName": "UNC_ARB_TRK_OCCUPANCY.RD", + "PerPkg": "1", + "UMask": "0x2", + "Unit": "ARB" + }, { "BriefDescription": "UNC_ARB_TRK_REQUESTS.ALL", "EventCode": "0x81",
@@ -63,6 +79,14 @@ "UMask": "0x1", "Unit": "ARB" }, + { + "BriefDescription": "Number of all coherent Data Read entries. Doesn't include prefetches [This event is alias to UNC_ARB_REQ_TRK_REQUEST.DRD]", + "EventCode": "0x81", + "EventName": "UNC_ARB_TRK_REQUESTS.RD", + "PerPkg": "1", + "UMask": "0x2", + "Unit": "ARB" + }, { "BriefDescription": "UNC_CLOCK.SOCKET", "EventCode": "0xff",
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 31/51 perf vendor events intel: Refresh westmereep-dp events
In reply to Ian RogersUpdate the westmereep-dp events from 3 to 4. Generation was done using https://github.com/intel/perfmon.
The most notable change is in corrections to event descriptions.
--- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- tools/perf/pmu-events/arch/x86/westmereep-dp/cache.json | 2 +- .../perf/pmu-events/arch/x86/westmereep-dp/virtual-memory.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
tools/perf/pmu-events/arch/x86/mapfile.csv +1 -1
@@ -28,7 +28,7 @@ GenuineIntel-6-(4E|5E|8E|9E|A5|A6),v54,skylake,core GenuineIntel-6-55-[01234],v1.29,skylakex,core GenuineIntel-6-86,v1.20,snowridgex,core GenuineIntel-6-8[CD],v1.10,tigerlake,core -GenuineIntel-6-2C,v3,westmereep-dp,core +GenuineIntel-6-2C,v4,westmereep-dp,core GenuineIntel-6-25,v3,westmereep-sp,core GenuineIntel-6-2F,v3,westmereex,core AuthenticAMD-23-([12][0-9A-F]|[0-9A-F]),v2,amdzen1,core
tools/perf/pmu-events/arch/x86/westmereep-dp/cache.json +1 -1
@@ -182,7 +182,7 @@ "UMask": "0x20" }, { - "BriefDescription": "L2 lines alloacated", + "BriefDescription": "L2 lines allocated", "EventCode": "0xF1", "EventName": "L2_LINES_IN.ANY", "SampleAfterValue": "100000",
tools/perf/pmu-events/arch/x86/westmereep-dp/virtual-memory.json +1 -1
@@ -56,7 +56,7 @@ "UMask": "0x80" }, { - "BriefDescription": "DTLB misses casued by low part of address", + "BriefDescription": "DTLB misses caused by low part of address", "EventCode": "0x49", "EventName": "DTLB_MISSES.PDE_MISS", "SampleAfterValue": "200000",
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 32/51 perf jevents: Add rand support to metrics
In reply to Ian Rogersrand (reverse and) is useful in the parsing of metric thresholds. Update the documentation on operator precedence to clarify the simple expression parser and python differences wrt binary/logical operators.
--- tools/perf/pmu-events/metric.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
tools/perf/pmu-events/metric.py +7 -1
@@ -44,6 +44,9 @@ class Expression: def __and__(self, other: Union[int, float, 'Expression']) -> 'Operator': return Operator('&', self, other) + def __rand__(self, other: Union[int, float, 'Expression']) -> 'Operator': + return Operator('&', other, self) + def __lt__(self, other: Union[int, float, 'Expression']) -> 'Operator': return Operator('<', self, other)
@@ -88,7 +91,10 @@ def _Constify(val: Union[bool, int, float, Expression]) -> Expression: # Simple lookup for operator precedence, used to avoid unnecessary -# brackets. Precedence matches that of python and the simple expression parser. +# brackets. Precedence matches that of the simple expression parser +# but differs from python where comparisons are lower precedence than +# the bitwise &, ^, | but not the logical versions that the expression +# parser doesn't have. _PRECEDENCE = { '|': 0, '^': 1,
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 33/51 perf jevent: Parse metric thresholds
In reply to Ian RogersParse the metric threshold and add to the pmu-events.c file. The metric isn't parsed as the parser uses python's parser and will break the operator precedence.
--- tools/perf/pmu-events/jevents.py | 7 ++++++- tools/perf/pmu-events/pmu-events.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)
tools/perf/pmu-events/jevents.py +6 -1
@@ -51,7 +51,7 @@ _json_event_attributes = [ # Attributes that are in pmu_metric rather than pmu_event. _json_metric_attributes = [ - 'metric_name', 'metric_group', 'metric_expr', 'desc', + 'metric_name', 'metric_group', 'metric_expr', 'metric_threshold', 'desc', 'long_desc', 'unit', 'compat', 'aggr_mode', 'event_grouping' ] # Attributes that are bools or enum int values, encoded as '0', '1',...
@@ -306,6 +306,9 @@ class JsonEvent: self.metric_expr = None if 'MetricExpr' in jd: self.metric_expr = metric.ParsePerfJson(jd['MetricExpr']).Simplify() + # Note, the metric formula for the threshold isn't parsed as the & + # and > have incorrect precedence. + self.metric_threshold = jd.get('MetricThreshold') arch_std = jd.get('ArchStdEvent') if precise and self.desc and '(Precise Event)' not in self.desc:
@@ -362,6 +365,8 @@ class JsonEvent: # Convert parsed metric expressions into a string. Slashes # must be doubled in the file. x = x.ToPerfJson().replace('\\', '\\\\') + if metric and x and attr == 'metric_threshold': + x = x.replace('\\', '\\\\') if attr in _json_enum_attributes: s += x if x else '0' else:
tools/perf/pmu-events/pmu-events.h +1 -0
@@ -54,6 +54,7 @@ struct pmu_metric {const char *metric_name;const char *metric_group;const char *metric_expr; +const char *metric_threshold;const char *unit;const char *compat;const char *desc;
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 34/51 perf pmu-events: Test parsing metric thresholds with the fake PMU
In reply to Ian RogersTest the correctness of metric thresholds by testing them all with the fake PMU logic.
--- tools/perf/tests/pmu-events.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
tools/perf/tests/pmu-events.c +22 -0
@@ -1021,12 +1021,34 @@ static int test__parsing_fake(struct test_suite *test __maybe_unused,return pmu_for_each_sys_metric (test__parsing_fake_callback,NULL ); } +static int test__parsing_threshold_callback (const struct pmu_metric *pm, +const struct pmu_metrics_table *table__maybe_unused , +void *data__maybe_unused ) +{ +if (!pm->metric_threshold) +return 0 ; +return metric_parse_fake (pm->metric_name, pm->metric_threshold); +} + +static int test__parsing_threshold (struct test_suite *test__maybe_unused , +int subtest__maybe_unused ) +{ +int err =0 ; + + err =pmu_for_each_core_metric (test__parsing_threshold_callback,NULL ); +if (err) +return err; + +return pmu_for_each_sys_metric (test__parsing_threshold_callback,NULL ); +} +static struct test_case pmu_events_tests[] = {TEST_CASE ("PMU event table sanity" , pmu_event_table),TEST_CASE ("PMU event map aliases" , aliases),TEST_CASE_REASON ("Parsing of PMU event table metrics" , parsing,"some metrics failed" ),TEST_CASE ("Parsing of PMU event table metrics with fake PMUs" , parsing_fake), +TEST_CASE ("Parsing of metric thresholds with fake PMUs" , parsing_threshold), { .name =NULL , } };
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 35/51 perf list: Support for printing metric thresholds
In reply to Ian RogersAdd to json output by default. For regular output, only enable with the --detail flag.
--- tools/perf/builtin-list.c | 13 ++++++++++++- tools/perf/util/metricgroup.c | 3 +++ tools/perf/util/print-events.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-)
tools/perf/builtin-list.c +12 -1
@@ -168,6 +168,7 @@ static void default_print_metric(void *ps,const char *desc, const char *long_desc, const char *expr, + const char *threshold, const char *unit __maybe_unused) { struct print_state *print_state = ps;
@@ -227,6 +228,11 @@ static void default_print_metric(void *ps,wordwrap (expr,8 ,pager_get_columns (),0 );printf ("]\n" ); } +if (threshold && print_state->detailed) { +printf ("%*s" ,8 ,"[" ); +wordwrap (threshold,8 ,pager_get_columns (),0 ); +printf ("]\n" ); + } }struct json_print_state {
@@ -367,7 +373,7 @@ static void json_print_event(void *ps, const char *pmu_name, const char *topic,static void json_print_metric (void *ps__maybe_unused ,const char *group,const char *name,const char *desc,const char *long_desc,const char *expr, -const char *unit) +const char *threshold,const char *unit) {struct json_print_state *print_state = ps;bool need_sep = false;
@@ -388,6 +394,11 @@ static void json_print_metric(void *ps __maybe_unused, const char *group,fix_escape_printf (&buf,"%s\t\"MetricExpr\": \"%S\"" , need_sep ?",\n" :"" , expr); need_sep = true; } +if (threshold) { +fix_escape_printf (&buf,"%s\t\"MetricThreshold\": \"%S\"" , need_sep ?",\n" :"" , + threshold); + need_sep = true; + }if (unit) {fix_escape_printf (&buf,"%s\t\"ScaleUnit\": \"%S\"" , need_sep ?",\n" :"" , unit); need_sep = true;
tools/perf/util/metricgroup.c +3 -0
@@ -368,6 +368,7 @@ struct mep {const char *metric_desc;const char *metric_long_desc;const char *metric_expr; +const char *metric_threshold;const char *metric_unit; };
@@ -447,6 +448,7 @@ static int metricgroup__add_to_mep_groups(const struct pmu_metric *pm, me->metric_desc = pm->desc; me->metric_long_desc = pm->long_desc; me->metric_expr = pm->metric_expr; + me->metric_threshold = pm->metric_threshold; me->metric_unit = pm->unit; } }
@@ -522,6 +524,7 @@ void metricgroup__print(const struct print_callbacks *print_cb, void *print_stat me->metric_desc, me->metric_long_desc, me->metric_expr, + me->metric_threshold, me->metric_unit); next =rb_next (node);rblist__remove_node (&groups, node);
tools/perf/util/print-events.h +1 -0
@@ -23,6 +23,7 @@ struct print_callbacks {const char *desc, const char *long_desc, const char *expr, + const char *threshold, const char *unit); };
Signature · 7 lines
2.39.2.637.g21b0678d19-goog _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Ian Rogers
reviewerPATCH 36/51 perf metric: Compute and print threshold values
In reply to Ian RogersCompute the threshold metric and use it to color the metric value as red or green. The threshold expression is used to generate the set of events as the threshold may require additional events. A later patch make this behavior optional with a --metric-no-threshold flag.
--- tools/perf/util/metricgroup.c | 24 +++++++++++++++++++++--- tools/perf/util/metricgroup.h | 1 + tools/perf/util/stat-shadow.c | 24 ++++++++++++++++-------- 3 files changed, 38 insertions(+), 11 deletions(-)
tools/perf/util/metricgroup.c +21 -3
@@ -129,6 +129,8 @@ struct metric {const char *modifier;/** The expression to parse, for example, "instructions/cycles". */ const char *metric_expr; +/** Optional threshold expression where zero value is green, otherwise red. */ +const char *metric_threshold;/** * The "ScaleUnit" that scales and adds a unit to the metric during * output.
@@ -222,6 +224,7 @@ static struct metric *metric__new(const struct pmu_metric *pm, goto out_err; } m->metric_expr = pm->metric_expr; + m->metric_threshold = pm->metric_threshold; m->metric_unit = pm->unit; m->pctx->sctx.user_requested_cpu_list =NULL ;if (user_requested_cpu_list) {
@@ -901,6 +904,7 @@ static int __add_metric(struct list_head *metric_list,const struct visited_metric *vm;int ret;bool is_root = !root_metric; +const char *expr;struct visited_metric visited_node = { .name = pm->metric_name, .parent = visited,
@@ -963,16 +967,29 @@ static int __add_metric(struct list_head *metric_list,* For both the parent and referenced metrics, we parse * all the metric's IDs and add it to the root context. */ -if (expr__find_ids (pm->metric_expr,NULL , root_metric->pctx) <0 ) { + ret =0 ; + expr = pm->metric_expr; +if (is_root && pm->metric_threshold) { +/* +* Threshold expressions are built off the actual metric. Switch +* to use that in case of additional necessary events. Change +* the visited node name to avoid this being flagged as +* recursion. +*/ +assert (strstr (pm->metric_threshold, pm->metric_name)); + expr = pm->metric_threshold; + visited_node.name ="__threshold__" ; + } +if (expr__find_ids (expr,NULL , root_metric->pctx) <0 ) {/* Broken metric. */ ret = -EINVAL ; - }else { + } +if (!ret) {/* Resolve referenced metrics. */ ret =resolve_metric (metric_list, modifier, metric_no_group, user_requested_cpu_list, system_wide, root_metric, &visited_node, table); } -if (ret) {if (is_root)metric__free (root_metric);
@@ -1554,6 +1571,7 @@ static int parse_groups(struct evlist *perf_evlist, const char *str,free (metric_events); goto out; } + expr->metric_threshold = m->metric_threshold; expr->metric_unit = m->metric_unit; expr->metric_events = metric_events; expr->runtime = m->pctx->sctx.runtime;
tools/perf/util/metricgroup.h +1 -0
@@ -47,6 +47,7 @@ struct metric_expr {const char *metric_expr;/** The name of the meric such as "IPC". */ const char *metric_name; +const char *metric_threshold;/** * The "ScaleUnit" that scales and adds a unit to the metric during * output. For example, "6.4e-05MiB" means to scale the resulting metric
tools/perf/util/stat-shadow.c +16 -8
@@ -777,6 +777,7 @@ static int prepare_metric(struct evsel **metric_events, static void generic_metric(struct perf_stat_config *config, const char *metric_expr, + const char *metric_threshold, struct evsel **metric_events, struct metric_ref *metric_refs, char *name,
@@ -789,9 +790,10 @@ static void generic_metric(struct perf_stat_config *config, {print_metric_t print_metric = out->print_metric;struct expr_parse_ctx *pctx; -double ratio, scale; +double ratio, scale, threshold;int i;void *ctxp = out->ctx; +const char *color =NULL ; pctx =expr__ctx_new ();if (!pctx)
@@ -811,6 +813,12 @@ static void generic_metric(struct perf_stat_config *config,char *unit;char metric_bf[64 ]; +if (metric_threshold && +expr__parse (&threshold, pctx, metric_threshold) ==0 ) { + color =fpclassify (threshold) ==FP_ZERO + ?PERF_COLOR_GREEN :PERF_COLOR_RED ; + } +if (metric_unit && metric_name) {if (perf_pmu__convert_scale (metric_unit, &unit, &scale) >=0 ) {
@@ -823,22 +831,22 @@ static void generic_metric(struct perf_stat_config *config,scnprintf (metric_bf,sizeof (metric_bf),"%s %s" , unit, metric_name); -print_metric (config, ctxp,NULL ,"%8.1f" , +print_metric (config, ctxp, color,"%8.1f" , metric_bf, ratio); }else { -print_metric (config, ctxp,NULL ,"%8.2f" , +print_metric (config, ctxp, color,"%8.2f" , metric_name ? metric_name : out->force_header ? name :"" , ratio); } }else { -print_metric (config, ctxp,NULL ,NULL , +print_metric (config, ctxp, color,/*unit=*/ NULL , out->force_header ? (metric_name ? metric_name : name) :"" ,0 ); } }else { -print_metric (config, ctxp,NULL ,NULL , +print_metric (config, ctxp, color,/*unit=*/ NULL , out->force_header ? (metric_name ? metric_name : name) :"" ,0 ); }
@@ -1214,9 +1222,9 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config, list_for_each_entry (mexp, &me->head, nd) {if (num++ >0 ) out->new_line (config, ctxp); -generic_metric (config, mexp->metric_expr, mexp->metric_events, - mexp->metric_refs, evsel->name, mexp->metric_name, - mexp->metric_unit, mexp->runtime, +generic_metric (config, mexp->metric_expr, mexp->metric_threshold, + mexp->metric_events, mexp->metric_refs, evsel->name, + mexp->metric_name, mexp->metric_unit, mexp->runtime, map_idx, out, st); } }
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 37/51 perf expr: More explicit NAN handling
In reply to Ian RogersComparison and logical operations on NAN won't ensure the result is NAN. Ensure NANs are propogated so that threshold expressions like "tma_fetch_latency > 0.1 & tma_frontend_bound > 0.15" don't yield a number when the components are NAN.
--- tools/perf/util/expr.y | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
tools/perf/util/expr.y +10 -2
@@ -127,7 +127,11 @@ static struct ids handle_id(struct expr_parse_ctx *ctx, char *id, if (!compute_ids || (is_const(LHS.val) && is_const(RHS.val))) { \ assert(LHS.ids == NULL); \ assert(RHS.ids == NULL); \ - RESULT.val = (long)LHS.val OP (long)RHS.val; \ + if (isnan(LHS.val) || isnan(RHS.val)) { \ + RESULT.val = NAN; \ + } else { \ + RESULT.val = (long)LHS.val OP (long)RHS.val; \ + } \ RESULT.ids = NULL; \ } else { \ RESULT = union_expr(LHS, RHS); \
@@ -137,7 +141,11 @@ static struct ids handle_id(struct expr_parse_ctx *ctx, char *id, if (!compute_ids || (is_const(LHS.val) && is_const(RHS.val))) { \ assert(LHS.ids == NULL); \ assert(RHS.ids == NULL); \ - RESULT.val = LHS.val OP RHS.val; \ + if (isnan(LHS.val) || isnan(RHS.val)) { \ + RESULT.val = NAN; \ + } else { \ + RESULT.val = LHS.val OP RHS.val; \ + } \ RESULT.ids = NULL; \ } else { \ RESULT = union_expr(LHS, RHS); \
Signature · 7 lines
2.39.2.637.g21b0678d19-goog _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Ian Rogers
reviewerPATCH 38/51 perf metric: Add --metric-no-threshold option
In reply to Ian RogersThresholds may need additional events, this can impact things like sharing groups of events to avoid multiplexing. Add a flag to make the threshold calculations optional. The threshold will still be computed if no additional events are necessary.
--- tools/perf/builtin-stat.c | 4 +++ tools/perf/tests/expand-cgroup.c | 3 +- tools/perf/tests/parse-metric.c | 1 - tools/perf/tests/pmu-events.c | 4 +-- tools/perf/util/metricgroup.c | 62 ++++++++++++++++++++------------ tools/perf/util/metricgroup.h | 3 +- tools/perf/util/stat-shadow.c | 3 +- tools/perf/util/stat.h | 1 + 8 files changed, 49 insertions(+), 32 deletions(-)
tools/perf/builtin-stat.c +4 -0
@@ -1256,6 +1256,8 @@ static struct option stat_options[] = { "don't group metric events, impacts multiplexing"),OPT_BOOLEAN (0 ,"metric-no-merge" , &stat_config.metric_no_merge,"don't try to share events between metrics in a group" ), +OPT_BOOLEAN (0 ,"metric-no-threshold" , &stat_config.metric_no_threshold, +"don't try to share events between metrics in a group " ),OPT_BOOLEAN (0 ,"topdown" , &topdown_run,"measure top-down statistics" ), OPT_UINTEGER(0, "td-level", &stat_config.topdown_level,
@@ -1852,6 +1854,7 @@ static int add_default_attributes(void)return metricgroup__parse_groups (evsel_list,"transaction" , stat_config.metric_no_group, stat_config.metric_no_merge, + stat_config.metric_no_threshold, stat_config.user_requested_cpu_list, stat_config.system_wide, &stat_config.metric_events);
@@ -2519,6 +2522,7 @@ int cmd_stat(int argc, const char **argv)metricgroup__parse_groups (evsel_list, metrics, stat_config.metric_no_group, stat_config.metric_no_merge, + stat_config.metric_no_threshold, stat_config.user_requested_cpu_list, stat_config.system_wide, &stat_config.metric_events);
tools/perf/tests/expand-cgroup.c +1 -2
@@ -187,8 +187,7 @@ static int expand_metric_events(void)rblist__init (&metric_events); pme_test =find_core_metrics_table ("testarch" ,"testcpu" ); - ret =metricgroup__parse_groups_test (evlist, pme_test, metric_str, - false, false, &metric_events); + ret =metricgroup__parse_groups_test (evlist, pme_test, metric_str, &metric_events);if (ret <0 ) {pr_debug ("failed to parse '%s' metric\n" , metric_str); goto out;
tools/perf/tests/parse-metric.c +0 -1
@@ -98,7 +98,6 @@ static int __compute_metric(const char *name, struct value *vals,/* Parse the metric into metric_events list. */ pme_test =find_core_metrics_table ("testarch" ,"testcpu" ); err =metricgroup__parse_groups_test (evlist, pme_test, name, - false, false, &metric_events);if (err) goto out;
tools/perf/tests/pmu-events.c +1 -3
@@ -846,9 +846,7 @@ static int test__parsing_callback(const struct pmu_metric *pm,perf_evlist__set_maps (&evlist->core, cpus,NULL );runtime_stat__init (&st); - err =metricgroup__parse_groups_test (evlist, table, pm->metric_name, - false, false, - &metric_events); + err =metricgroup__parse_groups_test (evlist, table, pm->metric_name, &metric_events);if (err) {if (!strcmp (pm->metric_name,"M1" ) || !strcmp (pm->metric_name,"M2" ) || !strcmp (pm->metric_name,"M3" )) {
tools/perf/util/metricgroup.c +39 -23
204 lines not on this page · raw message
tools/perf/util/metricgroup.h +1 -2
@@ -70,14 +70,13 @@ int metricgroup__parse_groups(struct evlist *perf_evlist,const char *str, bool metric_no_group, bool metric_no_merge, + bool metric_no_threshold, const char *user_requested_cpu_list, bool system_wide, struct rblist *metric_events);int metricgroup__parse_groups_test (struct evlist *evlist,const struct pmu_metrics_table *table,const char *str, -bool metric_no_group, -bool metric_no_merge,struct rblist *metric_events);void metricgroup__print (const struct print_callbacks *print_cb,void *print_state);
tools/perf/util/stat-shadow.c +2 -1
@@ -814,7 +814,8 @@ static void generic_metric(struct perf_stat_config *config,char metric_bf[64 ];if (metric_threshold && -expr__parse (&threshold, pctx, metric_threshold) ==0 ) { +expr__parse (&threshold, pctx, metric_threshold) ==0 && + !isnan (threshold)) { color =fpclassify (threshold) ==FP_ZERO ?PERF_COLOR_GREEN :PERF_COLOR_RED ; }
tools/perf/util/stat.h +1 -0
@@ -159,6 +159,7 @@ struct perf_stat_config {bool no_csv_summary;bool metric_no_group;bool metric_no_merge; +bool metric_no_threshold;bool stop_read_counter;bool iostat_run;char *user_requested_cpu_list;
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 39/51 perf stat: Add TopdownL1 metric as a default if present
In reply to Ian RogersWhen there are no events and on Intel, the topdown events will be added by default if present. To display the metrics associated with these request special handling in stat-shadow.c. To more easily update these metrics use the json metric version via the TopdownL1 group. This makes the handling less platform specific.
Modify the metricgroup__has_metric code to also cover metric groups.
--- tools/perf/arch/x86/util/evlist.c | 6 +++--- tools/perf/arch/x86/util/topdown.c | 30 ------------------------------ tools/perf/arch/x86/util/topdown.h | 1 - tools/perf/builtin-stat.c | 14 ++++++++++++++ tools/perf/util/metricgroup.c | 6 ++---- 5 files changed, 19 insertions(+), 38 deletions(-)
tools/perf/arch/x86/util/evlist.c +3 -3
@@ -59,10 +59,10 @@ int arch_evlist__add_default_attrs(struct evlist *evlist, struct perf_event_attr *attrs, size_t nr_attrs) { - if (nr_attrs) - return ___evlist__add_default_attrs(evlist, attrs, nr_attrs); +if (!nr_attrs) +return 0 ; -return topdown_parse_events (evlist); +return ___evlist__add_default_attrs (evlist, attrs, nr_attrs); }struct evsel *arch_evlist__leader (struct list_head *list)
tools/perf/arch/x86/util/topdown.c +0 -30
@@ -9,11 +9,6 @@#include "topdown.h" #include "evsel.h" -#define TOPDOWN_L1_EVENTS "{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound}" -#define TOPDOWN_L1_EVENTS_CORE "{slots,cpu_core/topdown-retiring/,cpu_core/topdown-bad-spec/,cpu_core/topdown-fe-bound/,cpu_core/topdown-be-bound/}" -#define TOPDOWN_L2_EVENTS "{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound,topdown-heavy-ops,topdown-br-mispredict,topdown-fetch-lat,topdown-mem-bound}" -#define TOPDOWN_L2_EVENTS_CORE "{slots,cpu_core/topdown-retiring/,cpu_core/topdown-bad-spec/,cpu_core/topdown-fe-bound/,cpu_core/topdown-be-bound/,cpu_core/topdown-heavy-ops/,cpu_core/topdown-br-mispredict/,cpu_core/topdown-fetch-lat/,cpu_core/topdown-mem-bound/}" -/* Check whether there is a PMU which supports the perf metrics. */ bool topdown_sys_has_perf_metrics (void ) {
@@ -99,28 +94,3 @@ const char *arch_get_topdown_pmu_name(struct evlist *evlist, bool warn)return pmu_name; } - -int topdown_parse_events (struct evlist *evlist) -{ -const char *topdown_events; -const char *pmu_name; - -if (!topdown_sys_has_perf_metrics ()) -return 0 ; - - pmu_name =arch_get_topdown_pmu_name (evlist, false); - -if (pmu_have_event (pmu_name,"topdown-heavy-ops" )) { -if (!strcmp (pmu_name,"cpu_core" )) - topdown_events =TOPDOWN_L2_EVENTS_CORE ; -else - topdown_events =TOPDOWN_L2_EVENTS ; - }else { -if (!strcmp (pmu_name,"cpu_core" )) - topdown_events =TOPDOWN_L1_EVENTS_CORE ; -else - topdown_events =TOPDOWN_L1_EVENTS ; - } - -return parse_event (evlist, topdown_events); -}
tools/perf/arch/x86/util/topdown.h +0 -1
@@ -3,6 +3,5 @@#define _TOPDOWN_H 1bool topdown_sys_has_perf_metrics (void ); -int topdown_parse_events (struct evlist *evlist);#endif
tools/perf/builtin-stat.c +14 -0
@@ -1996,6 +1996,7 @@ static int add_default_attributes(void) stat_config.topdown_level =TOPDOWN_MAX_LEVEL ;if (!evsel_list->core.nr_entries) { +/* No events so add defaults. */ if (target__has_cpu (&target)) default_attrs0[0 ].config =PERF_COUNT_SW_CPU_CLOCK ;
@@ -2011,6 +2012,19 @@ static int add_default_attributes(void) }if (evlist__add_default_attrs (evsel_list, default_attrs1) <0 )return -1 ; +/* +* Add TopdownL1 metrics if they exist. To minimize +* multiplexing, don't request threshold computation. +*/ +if (metricgroup__has_metric ("TopdownL1" ) && +metricgroup__parse_groups (evsel_list,"TopdownL1" , +/*metric_no_group=*/ false, +/*metric_no_merge=*/ false, +/*metric_no_threshold=*/ true, + stat_config.user_requested_cpu_list, + stat_config.system_wide, + &stat_config.metric_events) <0 ) +return -1 ;/* Platform specific attrs */ if (evlist__add_default_attrs (evsel_list, default_null_attrs) <0 )return -1 ;
tools/perf/util/metricgroup.c +2 -4
@@ -1647,10 +1647,8 @@ static int metricgroup__has_metric_callback(const struct pmu_metric *pm, {const char *metric = vdata; -if (!pm->metric_expr) -return 0 ; - -if (match_metric (pm->metric_name, metric)) +if (match_metric (pm->metric_name, metric) || +match_metric (pm->metric_group, metric))return 1 ;return 0 ;
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Re: [PATCH v1 39/51] perf stat: Add TopdownL1 metric as a default if present
Quoted 109 lines · Ian Rogers
When there are no events and on Intel, the topdown events will be added by default if present. To display the metrics associated with these request special handling in
stat-shadow.c. To more easily update these metrics use the json metric version via the TopdownL1 group. This makes the handling less platform specific.Modify the
metricgroup__has_metriccode to also cover metric groups.Signed-off-by Ian Rogers <[email protected]>--- tools/perf/arch/x86/util/evlist.c | 6 +++--- tools/perf/arch/x86/util/topdown.c | 30 ------------------------------ tools/perf/arch/x86/util/topdown.h | 1 - tools/perf/builtin-stat.c | 14 ++++++++++++++ tools/perf/util/metricgroup.c | 6 ++---- 5 files changed, 19 insertions(+), 38 deletions(-)tools/perf/arch/x86/util/evlist.c +3
-3@@ -59,10 +59,10 @@ int arch_evlist__add_default_attrs(struct evlist *evlist, struct perf_event_attr *attrs, size_t nr_attrs) { - if (nr_attrs) - return ___evlist__add_default_attrs(evlist, attrs, nr_attrs); +if (!nr_attrs) +return 0 ; -return topdown_parse_events (evlist); +return ___evlist__add_default_attrs (evlist, attrs, nr_attrs); }struct evsel *arch_evlist__leader (struct list_head *list)tools/perf/arch/x86/util/topdown.c +0
-30@@ -9,11 +9,6 @@#include "topdown.h" #include "evsel.h" -#define TOPDOWN_L1_EVENTS "{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound}" -#define TOPDOWN_L1_EVENTS_CORE "{slots,cpu_core/topdown-retiring/,cpu_core/topdown-bad-spec/,cpu_core/topdown-fe-bound/,cpu_core/topdown-be-bound/}" -#define TOPDOWN_L2_EVENTS "{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound,topdown-heavy-ops,topdown-br-mispredict,topdown-fetch-lat,topdown-mem-bound}" -#define TOPDOWN_L2_EVENTS_CORE "{slots,cpu_core/topdown-retiring/,cpu_core/topdown-bad-spec/,cpu_core/topdown-fe-bound/,cpu_core/topdown-be-bound/,cpu_core/topdown-heavy-ops/,cpu_core/topdown-br-mispredict/,cpu_core/topdown-fetch-lat/,cpu_core/topdown-mem-bound/}" -/* Check whether there is a PMU which supports the perf metrics. */ bool topdown_sys_has_perf_metrics (void ) {@@ -99,28 +94,3 @@ const char *arch_get_topdown_pmu_name(struct evlist *evlist, bool warn)return pmu_name; } - -int topdown_parse_events (struct evlist *evlist) -{ -const char *topdown_events; -const char *pmu_name; - -if (!topdown_sys_has_perf_metrics ()) -return 0 ; - - pmu_name =arch_get_topdown_pmu_name (evlist, false); - -if (pmu_have_event (pmu_name,"topdown-heavy-ops" )) { -if (!strcmp (pmu_name,"cpu_core" )) - topdown_events =TOPDOWN_L2_EVENTS_CORE ; -else - topdown_events =TOPDOWN_L2_EVENTS ; - }else { -if (!strcmp (pmu_name,"cpu_core" )) - topdown_events =TOPDOWN_L1_EVENTS_CORE ; -else - topdown_events =TOPDOWN_L1_EVENTS ; - } - -return parse_event (evlist, topdown_events); -}tools/perf/arch/x86/util/topdown.h +0
-1@@ -3,6 +3,5 @@#define _TOPDOWN_H 1bool topdown_sys_has_perf_metrics (void ); -int topdown_parse_events (struct evlist *evlist);#endif tools/perf/builtin-stat.c +3
-0@@ -1996,6 +1996,7 @@ static int add_default_attributes(void) stat_config.topdown_level =TOPDOWN_MAX_LEVEL ;if (!evsel_list->core.nr_entries) { +/* No events so add defaults. */ if (target__has_cpu (&target)) default_attrs0[0 ].config =PERF_COUNT_SW_CPU_CLOCK ;@@ -2011,6 +2012,19 @@ static int add_default_attributes(void) }if (evlist__add_default_attrs (evsel_list, default_attrs1) <0 )return -1 ; +/* +* Add TopdownL1 metrics if they exist. To minimize
tools/perf/builtin-stat.c static int add_default_attributes(void) · line 2026
Quoted 10 lines
tools/perf/builtin-stat.c +10
-0+* multiplexing, don't request threshold computation. +*/ +if (metricgroup__has_metric ("TopdownL1" ) && +metricgroup__parse_groups (evsel_list,"TopdownL1" , +/*metric_no_group=*/ false, +/*metric_no_merge=*/ false, +/*metric_no_threshold=*/ true, + stat_config.user_requested_cpu_list, + stat_config.system_wide, + &stat_config.metric_events) <0 )
Does the metricgroup__* function check the existances of the events on the machine? If not, it may not be reliable to only check the event list.
The existing code supports both L1 and L2 Topdown for SPR. But this patch seems remove the L2 Topdown support for SPR.
The TopdownL1/L2 metric is added only for the big core with perf stat default. It's because that the perf_metrics is a dedicated register, which should not impact other events (using GP counters.) But this patch seems don't check the CPU type. It may brings extra multiplexing for the perf stat default on an ATOM platform.
Thanks,
Kan
Quoted 21 lines
tools/perf/builtin-stat.c +1
-0+return -1 ;/* Platform specific attrs */ if (evlist__add_default_attrs (evsel_list, default_null_attrs) <0 )return -1 ;tools/perf/util/metricgroup.c +2
-4@@ -1647,10 +1647,8 @@ static int metricgroup__has_metric_callback(const struct pmu_metric *pm, {const char *metric = vdata; -if (!pm->metric_expr) -return 0 ; - -if (match_metric (pm->metric_name, metric)) +if (match_metric (pm->metric_name, metric) || +match_metric (pm->metric_group, metric))return 1 ;return 0 ;
Ian Rogers
reviewerRe: [PATCH v1 39/51] perf stat: Add TopdownL1 metric as a default if present
Quoted 130 lines · Kan
Quoted 109 lines · Ian Rogers
When there are no events and on Intel, the topdown events will be added by default if present. To display the metrics associated with these request special handling in
stat-shadow.c. To more easily update these metrics use the json metric version via the TopdownL1 group. This makes the handling less platform specific.Modify the
metricgroup__has_metriccode to also cover metric groups.Signed-off-by Ian Rogers <[email protected]>--- tools/perf/arch/x86/util/evlist.c | 6 +++--- tools/perf/arch/x86/util/topdown.c | 30 ------------------------------ tools/perf/arch/x86/util/topdown.h | 1 - tools/perf/builtin-stat.c | 14 ++++++++++++++ tools/perf/util/metricgroup.c | 6 ++---- 5 files changed, 19 insertions(+), 38 deletions(-)tools/perf/arch/x86/util/evlist.c +3
-3@@ -59,10 +59,10 @@ int arch_evlist__add_default_attrs(struct evlist *evlist, struct perf_event_attr *attrs, size_t nr_attrs) { - if (nr_attrs) - return ___evlist__add_default_attrs(evlist, attrs, nr_attrs); +if (!nr_attrs) +return 0 ; -return topdown_parse_events (evlist); +return ___evlist__add_default_attrs (evlist, attrs, nr_attrs); }struct evsel *arch_evlist__leader (struct list_head *list)tools/perf/arch/x86/util/topdown.c +0
-30@@ -9,11 +9,6 @@#include "topdown.h" #include "evsel.h" -#define TOPDOWN_L1_EVENTS "{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound}" -#define TOPDOWN_L1_EVENTS_CORE "{slots,cpu_core/topdown-retiring/,cpu_core/topdown-bad-spec/,cpu_core/topdown-fe-bound/,cpu_core/topdown-be-bound/}" -#define TOPDOWN_L2_EVENTS "{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound,topdown-heavy-ops,topdown-br-mispredict,topdown-fetch-lat,topdown-mem-bound}" -#define TOPDOWN_L2_EVENTS_CORE "{slots,cpu_core/topdown-retiring/,cpu_core/topdown-bad-spec/,cpu_core/topdown-fe-bound/,cpu_core/topdown-be-bound/,cpu_core/topdown-heavy-ops/,cpu_core/topdown-br-mispredict/,cpu_core/topdown-fetch-lat/,cpu_core/topdown-mem-bound/}" -/* Check whether there is a PMU which supports the perf metrics. */ bool topdown_sys_has_perf_metrics (void ) {@@ -99,28 +94,3 @@ const char *arch_get_topdown_pmu_name(struct evlist *evlist, bool warn)return pmu_name; } - -int topdown_parse_events (struct evlist *evlist) -{ -const char *topdown_events; -const char *pmu_name; - -if (!topdown_sys_has_perf_metrics ()) -return 0 ; - - pmu_name =arch_get_topdown_pmu_name (evlist, false); - -if (pmu_have_event (pmu_name,"topdown-heavy-ops" )) { -if (!strcmp (pmu_name,"cpu_core" )) - topdown_events =TOPDOWN_L2_EVENTS_CORE ; -else - topdown_events =TOPDOWN_L2_EVENTS ; - }else { -if (!strcmp (pmu_name,"cpu_core" )) - topdown_events =TOPDOWN_L1_EVENTS_CORE ; -else - topdown_events =TOPDOWN_L1_EVENTS ; - } - -return parse_event (evlist, topdown_events); -}tools/perf/arch/x86/util/topdown.h +0
-1@@ -3,6 +3,5 @@#define _TOPDOWN_H 1bool topdown_sys_has_perf_metrics (void ); -int topdown_parse_events (struct evlist *evlist);#endif tools/perf/builtin-stat.c +3
-0@@ -1996,6 +1996,7 @@ static int add_default_attributes(void) stat_config.topdown_level =TOPDOWN_MAX_LEVEL ;if (!evsel_list->core.nr_entries) { +/* No events so add defaults. */ if (target__has_cpu (&target)) default_attrs0[0 ].config =PERF_COUNT_SW_CPU_CLOCK ;@@ -2011,6 +2012,19 @@ static int add_default_attributes(void) }if (evlist__add_default_attrs (evsel_list, default_attrs1) <0 )return -1 ; +/* +* Add TopdownL1 metrics if they exist. To minimize tools/perf/builtin-stat.c static int add_default_attributes(void) · line 2026
Quoted 10 lines
tools/perf/builtin-stat.c +10
-0+* multiplexing, don't request threshold computation. +*/ +if (metricgroup__has_metric ("TopdownL1" ) && +metricgroup__parse_groups (evsel_list,"TopdownL1" , +/*metric_no_group=*/ false, +/*metric_no_merge=*/ false, +/*metric_no_threshold=*/ true, + stat_config.user_requested_cpu_list, + stat_config.system_wide, + &stat_config.metric_events) <0 )Does the metricgroup__* function check the existances of the events on the machine? If not, it may not be reliable to only check the event list.
The existing code supports both L1 and L2 Topdown for SPR. But this patch seems remove the L2 Topdown support for SPR.
Quoted 8 lines
The TopdownL1/L2 metric is added only for the big core with perf stat default. It's because that the
perf_metricsis a dedicated register, which should not impact other events (using GP counters.) But this patch seems don't check the CPU type. It may brings extra multiplexing for the perf stat default on an ATOM platform.Thanks,
Kan
Hi Kan,
The TopdownL2 metrics are present for SPR. The code changes to default for L1 as with json topdown the maximum topdown level (the default previously) is L6, and nobody really wants to see that. The --topdown option is no longer limited to Icelake+ processors, any with the TopdownL1 metricgroup will work as --topdown has just become a shortcut to that.
There may be additional multiplexing, but also, in the old code events from different groups could be used to calculate a bogus metric. There are also additional events as the previous metrics don't agree with those in the TMA spreadsheet. If there is multiplexing from this change on SPR, the TMA json metrics do try to avoid this, I think the right path through this is to fix the json metrics.
Thanks,
Ian
Quoted 21 lines
Quoted 21 lines
tools/perf/builtin-stat.c +1
-0+return -1 ;/* Platform specific attrs */ if (evlist__add_default_attrs (evsel_list, default_null_attrs) <0 )return -1 ;tools/perf/util/metricgroup.c +2
-4@@ -1647,10 +1647,8 @@ static int metricgroup__has_metric_callback(const struct pmu_metric *pm, {const char *metric = vdata; -if (!pm->metric_expr) -return 0 ; - -if (match_metric (pm->metric_name, metric)) +if (match_metric (pm->metric_name, metric) || +match_metric (pm->metric_group, metric))return 1 ;return 0 ;
Re: [PATCH v1 39/51] perf stat: Add TopdownL1 metric as a default if present
Quoted 140 lines · Ian Rogers
Quoted 130 lines · Kan
Quoted 109 lines · Ian Rogers
When there are no events and on Intel, the topdown events will be added by default if present. To display the metrics associated with these request special handling in
stat-shadow.c. To more easily update these metrics use the json metric version via the TopdownL1 group. This makes the handling less platform specific.Modify the
metricgroup__has_metriccode to also cover metric groups.Signed-off-by Ian Rogers <[email protected]>--- tools/perf/arch/x86/util/evlist.c | 6 +++--- tools/perf/arch/x86/util/topdown.c | 30 ------------------------------ tools/perf/arch/x86/util/topdown.h | 1 - tools/perf/builtin-stat.c | 14 ++++++++++++++ tools/perf/util/metricgroup.c | 6 ++---- 5 files changed, 19 insertions(+), 38 deletions(-)tools/perf/arch/x86/util/evlist.c +3
-3@@ -59,10 +59,10 @@ int arch_evlist__add_default_attrs(struct evlist *evlist, struct perf_event_attr *attrs, size_t nr_attrs) { - if (nr_attrs) - return ___evlist__add_default_attrs(evlist, attrs, nr_attrs); +if (!nr_attrs) +return 0 ; -return topdown_parse_events (evlist); +return ___evlist__add_default_attrs (evlist, attrs, nr_attrs); }struct evsel *arch_evlist__leader (struct list_head *list)tools/perf/arch/x86/util/topdown.c +0
-30@@ -9,11 +9,6 @@#include "topdown.h" #include "evsel.h" -#define TOPDOWN_L1_EVENTS "{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound}" -#define TOPDOWN_L1_EVENTS_CORE "{slots,cpu_core/topdown-retiring/,cpu_core/topdown-bad-spec/,cpu_core/topdown-fe-bound/,cpu_core/topdown-be-bound/}" -#define TOPDOWN_L2_EVENTS "{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound,topdown-heavy-ops,topdown-br-mispredict,topdown-fetch-lat,topdown-mem-bound}" -#define TOPDOWN_L2_EVENTS_CORE "{slots,cpu_core/topdown-retiring/,cpu_core/topdown-bad-spec/,cpu_core/topdown-fe-bound/,cpu_core/topdown-be-bound/,cpu_core/topdown-heavy-ops/,cpu_core/topdown-br-mispredict/,cpu_core/topdown-fetch-lat/,cpu_core/topdown-mem-bound/}" -/* Check whether there is a PMU which supports the perf metrics. */ bool topdown_sys_has_perf_metrics (void ) {@@ -99,28 +94,3 @@ const char *arch_get_topdown_pmu_name(struct evlist *evlist, bool warn)return pmu_name; } - -int topdown_parse_events (struct evlist *evlist) -{ -const char *topdown_events; -const char *pmu_name; - -if (!topdown_sys_has_perf_metrics ()) -return 0 ; - - pmu_name =arch_get_topdown_pmu_name (evlist, false); - -if (pmu_have_event (pmu_name,"topdown-heavy-ops" )) { -if (!strcmp (pmu_name,"cpu_core" )) - topdown_events =TOPDOWN_L2_EVENTS_CORE ; -else - topdown_events =TOPDOWN_L2_EVENTS ; - }else { -if (!strcmp (pmu_name,"cpu_core" )) - topdown_events =TOPDOWN_L1_EVENTS_CORE ; -else - topdown_events =TOPDOWN_L1_EVENTS ; - } - -return parse_event (evlist, topdown_events); -}tools/perf/arch/x86/util/topdown.h +0
-1@@ -3,6 +3,5 @@#define _TOPDOWN_H 1bool topdown_sys_has_perf_metrics (void ); -int topdown_parse_events (struct evlist *evlist);#endif tools/perf/builtin-stat.c +3
-0@@ -1996,6 +1996,7 @@ static int add_default_attributes(void) stat_config.topdown_level =TOPDOWN_MAX_LEVEL ;if (!evsel_list->core.nr_entries) { +/* No events so add defaults. */ if (target__has_cpu (&target)) default_attrs0[0 ].config =PERF_COUNT_SW_CPU_CLOCK ;@@ -2011,6 +2012,19 @@ static int add_default_attributes(void) }if (evlist__add_default_attrs (evsel_list, default_attrs1) <0 )return -1 ; +/* +* Add TopdownL1 metrics if they exist. To minimize tools/perf/builtin-stat.c static int add_default_attributes(void) · line 2026
Quoted 10 lines
tools/perf/builtin-stat.c +10
-0+* multiplexing, don't request threshold computation. +*/ +if (metricgroup__has_metric ("TopdownL1" ) && +metricgroup__parse_groups (evsel_list,"TopdownL1" , +/*metric_no_group=*/ false, +/*metric_no_merge=*/ false, +/*metric_no_threshold=*/ true, + stat_config.user_requested_cpu_list, + stat_config.system_wide, + &stat_config.metric_events) <0 )Does the metricgroup__* function check the existances of the events on the machine? If not, it may not be reliable to only check the event list.
The existing code supports both L1 and L2 Topdown for SPR. But this patch seems remove the L2 Topdown support for SPR.
Quoted 8 lines
The TopdownL1/L2 metric is added only for the big core with perf stat default. It's because that the
perf_metricsis a dedicated register, which should not impact other events (using GP counters.) But this patch seems don't check the CPU type. It may brings extra multiplexing for the perf stat default on an ATOM platform.Thanks,
Kan
Quoted 8 lines
Hi Kan,
The TopdownL2 metrics are present for SPR. The code changes to default for L1 as with json topdown the maximum topdown level (the default previously) is L6, and nobody really wants to see that. The --topdown option is no longer limited to Icelake+ processors, any with the TopdownL1 metricgroup will work as --topdown has just become a shortcut to that.
This patch seems also changes the perf stat default. The current perf stat default shows both L1 and L2 for SPR. If that's the case, it should be a user visible changes. What's output of "perf stat sleep 1" with this patch on SPR?
Quoted 7 lines
There may be additional multiplexing, but also, in the old code events from different groups could be used to calculate a bogus metric. There are also additional events as the previous metrics don't agree with those in the TMA spreadsheet. If there is multiplexing from this change on SPR, the TMA json metrics do try to avoid this, I think the right path through this is to fix the json metrics.
For the perf stat default, there should be no multiplexing.
Also, it looks like the patch and the following several patches remove the existence check of an event (pmu_have_event()). It may not be a good idea. Those events/features usually be enumerated, which means that they may not be available in some cases. For example, we don't have the perf metrics support on KVM. I don't think the current JSON metrics checks the CPUID enumeration. If so, the patch may brings problem in a VM.
Thanks,
Kan
Quoted 25 lines
Thanks,
IanQuoted 21 lines
Quoted 21 lines
tools/perf/builtin-stat.c +1
-0+return -1 ;/* Platform specific attrs */ if (evlist__add_default_attrs (evsel_list, default_null_attrs) <0 )return -1 ;tools/perf/util/metricgroup.c +2
-4@@ -1647,10 +1647,8 @@ static int metricgroup__has_metric_callback(const struct pmu_metric *pm, {const char *metric = vdata; -if (!pm->metric_expr) -return 0 ; - -if (match_metric (pm->metric_name, metric)) +if (match_metric (pm->metric_name, metric) || +match_metric (pm->metric_group, metric))return 1 ;return 0 ;
Ian Rogers
reviewerRe: [PATCH v1 39/51] perf stat: Add TopdownL1 metric as a default if present
Quoted 153 lines · Kan
Quoted 140 lines · Ian Rogers
Quoted 130 lines · Kan
Quoted 109 lines · Ian Rogers
When there are no events and on Intel, the topdown events will be added by default if present. To display the metrics associated with these request special handling in
stat-shadow.c. To more easily update these metrics use the json metric version via the TopdownL1 group. This makes the handling less platform specific.Modify the
metricgroup__has_metriccode to also cover metric groups.Signed-off-by Ian Rogers <[email protected]>--- tools/perf/arch/x86/util/evlist.c | 6 +++--- tools/perf/arch/x86/util/topdown.c | 30 ------------------------------ tools/perf/arch/x86/util/topdown.h | 1 - tools/perf/builtin-stat.c | 14 ++++++++++++++ tools/perf/util/metricgroup.c | 6 ++---- 5 files changed, 19 insertions(+), 38 deletions(-)tools/perf/arch/x86/util/evlist.c +3
-3@@ -59,10 +59,10 @@ int arch_evlist__add_default_attrs(struct evlist *evlist, struct perf_event_attr *attrs, size_t nr_attrs) { - if (nr_attrs) - return ___evlist__add_default_attrs(evlist, attrs, nr_attrs); +if (!nr_attrs) +return 0 ; -return topdown_parse_events (evlist); +return ___evlist__add_default_attrs (evlist, attrs, nr_attrs); }struct evsel *arch_evlist__leader (struct list_head *list)tools/perf/arch/x86/util/topdown.c +0
-30@@ -9,11 +9,6 @@#include "topdown.h" #include "evsel.h" -#define TOPDOWN_L1_EVENTS "{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound}" -#define TOPDOWN_L1_EVENTS_CORE "{slots,cpu_core/topdown-retiring/,cpu_core/topdown-bad-spec/,cpu_core/topdown-fe-bound/,cpu_core/topdown-be-bound/}" -#define TOPDOWN_L2_EVENTS "{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound,topdown-heavy-ops,topdown-br-mispredict,topdown-fetch-lat,topdown-mem-bound}" -#define TOPDOWN_L2_EVENTS_CORE "{slots,cpu_core/topdown-retiring/,cpu_core/topdown-bad-spec/,cpu_core/topdown-fe-bound/,cpu_core/topdown-be-bound/,cpu_core/topdown-heavy-ops/,cpu_core/topdown-br-mispredict/,cpu_core/topdown-fetch-lat/,cpu_core/topdown-mem-bound/}" -/* Check whether there is a PMU which supports the perf metrics. */ bool topdown_sys_has_perf_metrics (void ) {@@ -99,28 +94,3 @@ const char *arch_get_topdown_pmu_name(struct evlist *evlist, bool warn)return pmu_name; } - -int topdown_parse_events (struct evlist *evlist) -{ -const char *topdown_events; -const char *pmu_name; - -if (!topdown_sys_has_perf_metrics ()) -return 0 ; - - pmu_name =arch_get_topdown_pmu_name (evlist, false); - -if (pmu_have_event (pmu_name,"topdown-heavy-ops" )) { -if (!strcmp (pmu_name,"cpu_core" )) - topdown_events =TOPDOWN_L2_EVENTS_CORE ; -else - topdown_events =TOPDOWN_L2_EVENTS ; - }else { -if (!strcmp (pmu_name,"cpu_core" )) - topdown_events =TOPDOWN_L1_EVENTS_CORE ; -else - topdown_events =TOPDOWN_L1_EVENTS ; - } - -return parse_event (evlist, topdown_events); -}tools/perf/arch/x86/util/topdown.h +0
-1@@ -3,6 +3,5 @@#define _TOPDOWN_H 1bool topdown_sys_has_perf_metrics (void ); -int topdown_parse_events (struct evlist *evlist);#endif tools/perf/builtin-stat.c +3
-0@@ -1996,6 +1996,7 @@ static int add_default_attributes(void) stat_config.topdown_level =TOPDOWN_MAX_LEVEL ;if (!evsel_list->core.nr_entries) { +/* No events so add defaults. */ if (target__has_cpu (&target)) default_attrs0[0 ].config =PERF_COUNT_SW_CPU_CLOCK ;@@ -2011,6 +2012,19 @@ static int add_default_attributes(void) }if (evlist__add_default_attrs (evsel_list, default_attrs1) <0 )return -1 ; +/* +* Add TopdownL1 metrics if they exist. To minimize tools/perf/builtin-stat.c static int add_default_attributes(void) · line 2026
Quoted 10 lines
tools/perf/builtin-stat.c +10
-0+* multiplexing, don't request threshold computation. +*/ +if (metricgroup__has_metric ("TopdownL1" ) && +metricgroup__parse_groups (evsel_list,"TopdownL1" , +/*metric_no_group=*/ false, +/*metric_no_merge=*/ false, +/*metric_no_threshold=*/ true, + stat_config.user_requested_cpu_list, + stat_config.system_wide, + &stat_config.metric_events) <0 )Does the metricgroup__* function check the existances of the events on the machine? If not, it may not be reliable to only check the event list.
The existing code supports both L1 and L2 Topdown for SPR. But this patch seems remove the L2 Topdown support for SPR.
Quoted 8 lines
The TopdownL1/L2 metric is added only for the big core with perf stat default. It's because that the
perf_metricsis a dedicated register, which should not impact other events (using GP counters.) But this patch seems don't check the CPU type. It may brings extra multiplexing for the perf stat default on an ATOM platform.Thanks,
KanQuoted 8 lines
Hi Kan,
The TopdownL2 metrics are present for SPR. The code changes to default for L1 as with json topdown the maximum topdown level (the default previously) is L6, and nobody really wants to see that. The --topdown option is no longer limited to Icelake+ processors, any with the TopdownL1 metricgroup will work as --topdown has just become a shortcut to that.
Quoted 4 lines
This patch seems also changes the perf stat default. The current perf stat default shows both L1 and L2 for SPR. If that's the case, it should be a user visible changes. What's output of "perf stat sleep 1" with this patch on SPR?
I'll need to find an SPR. The change from L2 to L1 as mentioned above is that the behavior was to print max topdown level, and with json metrics that is level 6. We could make the behavior level 2 if L2 topdown events are present. I didn't do this as it would mean SPR didn't align with everything else.
Quoted 8 lines
Quoted 7 lines
There may be additional multiplexing, but also, in the old code events from different groups could be used to calculate a bogus metric. There are also additional events as the previous metrics don't agree with those in the TMA spreadsheet. If there is multiplexing from this change on SPR, the TMA json metrics do try to avoid this, I think the right path through this is to fix the json metrics.
Quoted 8 lines
For the perf stat default, there should be no multiplexing.
Also, it looks like the patch and the following several patches remove the existence check of an event (
pmu_have_event()). It may not be a good idea. Those events/features usually be enumerated, which means that they may not be available in some cases. For example, we don't have the perf metrics support on KVM. I don't think the current JSON metrics checks the CPUID enumeration. If so, the patch may brings problem in a VM.
This seems like a general problem with json metrics. In the case that no metric is calculated the metric isn't printed, but you may see the events as not counted. We could special case this as the current code does or perhaps we can have some kind of "default event" flag and if such events fail to open just drop them from the output. There are likely other strategies.
Thanks,
Ian
Quoted 28 lines
Thanks,
KanQuoted 25 lines
Thanks,
IanQuoted 21 lines
Quoted 21 lines
tools/perf/builtin-stat.c +1
-0+return -1 ;/* Platform specific attrs */ if (evlist__add_default_attrs (evsel_list, default_null_attrs) <0 )return -1 ;tools/perf/util/metricgroup.c +2
-4@@ -1647,10 +1647,8 @@ static int metricgroup__has_metric_callback(const struct pmu_metric *pm, {const char *metric = vdata; -if (!pm->metric_expr) -return 0 ; - -if (match_metric (pm->metric_name, metric)) +if (match_metric (pm->metric_name, metric) || +match_metric (pm->metric_group, metric))return 1 ;return 0 ;
Re: [PATCH v1 39/51] perf stat: Add TopdownL1 metric as a default if present
Quoted 159 lines · Ian Rogers
Quoted 153 lines · Kan
Quoted 140 lines · Ian Rogers
Quoted 130 lines · Kan
Quoted 109 lines · Ian Rogers
When there are no events and on Intel, the topdown events will be added by default if present. To display the metrics associated with these request special handling in
stat-shadow.c. To more easily update these metrics use the json metric version via the TopdownL1 group. This makes the handling less platform specific.Modify the
metricgroup__has_metriccode to also cover metric groups.Signed-off-by Ian Rogers <[email protected]>--- tools/perf/arch/x86/util/evlist.c | 6 +++--- tools/perf/arch/x86/util/topdown.c | 30 ------------------------------ tools/perf/arch/x86/util/topdown.h | 1 - tools/perf/builtin-stat.c | 14 ++++++++++++++ tools/perf/util/metricgroup.c | 6 ++---- 5 files changed, 19 insertions(+), 38 deletions(-)tools/perf/arch/x86/util/evlist.c +3
-3@@ -59,10 +59,10 @@ int arch_evlist__add_default_attrs(struct evlist *evlist, struct perf_event_attr *attrs, size_t nr_attrs) { - if (nr_attrs) - return ___evlist__add_default_attrs(evlist, attrs, nr_attrs); +if (!nr_attrs) +return 0 ; -return topdown_parse_events (evlist); +return ___evlist__add_default_attrs (evlist, attrs, nr_attrs); }struct evsel *arch_evlist__leader (struct list_head *list)tools/perf/arch/x86/util/topdown.c +0
-30@@ -9,11 +9,6 @@#include "topdown.h" #include "evsel.h" -#define TOPDOWN_L1_EVENTS "{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound}" -#define TOPDOWN_L1_EVENTS_CORE "{slots,cpu_core/topdown-retiring/,cpu_core/topdown-bad-spec/,cpu_core/topdown-fe-bound/,cpu_core/topdown-be-bound/}" -#define TOPDOWN_L2_EVENTS "{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound,topdown-heavy-ops,topdown-br-mispredict,topdown-fetch-lat,topdown-mem-bound}" -#define TOPDOWN_L2_EVENTS_CORE "{slots,cpu_core/topdown-retiring/,cpu_core/topdown-bad-spec/,cpu_core/topdown-fe-bound/,cpu_core/topdown-be-bound/,cpu_core/topdown-heavy-ops/,cpu_core/topdown-br-mispredict/,cpu_core/topdown-fetch-lat/,cpu_core/topdown-mem-bound/}" -/* Check whether there is a PMU which supports the perf metrics. */ bool topdown_sys_has_perf_metrics (void ) {@@ -99,28 +94,3 @@ const char *arch_get_topdown_pmu_name(struct evlist *evlist, bool warn)return pmu_name; } - -int topdown_parse_events (struct evlist *evlist) -{ -const char *topdown_events; -const char *pmu_name; - -if (!topdown_sys_has_perf_metrics ()) -return 0 ; - - pmu_name =arch_get_topdown_pmu_name (evlist, false); - -if (pmu_have_event (pmu_name,"topdown-heavy-ops" )) { -if (!strcmp (pmu_name,"cpu_core" )) - topdown_events =TOPDOWN_L2_EVENTS_CORE ; -else - topdown_events =TOPDOWN_L2_EVENTS ; - }else { -if (!strcmp (pmu_name,"cpu_core" )) - topdown_events =TOPDOWN_L1_EVENTS_CORE ; -else - topdown_events =TOPDOWN_L1_EVENTS ; - } - -return parse_event (evlist, topdown_events); -}tools/perf/arch/x86/util/topdown.h +0
-1@@ -3,6 +3,5 @@#define _TOPDOWN_H 1bool topdown_sys_has_perf_metrics (void ); -int topdown_parse_events (struct evlist *evlist);#endif tools/perf/builtin-stat.c +3
-0@@ -1996,6 +1996,7 @@ static int add_default_attributes(void) stat_config.topdown_level =TOPDOWN_MAX_LEVEL ;if (!evsel_list->core.nr_entries) { +/* No events so add defaults. */ if (target__has_cpu (&target)) default_attrs0[0 ].config =PERF_COUNT_SW_CPU_CLOCK ;@@ -2011,6 +2012,19 @@ static int add_default_attributes(void) }if (evlist__add_default_attrs (evsel_list, default_attrs1) <0 )return -1 ; +/* +* Add TopdownL1 metrics if they exist. To minimize tools/perf/builtin-stat.c static int add_default_attributes(void) · line 2026
Quoted 10 lines
tools/perf/builtin-stat.c +10
-0+* multiplexing, don't request threshold computation. +*/ +if (metricgroup__has_metric ("TopdownL1" ) && +metricgroup__parse_groups (evsel_list,"TopdownL1" , +/*metric_no_group=*/ false, +/*metric_no_merge=*/ false, +/*metric_no_threshold=*/ true, + stat_config.user_requested_cpu_list, + stat_config.system_wide, + &stat_config.metric_events) <0 )Does the metricgroup__* function check the existances of the events on the machine? If not, it may not be reliable to only check the event list.
The existing code supports both L1 and L2 Topdown for SPR. But this patch seems remove the L2 Topdown support for SPR.
Quoted 8 lines
The TopdownL1/L2 metric is added only for the big core with perf stat default. It's because that the
perf_metricsis a dedicated register, which should not impact other events (using GP counters.) But this patch seems don't check the CPU type. It may brings extra multiplexing for the perf stat default on an ATOM platform.Thanks,
KanQuoted 8 lines
Hi Kan,
The TopdownL2 metrics are present for SPR. The code changes to default for L1 as with json topdown the maximum topdown level (the default previously) is L6, and nobody really wants to see that. The --topdown option is no longer limited to Icelake+ processors, any with the TopdownL1 metricgroup will work as --topdown has just become a shortcut to that.
Quoted 4 lines
This patch seems also changes the perf stat default. The current perf stat default shows both L1 and L2 for SPR. If that's the case, it should be a user visible changes. What's output of "perf stat sleep 1" with this patch on SPR?
Quoted 5 lines
I'll need to find an SPR. The change from L2 to L1 as mentioned above is that the behavior was to print max topdown level, and with json metrics that is level 6. We could make the behavior level 2 if L2 topdown events are present. I didn't do this as it would mean SPR didn't align with everything else.
For L2, it's free on SPR. So we extended it only for SPR. That could give user more information with perf stat default.
Quoted 18 lines
Quoted 9 lines
Quoted 8 lines
There may be additional multiplexing, but also, in the old code events from different groups could be used to calculate a bogus metric. There are also additional events as the previous metrics don't agree with those in the TMA spreadsheet. If there is multiplexing from this change on SPR, the TMA json metrics do try to avoid this, I think the right path through this is to fix the json metrics.
Quoted 8 lines
For the perf stat default, there should be no multiplexing.
Also, it looks like the patch and the following several patches remove the existence check of an event (
pmu_have_event()). It may not be a good idea. Those events/features usually be enumerated, which means that they may not be available in some cases. For example, we don't have the perf metrics support on KVM. I don't think the current JSON metrics checks the CPUID enumeration. If so, the patch may brings problem in a VM.
Quoted 6 lines
This seems like a general problem with json metrics. In the case that no metric is calculated the metric isn't printed, but you may see the events as not counted. We could special case this as the current code does or perhaps we can have some kind of "default event" flag and if such events fail to open just drop them from the output. There are likely other strategies.
Yes, it should be a general problem. The current behavior is to error out with an error message rather than 0 count. The 0 count sometimes may mislead the user.
Either special case or a "default event" flag is OK for me. My point is that we should check the existence of the feature/events. So we can give user a clear message regarding the reason of dropping or 0 the events. If they really want the feature/metrics, they can update the kernel or ask the cloud vender to update the service.
Maybe we can extend the same soulution to perf list as well. For the machine which doesn't have some feature, we may drop the metrics or use an alternative metrics. But that could be done later separately.
Thanks,
Kan
Quoted 32 lines
Thanks,
IanQuoted 28 lines
Thanks,
KanQuoted 25 lines
Thanks,
IanQuoted 21 lines
Quoted 21 lines
tools/perf/builtin-stat.c +1
-0+return -1 ;/* Platform specific attrs */ if (evlist__add_default_attrs (evsel_list, default_null_attrs) <0 )return -1 ;tools/perf/util/metricgroup.c +2
-4@@ -1647,10 +1647,8 @@ static int metricgroup__has_metric_callback(const struct pmu_metric *pm, {const char *metric = vdata; -if (!pm->metric_expr) -return 0 ; - -if (match_metric (pm->metric_name, metric)) +if (match_metric (pm->metric_name, metric) || +match_metric (pm->metric_group, metric))return 1 ;return 0 ;
Ian Rogers
reviewerPATCH 40/51 perf stat: Implement --topdown using json metrics
In reply to Ian RogersRequest the topdown metric group of a level with the metrics in the group 'TopdownL<level>' rather than through specific events. As more topdown levels are supported this way, such as 6 on Intel Ice Lake, default to just showing the level 1 metrics. This can be overridden using '--td-level'. Rather than determine the maximum topdown level from sysfs, use the metric group names. Remove some now unused topdown code.
--- tools/perf/arch/x86/util/topdown.c | 48 +----------- tools/perf/builtin-stat.c | 118 +++++------------------------ tools/perf/util/metricgroup.c | 31 ++++++++ tools/perf/util/metricgroup.h | 1 + tools/perf/util/topdown.c | 68 +---------------- tools/perf/util/topdown.h | 11 +-- 6 files changed, 58 insertions(+), 219 deletions(-)
tools/perf/arch/x86/util/topdown.c +1 -47
@@ -1,11 +1,8 @@// SPDX-License-Identifier: GPL-2.0 -#include <stdio.h> #include "api/fs/fs.h" +#include "util/evsel.h" #include "util/pmu.h" #include "util/topdown.h" -#include "util/evlist.h" -#include "util/debug.h" -#include "util/pmu-hybrid.h" #include "topdown.h" #include "evsel.h"
@@ -33,30 +30,6 @@ bool topdown_sys_has_perf_metrics(void)return has_perf_metrics; } -/* -* Check whether we can use a group for top down. -* Without a group may get bad results due to multiplexing. -*/ -bool arch_topdown_check_group (bool *warn) -{ -int n; - -if (sysctl__read_int ("kernel/nmi_watchdog" , &n) <0 ) -return false; -if (n >0 ) { - *warn = true; -return false; - } -return true; -} - -void arch_topdown_group_warn (void ) -{ -fprintf (stderr, -"nmi_watchdog enabled with topdown. May give wrong results.\n" -"Disable with echo 0 > /proc/sys/kernel/nmi_watchdog\n" ); -} -#define TOPDOWN_SLOTS 0x0400/*
@@ -65,7 +38,6 @@ void arch_topdown_group_warn(void)* Only Topdown metric supports sample-read. The slots * event must be the leader of the topdown group. */ -bool arch_topdown_sample_read (struct evsel *leader) {if (!evsel__sys_has_perf_metrics (leader))
@@ -76,21 +48,3 @@ bool arch_topdown_sample_read(struct evsel *leader)return false; } - -const char *arch_get_topdown_pmu_name (struct evlist *evlist,bool warn) -{ -const char *pmu_name; - -if (!perf_pmu__has_hybrid ()) -return "cpu" ; - -if (!evlist->hybrid_pmu_name) { -if (warn) -pr_warning ("WARNING: default to use cpu_core topdown events\n" ); - evlist->hybrid_pmu_name =perf_pmu__hybrid_type_to_pmu ("core" ); - } - - pmu_name = evlist->hybrid_pmu_name; - -return pmu_name; -}
tools/perf/builtin-stat.c +20 -98
145 lines not on this page · raw message
tools/perf/util/metricgroup.c +31 -0
@@ -1665,6 +1665,37 @@ bool metricgroup__has_metric(const char *metric) (void *)metric) ? true : false; } +static int metricgroup__topdown_max_level_callback (const struct pmu_metric *pm, +const struct pmu_metrics_table *table__maybe_unused , +void *data) +{ +unsigned int *max_level = data; +unsigned int level; +const char *p =strstr (pm->metric_group,"TopdownL" ); + +if (!p || p[8 ] =='\0' ) +return 0 ; + + level = p[8 ] -'0' ; +if (level > *max_level) + *max_level = level; + +return 0 ; +} + +unsigned int metricgroups__topdown_max_level (void ) +{ +unsigned int max_level =0 ; +const struct pmu_metrics_table *table =pmu_metrics_table__find (); + +if (!table) +return false; + +pmu_metrics_table_for_each_metric (table, metricgroup__topdown_max_level_callback, + &max_level); +return max_level; +} +int metricgroup__copy_metric_events (struct evlist *evlist,struct cgroup *cgrp,struct rblist *new_metric_events,struct rblist *old_metric_events)
tools/perf/util/metricgroup.h +1 -0
@@ -81,6 +81,7 @@ int metricgroup__parse_groups_test(struct evlist *evlist,void metricgroup__print (const struct print_callbacks *print_cb,void *print_state);bool metricgroup__has_metric (const char *metric); +unsigned int metricgroups__topdown_max_level (void );int arch_get_runtimeparam (const struct pmu_metric *pm);void metricgroup__rblist_exit (struct rblist *metric_events);
tools/perf/util/topdown.c +1 -67
75 lines not on this page · raw message
tools/perf/util/topdown.h +4 -7
@@ -1,14 +1,11 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef TOPDOWN_H #define TOPDOWN_H 1 -#include "evsel.h" -#include "evlist.h" -bool arch_topdown_check_group (bool *warn); -void arch_topdown_group_warn (void ); +#include <stdbool.h> + +struct evsel ; +bool arch_topdown_sample_read (struct evsel *leader); -const char *arch_get_topdown_pmu_name (struct evlist *evlist,bool warn); -int topdown_filter_events (const char **attr,char **str,bool use_group, -const char *pmu_name);#endif
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 41/51 perf stat: Remove topdown event special handling
In reply to Ian RogersNow the events are computed from json metrics, the hard coded logic can be removed.
--- tools/perf/util/stat-shadow.c | 346 ---------------------------------- tools/perf/util/stat.c | 13 -- tools/perf/util/stat.h | 26 --- 3 files changed, 385 deletions(-)
tools/perf/util/stat-shadow.c +0 -346
@@ -241,45 +241,6 @@ void perf_stat__update_shadow_stats(struct evsel *counter, u64 count,update_runtime_stat (st,STAT_TRANSACTION , map_idx, count, &rsd); else if (perf_stat_evsel__is(counter, ELISION_START)) update_runtime_stat(st, STAT_ELISION, map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_TOTAL_SLOTS)) - update_runtime_stat(st, STAT_TOPDOWN_TOTAL_SLOTS, - map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_SLOTS_ISSUED)) - update_runtime_stat(st, STAT_TOPDOWN_SLOTS_ISSUED, - map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_SLOTS_RETIRED)) - update_runtime_stat(st, STAT_TOPDOWN_SLOTS_RETIRED, - map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_FETCH_BUBBLES)) - update_runtime_stat(st, STAT_TOPDOWN_FETCH_BUBBLES, - map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_RECOVERY_BUBBLES)) - update_runtime_stat(st, STAT_TOPDOWN_RECOVERY_BUBBLES, - map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_RETIRING)) - update_runtime_stat(st, STAT_TOPDOWN_RETIRING, - map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_BAD_SPEC)) - update_runtime_stat(st, STAT_TOPDOWN_BAD_SPEC, - map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_FE_BOUND)) - update_runtime_stat(st, STAT_TOPDOWN_FE_BOUND, - map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_BE_BOUND)) - update_runtime_stat(st, STAT_TOPDOWN_BE_BOUND, - map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_HEAVY_OPS)) - update_runtime_stat(st, STAT_TOPDOWN_HEAVY_OPS, - map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_BR_MISPREDICT)) - update_runtime_stat(st, STAT_TOPDOWN_BR_MISPREDICT, - map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_FETCH_LAT)) - update_runtime_stat(st, STAT_TOPDOWN_FETCH_LAT, - map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, TOPDOWN_MEM_BOUND)) - update_runtime_stat(st, STAT_TOPDOWN_MEM_BOUND, - map_idx, count, &rsd); else if (evsel__match(counter, HARDWARE, HW_STALLED_CYCLES_FRONTEND)) update_runtime_stat(st, STAT_STALLED_CYCLES_FRONT, map_idx, count, &rsd);
@@ -524,156 +485,6 @@ static void print_ll_cache_misses(struct perf_stat_config *config, out->print_metric (config, out->ctx, color,"%7.2f%%" ,"of all LL-cache accesses" , ratio); } -/* -* High level "TopDown" CPU core pipe line bottleneck break down. -* -* Basic concept following -* Yasin, A Top Down Method for Performance analysis and Counter architecture -* ISPASS14 -* -* The CPU pipeline is divided into 4 areas that can be bottlenecks: -* -* Frontend -> Backend -> Retiring -* BadSpeculation in addition means out of order execution that is thrown away -* (for example branch mispredictions) -* Frontend is instruction decoding. -* Backend is execution, like computation and accessing data in memory -* Retiring is good execution that is not directly bottlenecked -* -* The formulas are computed in slots. -* A slot is an entry in the pipeline each for the pipeline width -* (for example a 4-wide pipeline has 4 slots for each cycle) -* -* Formulas: -* BadSpeculation = ((SlotsIssued - SlotsRetired) + RecoveryBubbles) / -* TotalSlots -* Retiring = SlotsRetired / TotalSlots -* FrontendBound = FetchBubbles / TotalSlots -* BackendBound = 1.0 - BadSpeculation - Retiring - FrontendBound -* -* The kernel provides the mapping to the low level CPU events and any scaling -* needed for the CPU pipeline width, for example: -* -* TotalSlots = Cycles * 4 -* -* The scaling factor is communicated in the sysfs unit. -* -* In some cases the CPU may not be able to measure all the formulas due to -* missing events. In this case multiple formulas are combined, as possible. -* -* Full TopDown supports more levels to sub-divide each area: for example -* BackendBound into computing bound and memory bound. For now we only -* support Level 1 TopDown. -*/ - -static double sanitize_val (double x) -{ -if (x <0 && x >=-0.02 ) -return 0.0 ; -return x; -} - -static double td_total_slots (int map_idx,struct runtime_stat *st, -struct runtime_stat_data *rsd) -{ -return runtime_stat_avg (st,STAT_TOPDOWN_TOTAL_SLOTS , map_idx, rsd); -} - -static double td_bad_spec (int map_idx,struct runtime_stat *st, -struct runtime_stat_data *rsd) -{ -double bad_spec =0 ; -double total_slots; -double total; - - total =runtime_stat_avg (st,STAT_TOPDOWN_SLOTS_ISSUED , map_idx, rsd) - -runtime_stat_avg (st,STAT_TOPDOWN_SLOTS_RETIRED , map_idx, rsd) + -runtime_stat_avg (st,STAT_TOPDOWN_RECOVERY_BUBBLES , map_idx, rsd); - - total_slots =td_total_slots (map_idx, st, rsd); -if (total_slots) - bad_spec = total / total_slots; -return sanitize_val (bad_spec); -} - -static double td_retiring (int map_idx,struct runtime_stat *st, -struct runtime_stat_data *rsd) -{ -double retiring =0 ; -double total_slots =td_total_slots (map_idx, st, rsd); -double ret_slots =runtime_stat_avg (st,STAT_TOPDOWN_SLOTS_RETIRED , - map_idx, rsd); - -if (total_slots) - retiring = ret_slots / total_slots; -return retiring; -} - -static double td_fe_bound (int map_idx,struct runtime_stat *st, -struct runtime_stat_data *rsd) -{ -double fe_bound =0 ; -double total_slots =td_total_slots (map_idx, st, rsd); -double fetch_bub =runtime_stat_avg (st,STAT_TOPDOWN_FETCH_BUBBLES , - map_idx, rsd); - -if (total_slots) - fe_bound = fetch_bub / total_slots; -return fe_bound; -} - -static double td_be_bound (int map_idx,struct runtime_stat *st, -struct runtime_stat_data *rsd) -{ -double sum = (td_fe_bound (map_idx, st, rsd) + -td_bad_spec (map_idx, st, rsd) + -td_retiring (map_idx, st, rsd)); -if (sum ==0 ) -return 0 ; -return sanitize_val (1.0 - sum); -} - -/* -* Kernel reports metrics multiplied with slots. To get back -* the ratios we need to recreate the sum. -*/ - -static double td_metric_ratio (int map_idx,enum stat_type type, -struct runtime_stat *stat, -struct runtime_stat_data *rsd) -{ -double sum =runtime_stat_avg (stat,STAT_TOPDOWN_RETIRING , map_idx, rsd) + -runtime_stat_avg (stat,STAT_TOPDOWN_FE_BOUND , map_idx, rsd) + -runtime_stat_avg (stat,STAT_TOPDOWN_BE_BOUND , map_idx, rsd) + -runtime_stat_avg (stat,STAT_TOPDOWN_BAD_SPEC , map_idx, rsd); -double d =runtime_stat_avg (stat, type, map_idx, rsd); - -if (sum) -return d / sum; -return 0 ; -} - -/* -* ... but only if most of the values are actually available. -* We allow two missing. -*/ - -static bool full_td (int map_idx,struct runtime_stat *stat, -struct runtime_stat_data *rsd) -{ -int c =0 ; - -if (runtime_stat_avg (stat,STAT_TOPDOWN_RETIRING , map_idx, rsd) >0 ) - c++; -if (runtime_stat_avg (stat,STAT_TOPDOWN_BE_BOUND , map_idx, rsd) >0 ) - c++; -if (runtime_stat_avg (stat,STAT_TOPDOWN_FE_BOUND , map_idx, rsd) >0 ) - c++; -if (runtime_stat_avg (stat,STAT_TOPDOWN_BAD_SPEC , map_idx, rsd) >0 ) - c++; -return c >=2 ; -} - static void print_smi_cost(struct perf_stat_config *config, int map_idx, struct perf_stat_output_ctx *out, struct runtime_stat *st,
@@ -885,7 +696,6 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,void *ctxp = out->ctx;print_metric_t print_metric = out->print_metric;double total, ratio =0.0 , total2; -const char *color =NULL ;struct runtime_stat_data rsd = { .ctx =evsel_context (evsel), .cgrp = evsel->cgrp,
@@ -1044,162 +854,6 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config, avg / (ratio * evsel->scale)); else print_metric(config, ctxp, NULL, NULL, "CPUs utilized", 0); - }else if (perf_stat_evsel__is (evsel,TOPDOWN_FETCH_BUBBLES )) { -double fe_bound =td_fe_bound (map_idx, st, &rsd); - -if (fe_bound >0.2 ) - color =PERF_COLOR_RED ; -print_metric (config, ctxp, color,"%8.1f%%" ,"frontend bound" , - fe_bound *100. ); - }else if (perf_stat_evsel__is (evsel,TOPDOWN_SLOTS_RETIRED )) { -double retiring =td_retiring (map_idx, st, &rsd); - -if (retiring >0.7 ) - color =PERF_COLOR_GREEN ; -print_metric (config, ctxp, color,"%8.1f%%" ,"retiring" , - retiring *100. ); - }else if (perf_stat_evsel__is (evsel,TOPDOWN_RECOVERY_BUBBLES )) { -double bad_spec =td_bad_spec (map_idx, st, &rsd); - -if (bad_spec >0.1 ) - color =PERF_COLOR_RED ; -print_metric (config, ctxp, color,"%8.1f%%" ,"bad speculation" , - bad_spec *100. ); - }else if (perf_stat_evsel__is (evsel,TOPDOWN_SLOTS_ISSUED )) { -double be_bound =td_be_bound (map_idx, st, &rsd); -const char *name ="backend bound" ; -static int have_recovery_bubbles =-1 ; - -/* In case the CPU does not support topdown-recovery-bubbles */ -if (have_recovery_bubbles <0 ) - have_recovery_bubbles =pmu_have_event ("cpu" , -"topdown-recovery-bubbles" ); -if (!have_recovery_bubbles) - name ="backend bound/bad spec" ; - -if (be_bound >0.2 ) - color =PERF_COLOR_RED ; -if (td_total_slots (map_idx, st, &rsd) >0 ) -print_metric (config, ctxp, color,"%8.1f%%" , name, - be_bound *100. ); -else -print_metric (config, ctxp,NULL ,NULL , name,0 ); - }else if (perf_stat_evsel__is (evsel,TOPDOWN_RETIRING ) && -full_td (map_idx, st, &rsd)) { -double retiring =td_metric_ratio (map_idx, -STAT_TOPDOWN_RETIRING , st, - &rsd); -if (retiring >0.7 ) - color =PERF_COLOR_GREEN ; -print_metric (config, ctxp, color,"%8.1f%%" ,"Retiring" , - retiring *100. ); - }else if (perf_stat_evsel__is (evsel,TOPDOWN_FE_BOUND ) && -full_td (map_idx, st, &rsd)) { -double fe_bound =td_metric_ratio (map_idx, -STAT_TOPDOWN_FE_BOUND , st, - &rsd); -if (fe_bound >0.2 ) - color =PERF_COLOR_RED ; -print_metric (config, ctxp, color,"%8.1f%%" ,"Frontend Bound" , - fe_bound *100. ); - }else if (perf_stat_evsel__is (evsel,TOPDOWN_BE_BOUND ) && -full_td (map_idx, st, &rsd)) { -double be_bound =td_metric_ratio (map_idx, -STAT_TOPDOWN_BE_BOUND , st, - &rsd); -if (be_bound >0.2 ) - color =PERF_COLOR_RED ; -print_metric (config, ctxp, color,"%8.1f%%" ,"Backend Bound" , - be_bound *100. ); - }else if (perf_stat_evsel__is (evsel,TOPDOWN_BAD_SPEC ) && -full_td (map_idx, st, &rsd)) { -double bad_spec =td_metric_ratio (map_idx, -STAT_TOPDOWN_BAD_SPEC , st, - &rsd); -if (bad_spec >0.1 ) - color =PERF_COLOR_RED ; -print_metric (config, ctxp, color,"%8.1f%%" ,"Bad Speculation" , - bad_spec *100. ); - }else if (perf_stat_evsel__is (evsel,TOPDOWN_HEAVY_OPS ) && -full_td (map_idx, st, &rsd) && (config->topdown_level >1 )) { -double retiring =td_metric_ratio (map_idx, -STAT_TOPDOWN_RETIRING , st, - &rsd); -double heavy_ops =td_metric_ratio (map_idx, -STAT_TOPDOWN_HEAVY_OPS , st, - &rsd); -double light_ops = retiring - heavy_ops; - -if (retiring >0.7 && heavy_ops >0.1 ) - color =PERF_COLOR_GREEN ; -print_metric (config, ctxp, color,"%8.1f%%" ,"Heavy Operations" , - heavy_ops *100. ); -if (retiring >0.7 && light_ops >0.6 ) - color =PERF_COLOR_GREEN ; -else - color =NULL ; -print_metric (config, ctxp, color,"%8.1f%%" ,"Light Operations" , - light_ops *100. ); - }else if (perf_stat_evsel__is (evsel,TOPDOWN_BR_MISPREDICT ) && -full_td (map_idx, st, &rsd) && (config->topdown_level >1 )) { -double bad_spec =td_metric_ratio (map_idx, -STAT_TOPDOWN_BAD_SPEC , st, - &rsd); -double br_mis =td_metric_ratio (map_idx, -STAT_TOPDOWN_BR_MISPREDICT , st, - &rsd); -double m_clears = bad_spec - br_mis; - -if (bad_spec >0.1 && br_mis >0.05 ) - color =PERF_COLOR_RED ; -print_metric (config, ctxp, color,"%8.1f%%" ,"Branch Mispredict" , - br_mis *100. ); -if (bad_spec >0.1 && m_clears >0.05 ) - color =PERF_COLOR_RED ; -else - color =NULL ; -print_metric (config, ctxp, color,"%8.1f%%" ,"Machine Clears" , - m_clears *100. ); - }else if (perf_stat_evsel__is (evsel,TOPDOWN_FETCH_LAT ) && -full_td (map_idx, st, &rsd) && (config->topdown_level >1 )) { -double fe_bound =td_metric_ratio (map_idx, -STAT_TOPDOWN_FE_BOUND , st, - &rsd); -double fetch_lat =td_metric_ratio (map_idx, -STAT_TOPDOWN_FETCH_LAT , st, - &rsd); -double fetch_bw = fe_bound - fetch_lat; - -if (fe_bound >0.2 && fetch_lat >0.15 ) - color =PERF_COLOR_RED ; -print_metric (config, ctxp, color,"%8.1f%%" ,"Fetch Latency" , - fetch_lat *100. ); -if (fe_bound >0.2 && fetch_bw >0.1 ) - color =PERF_COLOR_RED ; -else - color =NULL ; -print_metric (config, ctxp, color,"%8.1f%%" ,"Fetch Bandwidth" , - fetch_bw *100. ); - }else if (perf_stat_evsel__is (evsel,TOPDOWN_MEM_BOUND ) && -full_td (map_idx, st, &rsd) && (config->topdown_level >1 )) { -double be_bound =td_metric_ratio (map_idx, -STAT_TOPDOWN_BE_BOUND , st, - &rsd); -double mem_bound =td_metric_ratio (map_idx, -STAT_TOPDOWN_MEM_BOUND , st, - &rsd); -double core_bound = be_bound - mem_bound; - -if (be_bound >0.2 && mem_bound >0.2 ) - color =PERF_COLOR_RED ; -print_metric (config, ctxp, color,"%8.1f%%" ,"Memory Bound" , - mem_bound *100. ); -if (be_bound >0.2 && core_bound >0.1 ) - color =PERF_COLOR_RED ; -else - color =NULL ; -print_metric (config, ctxp, color,"%8.1f%%" ,"Core Bound" , - core_bound *100. ); }else if (runtime_stat_n (st,STAT_NSECS , map_idx, &rsd) !=0 ) {char unit =' ' ;char unit_buf[10 ] ="/sec" ;
tools/perf/util/stat.c +0 -13
@@ -91,19 +91,6 @@ static const char *id_str[PERF_STAT_EVSEL_ID__MAX] = { ID(TRANSACTION_START, cpu/tx-start/), ID(ELISION_START, cpu/el-start/), ID(CYCLES_IN_TX_CP, cpu/cycles-ct/), -ID (TOPDOWN_TOTAL_SLOTS , topdown-total-slots), -ID (TOPDOWN_SLOTS_ISSUED , topdown-slots-issued), -ID (TOPDOWN_SLOTS_RETIRED , topdown-slots-retired), -ID (TOPDOWN_FETCH_BUBBLES , topdown-fetch-bubbles), -ID (TOPDOWN_RECOVERY_BUBBLES , topdown-recovery-bubbles), -ID (TOPDOWN_RETIRING , topdown-retiring), -ID (TOPDOWN_BAD_SPEC , topdown-bad-spec), -ID (TOPDOWN_FE_BOUND , topdown-fe-bound), -ID (TOPDOWN_BE_BOUND , topdown-be-bound), -ID (TOPDOWN_HEAVY_OPS , topdown-heavy-ops), -ID (TOPDOWN_BR_MISPREDICT , topdown-br-mispredict), -ID (TOPDOWN_FETCH_LAT , topdown-fetch-lat), -ID (TOPDOWN_MEM_BOUND , topdown-mem-bound), ID(SMI_NUM, msr/smi/), ID(APERF, msr/aperf/), };
tools/perf/util/stat.h +0 -26
@@ -25,19 +25,6 @@ enum perf_stat_evsel_id {PERF_STAT_EVSEL_ID__TRANSACTION_START ,PERF_STAT_EVSEL_ID__ELISION_START ,PERF_STAT_EVSEL_ID__CYCLES_IN_TX_CP , -PERF_STAT_EVSEL_ID__TOPDOWN_TOTAL_SLOTS , -PERF_STAT_EVSEL_ID__TOPDOWN_SLOTS_ISSUED , -PERF_STAT_EVSEL_ID__TOPDOWN_SLOTS_RETIRED , -PERF_STAT_EVSEL_ID__TOPDOWN_FETCH_BUBBLES , -PERF_STAT_EVSEL_ID__TOPDOWN_RECOVERY_BUBBLES , -PERF_STAT_EVSEL_ID__TOPDOWN_RETIRING , -PERF_STAT_EVSEL_ID__TOPDOWN_BAD_SPEC , -PERF_STAT_EVSEL_ID__TOPDOWN_FE_BOUND , -PERF_STAT_EVSEL_ID__TOPDOWN_BE_BOUND , -PERF_STAT_EVSEL_ID__TOPDOWN_HEAVY_OPS , -PERF_STAT_EVSEL_ID__TOPDOWN_BR_MISPREDICT , -PERF_STAT_EVSEL_ID__TOPDOWN_FETCH_LAT , -PERF_STAT_EVSEL_ID__TOPDOWN_MEM_BOUND ,PERF_STAT_EVSEL_ID__SMI_NUM ,PERF_STAT_EVSEL_ID__APERF , PERF_STAT_EVSEL_ID__MAX,
@@ -108,19 +95,6 @@ enum stat_type {STAT_CYCLES_IN_TX ,STAT_TRANSACTION ,STAT_ELISION , -STAT_TOPDOWN_TOTAL_SLOTS , -STAT_TOPDOWN_SLOTS_ISSUED , -STAT_TOPDOWN_SLOTS_RETIRED , -STAT_TOPDOWN_FETCH_BUBBLES , -STAT_TOPDOWN_RECOVERY_BUBBLES , -STAT_TOPDOWN_RETIRING , -STAT_TOPDOWN_BAD_SPEC , -STAT_TOPDOWN_FE_BOUND , -STAT_TOPDOWN_BE_BOUND , -STAT_TOPDOWN_HEAVY_OPS , -STAT_TOPDOWN_BR_MISPREDICT , -STAT_TOPDOWN_FETCH_LAT , -STAT_TOPDOWN_MEM_BOUND ,STAT_SMI_NUM ,STAT_APERF ,STAT_MAX
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 42/51 perf doc: Refresh topdown documentation
In reply to Ian Rogersperf stat now supports --topdown for any platform with the TopdownL1 metric group including Intel before Icelake. Tweak the documentation to reflect this.
--- tools/perf/Documentation/perf-stat.txt | 27 +++++----- tools/perf/Documentation/topdown.txt | 70 +++++++++++--------------- 2 files changed, 44 insertions(+), 53 deletions(-)
tools/perf/Documentation/perf-stat.txt +15 -12
@@ -394,10 +394,10 @@ See perf list output for the possible metrics and metricgroups. Do not aggregate counts across all monitored CPUs. --topdown:: -Print complete top-down metrics supported by the CPU. This allows to -determine bottle necks in the CPU pipeline for CPU bound workloads, -by breaking the cycles consumed down into frontend bound, backend bound, -bad speculation and retiring. +Print top-down metrics supported by the CPU. This allows to determine +bottle necks in the CPU pipeline for CPU bound workloads, by breaking +the cycles consumed down into frontend bound, backend bound, bad +speculation and retiring. Frontend bound means that the CPU cannot fetch and decode instructions fast enough. Backend bound means that computation or memory access is the bottle
@@ -430,15 +430,18 @@ CPUs the workload runs on. If needed the CPUs can be forced using taskset. --td-level:: -Print the top-down statistics that equal to or lower than the input level. -It allows users to print the interested top-down metrics level instead of -the complete top-down metrics. +Print the top-down statistics that equal the input level. It allows +users to print the interested top-down metrics level instead of the +level 1 top-down metrics. + +As the higher levels gather more metrics and use more counters they +will be less accurate. By convention a metric can be examined by +appending '_group' to it and this will increase accuracy compared to +gathering all metrics for a level. For example, level 1 analysis may +highlight 'tma_frontend_bound'. This metric may be drilled into with +'tma_frontend_bound_group' with +'perf stat -M tma_frontend_bound_group...'. -The availability of the top-down metrics level depends on the hardware. For -example, Ice Lake only supports L1 top-down metrics. The Sapphire Rapids -supports both L1 and L2 top-down metrics. - -Default: 0 means the max level that the current hardware support. Error out if the input is higher than the supported max level. --no-merge::
tools/perf/Documentation/topdown.txt +29 -41
98 lines not on this page · raw message
Signature · 7 lines
2.39.2.637.g21b0678d19-goog _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Ian Rogers
reviewerPATCH 43/51 perf stat: Remove hard coded transaction events
In reply to Ian RogersThe metric group "transaction" is now present for Intel architectures so the legacy hard coded approach won't be used. Remove the associated logic.
--- tools/perf/builtin-stat.c | 59 ++++++----------------------------- tools/perf/util/stat-shadow.c | 48 +--------------------------- tools/perf/util/stat.c | 4 --- tools/perf/util/stat.h | 7 ----- 4 files changed, 11 insertions(+), 107 deletions(-)
tools/perf/builtin-stat.c +10 -49
@@ -100,30 +100,6 @@static void print_counters (struct timespec *ts,int argc,const char **argv); -/* Default events used for perf stat -T */ -static const char *transaction_attrs = { -"task-clock," -"{" -"instructions," -"cycles," -"cpu/cycles-t/," -"cpu/tx-start/," -"cpu/el-start/," -"cpu/cycles-ct/" -"}" -}; - -/* More limited version when the CPU does not have all events. */ -static const char * transaction_limited_attrs = { -"task-clock," -"{" -"instructions," -"cycles," -"cpu/cycles-t/," -"cpu/tx-start/" -"}" -}; -static const char *smi_cost_attrs = {"{" "msr/aperf/,"
@@ -1811,37 +1787,22 @@ static int add_default_attributes(void)return 0 ;if (transaction_run) { -struct parse_events_error errinfo;/* Handle -T as -M transaction. Once platform specific metrics * support has been added to the json files, all architectures * will use this approach. To determine transaction support * on an architecture test for such a metric name. */ -if (metricgroup__has_metric ("transaction" )) { -return metricgroup__parse_groups (evsel_list,"transaction" , - stat_config.metric_no_group, - stat_config.metric_no_merge, - stat_config.metric_no_threshold, - stat_config.user_requested_cpu_list, - stat_config.system_wide, - &stat_config.metric_events); - } - -parse_events_error__init (&errinfo); -if (pmu_have_event ("cpu" ,"cycles-ct" ) && -pmu_have_event ("cpu" ,"el-start" )) - err =parse_events (evsel_list, transaction_attrs, - &errinfo); -else - err =parse_events (evsel_list, - transaction_limited_attrs, - &errinfo); -if (err) { -fprintf (stderr,"Cannot set up transaction events\n" ); -parse_events_error__print (&errinfo, transaction_attrs); +if (!metricgroup__has_metric ("transaction" )) { +pr_err ("Missing transaction metrics" ); +return -1 ; } -parse_events_error__exit (&errinfo); -return err ?-1 :0 ; +return metricgroup__parse_groups (evsel_list,"transaction" , + stat_config.metric_no_group, + stat_config.metric_no_merge, + stat_config.metric_no_threshold, + stat_config.user_requested_cpu_list, + stat_config.system_wide, + &stat_config.metric_events); }if (smi_cost) {
tools/perf/util/stat-shadow.c +1 -47
66 lines not on this page · raw message
tools/perf/util/stat.c +0 -4
@@ -87,10 +87,6 @@ bool __perf_stat_evsel__is(struct evsel *evsel, enum perf_stat_evsel_id id)#define ID (id, name) [PERF_STAT_EVSEL_ID__##id] = #namestatic const char *id_str[PERF_STAT_EVSEL_ID__MAX ] = {ID (NONE , x), - ID(CYCLES_IN_TX, cpu/cycles-t/), - ID(TRANSACTION_START, cpu/tx-start/), - ID(ELISION_START, cpu/el-start/), - ID(CYCLES_IN_TX_CP, cpu/cycles-ct/), ID(SMI_NUM, msr/smi/), ID(APERF, msr/aperf/), };
tools/perf/util/stat.h +0 -7
@@ -21,10 +21,6 @@ struct stats {enum perf_stat_evsel_id {PERF_STAT_EVSEL_ID__NONE =0 , -PERF_STAT_EVSEL_ID__CYCLES_IN_TX , -PERF_STAT_EVSEL_ID__TRANSACTION_START , -PERF_STAT_EVSEL_ID__ELISION_START , -PERF_STAT_EVSEL_ID__CYCLES_IN_TX_CP ,PERF_STAT_EVSEL_ID__SMI_NUM ,PERF_STAT_EVSEL_ID__APERF ,PERF_STAT_EVSEL_ID__MAX ,
@@ -92,9 +88,6 @@ enum stat_type {STAT_LL_CACHE ,STAT_ITLB_CACHE ,STAT_DTLB_CACHE , -STAT_CYCLES_IN_TX , -STAT_TRANSACTION , -STAT_ELISION ,STAT_SMI_NUM ,STAT_APERF ,STAT_MAX
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 44/51 perf stat: Use metrics for --smi-cost
In reply to Ian RogersRather than parsing events for --smi-cost, use the json metric group 'smi'.
--- tools/perf/builtin-stat.c | 34 +++++++++++----------------------- tools/perf/util/stat-shadow.c | 30 ------------------------------ tools/perf/util/stat.c | 2 -- tools/perf/util/stat.h | 4 ---- 4 files changed, 11 insertions(+), 59 deletions(-)
tools/perf/builtin-stat.c +11 -23
@@ -100,14 +100,6 @@static void print_counters (struct timespec *ts,int argc,const char **argv); -static const char *smi_cost_attrs = { -"{" -"msr/aperf/," -"msr/smi/," -"cycles" -"}" -}; -static struct evlist *evsel_list;static bool all_counters_use_bpf = true;
@@ -1666,7 +1658,6 @@ static int perf_stat_init_aggr_mode_file(struct perf_stat *st)*/ static int add_default_attributes (void ) { -int err;struct perf_event_attr default_attrs0[] = { { .type =PERF_TYPE_SOFTWARE , .config =PERF_COUNT_SW_TASK_CLOCK },
@@ -1806,11 +1797,10 @@ static int add_default_attributes(void) }if (smi_cost) { -struct parse_events_error errinfo;int smi;if (sysfs__read_int (FREEZE_ON_SMI_PATH , &smi) <0 ) { -fprintf (stderr,"freeze_on_smi is not supported.\n" ); +pr_err ("freeze_on_smi is not supported." );return -1 ; }
@@ -1822,23 +1812,21 @@ static int add_default_attributes(void) smi_reset = true; } -if (!pmu_have_event ("msr" ,"aperf" ) || - !pmu_have_event ("msr" ,"smi" )) { -fprintf (stderr,"To measure SMI cost, it needs " -"msr/aperf/, msr/smi/ and cpu/cycles/ support\n" ); +if (!metricgroup__has_metric ("smi" )) { +pr_err ("Missing smi metrics" );return -1 ; } +if (!force_metric_only) stat_config.metric_only = true; -parse_events_error__init (&errinfo); - err =parse_events (evsel_list, smi_cost_attrs, &errinfo); -if (err) { -parse_events_error__print (&errinfo, smi_cost_attrs); -fprintf (stderr,"Cannot set up SMI cost events\n" ); - } -parse_events_error__exit (&errinfo); -return err ?-1 :0 ; +return metricgroup__parse_groups (evsel_list,"smi" , + stat_config.metric_no_group, + stat_config.metric_no_merge, + stat_config.metric_no_threshold, + stat_config.user_requested_cpu_list, + stat_config.system_wide, + &stat_config.metric_events); }if (topdown_run) {
tools/perf/util/stat-shadow.c +0 -30
@@ -255,10 +255,6 @@ void perf_stat__update_shadow_stats(struct evsel *counter, u64 count,update_runtime_stat (st,STAT_DTLB_CACHE , map_idx, count, &rsd); else if (evsel__match(counter, HW_CACHE, HW_CACHE_ITLB)) update_runtime_stat(st, STAT_ITLB_CACHE, map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, SMI_NUM)) - update_runtime_stat(st, STAT_SMI_NUM, map_idx, count, &rsd); - else if (perf_stat_evsel__is(counter, APERF)) - update_runtime_stat(st, STAT_APERF, map_idx, count, &rsd);if (counter->collect_stat) { v = saved_value_lookup(counter, map_idx, true, STAT_NONE, 0, st,
@@ -479,30 +475,6 @@ static void print_ll_cache_misses(struct perf_stat_config *config, out->print_metric (config, out->ctx, color,"%7.2f%%" ,"of all LL-cache accesses" , ratio); } -static void print_smi_cost (struct perf_stat_config *config,int map_idx, -struct perf_stat_output_ctx *out, -struct runtime_stat *st, -struct runtime_stat_data *rsd) -{ -double smi_num, aperf, cycles, cost =0.0 ; -const char *color =NULL ; - - smi_num =runtime_stat_avg (st,STAT_SMI_NUM , map_idx, rsd); - aperf =runtime_stat_avg (st,STAT_APERF , map_idx, rsd); - cycles =runtime_stat_avg (st,STAT_CYCLES , map_idx, rsd); - -if ((cycles ==0 ) || (aperf ==0 )) -return ; - -if (smi_num) - cost = (aperf - cycles) / aperf *100.00 ; - -if (cost >10 ) - color =PERF_COLOR_RED ; - out->print_metric (config, out->ctx, color,"%8.1f%%" ,"SMI cycles%" , cost); - out->print_metric (config, out->ctx,NULL ,"%4.0f" ,"SMI#" , smi_num); -} - static int prepare_metric(struct evsel **metric_events, struct metric_ref *metric_refs, struct expr_parse_ctx *pctx,
@@ -819,8 +791,6 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,if (unit !=' ' )snprintf (unit_buf,sizeof (unit_buf),"%c/sec" , unit);print_metric (config, ctxp,NULL ,"%8.3f" , unit_buf, ratio); - }else if (perf_stat_evsel__is (evsel,SMI_NUM )) { -print_smi_cost (config, map_idx, out, st, &rsd); }else { num =0 ; }
tools/perf/util/stat.c +0 -2
@@ -87,8 +87,6 @@ bool __perf_stat_evsel__is(struct evsel *evsel, enum perf_stat_evsel_id id)#define ID (id, name) [PERF_STAT_EVSEL_ID__##id] = #namestatic const char *id_str[PERF_STAT_EVSEL_ID__MAX ] = {ID (NONE , x), - ID(SMI_NUM, msr/smi/), - ID(APERF, msr/aperf/), };#undef ID
tools/perf/util/stat.h +0 -4
@@ -21,8 +21,6 @@ struct stats {enum perf_stat_evsel_id {PERF_STAT_EVSEL_ID__NONE =0 , -PERF_STAT_EVSEL_ID__SMI_NUM , -PERF_STAT_EVSEL_ID__APERF ,PERF_STAT_EVSEL_ID__MAX , };
@@ -88,8 +86,6 @@ enum stat_type {STAT_LL_CACHE ,STAT_ITLB_CACHE ,STAT_DTLB_CACHE , -STAT_SMI_NUM , -STAT_APERF , STAT_MAX };
Signature · 7 lines
2.39.2.637.g21b0678d19-goog _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Ian Rogers
reviewerPATCH 45/51 perf stat: Remove perf_stat_evsel_id
In reply to Ian Rogersperf_stat_evsel_id was used for hard coded metrics. These have now migrated to json metrics and so the id values are no longer necessary.
--- tools/perf/util/stat.c | 31 ------------------------------- tools/perf/util/stat.h | 12 ------------ 2 files changed, 43 deletions(-)
tools/perf/util/stat.c +0 -31
@@ -77,36 +77,6 @@ double rel_stddev_stats(double stddev, double avg)return pct; } -bool __perf_stat_evsel__is (struct evsel *evsel,enum perf_stat_evsel_id id) -{ -struct perf_stat_evsel *ps = evsel->stats; - -return ps->id == id; -} - -#define ID (id, name) [PERF_STAT_EVSEL_ID__##id] = #name -static const char *id_str[PERF_STAT_EVSEL_ID__MAX ] = { -ID (NONE , x), -}; -#undef ID - -static void perf_stat_evsel_id_init (struct evsel *evsel) -{ -struct perf_stat_evsel *ps = evsel->stats; -int i; - -/* ps->id is 0 hence PERF_STAT_EVSEL_ID__NONE by default */ - -for (i =0 ; i <PERF_STAT_EVSEL_ID__MAX ; i++) { -if (!strcmp (evsel__name (evsel), id_str[i]) || - (strstr (evsel__name (evsel), id_str[i]) && evsel->pmu_name - &&strstr (evsel__name (evsel), evsel->pmu_name))) { - ps->id = i; -break ; - } - } -} -static void evsel__reset_aggr_stats (struct evsel *evsel) {struct perf_stat_evsel *ps = evsel->stats;
@@ -166,7 +136,6 @@ static int evsel__alloc_stat_priv(struct evsel *evsel, int nr_aggr)return -ENOMEM ; } -perf_stat_evsel_id_init (evsel);evsel__reset_stat_priv (evsel);return 0 ; }
tools/perf/util/stat.h +0 -12
@@ -19,11 +19,6 @@ struct stats {u64 max, min; }; -enum perf_stat_evsel_id { -PERF_STAT_EVSEL_ID__NONE =0 , -PERF_STAT_EVSEL_ID__MAX , -}; -/* hold aggregated event info */ struct perf_stat_aggr {/* aggregated values */
@@ -40,8 +35,6 @@ struct perf_stat_aggr {struct perf_stat_evsel {/* used for repeated runs */ struct stats res_stats; -/* evsel id for quick check */ -enum perf_stat_evsel_id id;/* number of allocated 'aggr' */ int nr_aggr;/* aggregated event values */
@@ -187,11 +180,6 @@ static inline void update_rusage_stats(struct rusage_stats *ru_stats, struct russtruct evsel ;struct evlist ; -bool __perf_stat_evsel__is (struct evsel *evsel,enum perf_stat_evsel_id id); - -#define perf_stat_evsel__is (evsel, id) \ - __perf_stat_evsel__is(evsel, PERF_STAT_EVSEL_ID__ ## id) -extern struct runtime_stat rt_stat;extern struct stats walltime_nsecs_stats;extern struct rusage_stats ru_stats;
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 46/51 perf stat: Move enums from header
In reply to Ian RogersThe enums are only used in stat-shadow.c, so narrow their scope by moving to the C file.
--- tools/perf/util/stat-shadow.c | 25 +++++++++++++++++++++++++ tools/perf/util/stat.h | 27 --------------------------- 2 files changed, 25 insertions(+), 27 deletions(-)
tools/perf/util/stat-shadow.c +25 -0
@@ -29,6 +29,31 @@ struct runtime_stat rt_stat;struct stats walltime_nsecs_stats;struct rusage_stats ru_stats; +enum { +CTX_BIT_USER =1 <<0 , +CTX_BIT_KERNEL =1 <<1 , +CTX_BIT_HV =1 <<2 , +CTX_BIT_HOST =1 <<3 , +CTX_BIT_IDLE =1 <<4 , +CTX_BIT_MAX =1 <<5 , +}; + +enum stat_type { +STAT_NONE =0 , +STAT_NSECS , +STAT_CYCLES , +STAT_STALLED_CYCLES_FRONT , +STAT_STALLED_CYCLES_BACK , +STAT_BRANCHES , +STAT_CACHEREFS , +STAT_L1_DCACHE , +STAT_L1_ICACHE , +STAT_LL_CACHE , +STAT_ITLB_CACHE , +STAT_DTLB_CACHE , +STAT_MAX +}; +struct saved_value {struct rb_node rb_node;struct evsel *evsel;
tools/perf/util/stat.h +0 -27
@@ -55,33 +55,6 @@ enum aggr_mode { AGGR_MAX }; -enum { -CTX_BIT_USER =1 <<0 , -CTX_BIT_KERNEL =1 <<1 , -CTX_BIT_HV =1 <<2 , -CTX_BIT_HOST =1 <<3 , -CTX_BIT_IDLE =1 <<4 , -CTX_BIT_MAX =1 <<5 , -}; - -#define NUM_CTX CTX_BIT_MAX - -enum stat_type { -STAT_NONE =0 , -STAT_NSECS , -STAT_CYCLES , -STAT_STALLED_CYCLES_FRONT , -STAT_STALLED_CYCLES_BACK , -STAT_BRANCHES , -STAT_CACHEREFS , -STAT_L1_DCACHE , -STAT_L1_ICACHE , -STAT_LL_CACHE , -STAT_ITLB_CACHE , -STAT_DTLB_CACHE , -STAT_MAX -}; -struct runtime_stat {struct rblist value_list; };
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 47/51 perf stat: Hide runtime_stat
In reply to Ian Rogersruntime_stat is only shared for the sake of tests that don't care about its value. Move the definition into stat-shadow.c and have the tests also use the global version.
--- tools/perf/builtin-script.c | 6 +- tools/perf/builtin-stat.c | 4 +- tools/perf/tests/parse-metric.c | 19 ++-- tools/perf/tests/pmu-events.c | 8 +- tools/perf/util/stat-display.c | 5 +- tools/perf/util/stat-shadow.c | 165 +++++++++++++------------------- tools/perf/util/stat.c | 2 +- tools/perf/util/stat.h | 17 +--- 8 files changed, 90 insertions(+), 136 deletions(-)
tools/perf/builtin-script.c +2 -4
@@ -2074,8 +2074,7 @@ static void perf_sample__fprint_metric(struct perf_script *script, val = sample->period * evsel->scale;perf_stat__update_shadow_stats (evsel, val, - sample->cpu, - &rt_stat); + sample->cpu);evsel_script (evsel)->val = val;if (evsel_script (leader)->gnum == leader->core.nr_members) { for_each_group_member (ev2, leader) {
@@ -2083,8 +2082,7 @@ static void perf_sample__fprint_metric(struct perf_script *script,evsel_script (ev2)->val, sample->cpu, &ctx, -NULL , - &rt_stat); + NULL); }evsel_script (leader)->gnum =0 ; }
tools/perf/builtin-stat.c +2 -2
@@ -434,7 +434,7 @@ static void process_interval(void)clock_gettime (CLOCK_MONOTONIC , &ts);diff_timespec (&rs, &ts, &ref_time); -perf_stat__reset_shadow_per_stat (&rt_stat); +perf_stat__reset_shadow_per_stat ();evlist__reset_aggr_stats (evsel_list);if (read_counters (&rs) ==0 )
@@ -910,7 +910,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)evlist__copy_prev_raw_counts (evsel_list);evlist__reset_prev_raw_counts (evsel_list);evlist__reset_aggr_stats (evsel_list); -perf_stat__reset_shadow_per_stat (&rt_stat); +perf_stat__reset_shadow_per_stat (); }else {update_stats (&walltime_nsecs_stats, t1 - t0);update_rusage_stats (&ru_stats, &stat_config.ru_data);
tools/perf/tests/parse-metric.c +8 -11
@@ -30,8 +30,7 @@ static u64 find_value(const char *name, struct value *values)return 0 ; } -static void load_runtime_stat (struct runtime_stat *st,struct evlist *evlist, -struct value *vals) +static void load_runtime_stat (struct evlist *evlist,struct value *vals) {struct evsel *evsel;u64 count;
@@ -39,14 +38,14 @@ static void load_runtime_stat(struct runtime_stat *st, struct evlist *evlist,perf_stat__reset_shadow_stats ();evlist__for_each_entry (evlist, evsel) { count =find_value (evsel->name, vals); -perf_stat__update_shadow_stats (evsel, count,0 , st); +perf_stat__update_shadow_stats (evsel, count,0 );if (!strcmp (evsel->name,"duration_time" ))update_stats (&walltime_nsecs_stats, count); } }static double compute_single (struct rblist *metric_events,struct evlist *evlist, -struct runtime_stat *st,const char *name) +const char *name) {struct metric_expr *mexp;struct metric_event *me;
@@ -58,7 +57,7 @@ static double compute_single(struct rblist *metric_events, struct evlist *evlist list_for_each_entry (mexp, &me->head, nd) {if (strcmp (mexp->metric_name, name))continue ; -return test_generic_metric (mexp,0 , st); +return test_generic_metric (mexp,0 ); } } }
@@ -74,7 +73,6 @@ static int __compute_metric(const char *name, struct value *vals, };const struct pmu_metrics_table *pme_test;struct perf_cpu_map *cpus; -struct runtime_stat st;struct evlist *evlist;int err;
@@ -93,7 +91,6 @@ static int __compute_metric(const char *name, struct value *vals, }perf_evlist__set_maps (&evlist->core, cpus,NULL ); -runtime_stat__init (&st);/* Parse the metric into metric_events list. */ pme_test =find_core_metrics_table ("testarch" ,"testcpu" );
@@ -107,18 +104,17 @@ static int __compute_metric(const char *name, struct value *vals, goto out;/* Load the runtime stats with given numbers for events. */ -load_runtime_stat (&st, evlist, vals); +load_runtime_stat (evlist, vals);/* And execute the metric */ if (name1 && ratio1) - *ratio1 =compute_single (&metric_events, evlist, &st, name1); + *ratio1 =compute_single (&metric_events, evlist, name1);if (name2 && ratio2) - *ratio2 =compute_single (&metric_events, evlist, &st, name2); + *ratio2 =compute_single (&metric_events, evlist, name2); out:/* ... cleanup. */ metricgroup__rblist_exit (&metric_events); -runtime_stat__exit (&st);evlist__free_stats (evlist);perf_cpu_map__put (cpus);evlist__delete (evlist);
@@ -300,6 +296,7 @@ static int test_metric_group(void)static int test__parse_metric (struct test_suite *test__maybe_unused ,int subtest__maybe_unused ) { +perf_stat__init_shadow_stats ();TEST_ASSERT_VAL ("IPC failed" ,test_ipc () ==0 );TEST_ASSERT_VAL ("frontend failed" ,test_frontend () ==0 );TEST_ASSERT_VAL ("DCache_L2 failed" ,test_dcache_l2 () ==0 );
tools/perf/tests/pmu-events.c +3 -5
@@ -816,7 +816,6 @@ static int test__parsing_callback(const struct pmu_metric *pm,int k;struct evlist *evlist;struct perf_cpu_map *cpus; -struct runtime_stat st;struct evsel *evsel;struct rblist metric_events = { .nr_entries =0 ,
@@ -844,7 +843,6 @@ static int test__parsing_callback(const struct pmu_metric *pm, }perf_evlist__set_maps (&evlist->core, cpus,NULL ); -runtime_stat__init (&st); err =metricgroup__parse_groups_test (evlist, table, pm->metric_name, &metric_events);if (err) {
@@ -867,7 +865,7 @@ static int test__parsing_callback(const struct pmu_metric *pm, k =1 ;perf_stat__reset_shadow_stats ();evlist__for_each_entry (evlist, evsel) { -perf_stat__update_shadow_stats (evsel, k,0 , &st); +perf_stat__update_shadow_stats (evsel, k,0 );if (!strcmp (evsel->name,"duration_time" ))update_stats (&walltime_nsecs_stats, k); k++;
@@ -881,7 +879,7 @@ static int test__parsing_callback(const struct pmu_metric *pm, list_for_each_entry (mexp, &me->head, nd) {if (strcmp (mexp->metric_name, pm->metric_name))continue ; -pr_debug ("Result %f\n" ,test_generic_metric (mexp,0 , &st)); +pr_debug ("Result %f\n" ,test_generic_metric (mexp,0 )); err =0 ; (*failures)--; goto out_err;
@@ -896,7 +894,6 @@ static int test__parsing_callback(const struct pmu_metric *pm,/* ... cleanup. */ metricgroup__rblist_exit (&metric_events); -runtime_stat__exit (&st);evlist__free_stats (evlist);perf_cpu_map__put (cpus);evlist__delete (evlist);
@@ -908,6 +905,7 @@ static int test__parsing(struct test_suite *test __maybe_unused, {int failures =0 ; +perf_stat__init_shadow_stats ();pmu_for_each_core_metric (test__parsing_callback, &failures);pmu_for_each_sys_metric (test__parsing_callback, &failures);
tools/perf/util/stat-display.c +2 -3
@@ -729,7 +729,7 @@ static void printout(struct perf_stat_config *config, struct outstate *os,if (ok) {perf_stat__print_shadow_stats (config, counter, uval, map_idx, - &out, &config->metric_events, &rt_stat); + &out, &config->metric_events); }else {pm (config, os,/*color=*/ NULL ,/*format=*/ NULL ,/*unit=*/ "" ,/*val=*/ 0 ); }
@@ -1089,8 +1089,7 @@ static void print_metric_headers(struct perf_stat_config *config,perf_stat__print_shadow_stats (config, counter,0 ,0 , &out, - &config->metric_events, - &rt_stat); + &config->metric_events); }if (!config->json_output)
tools/perf/util/stat-shadow.c +68 -97
491 lines not on this page · raw message
tools/perf/util/stat.c +1 -1
@@ -659,7 +659,7 @@ static void evsel__update_shadow_stats(struct evsel *evsel)for (i =0 ; i < ps->nr_aggr; i++) {struct perf_counts_values *aggr_counts = &ps->aggr[i].counts; -perf_stat__update_shadow_stats (evsel, aggr_counts->val, i, &rt_stat); +perf_stat__update_shadow_stats (evsel, aggr_counts->val, i); } }
tools/perf/util/stat.h +4 -13
@@ -55,10 +55,6 @@ enum aggr_mode {AGGR_MAX }; -struct runtime_stat { -struct rblist value_list; -}; -struct rusage_stats {struct stats ru_utime_usec_stat;struct stats ru_stime_usec_stat;
@@ -153,7 +149,6 @@ static inline void update_rusage_stats(struct rusage_stats *ru_stats, struct russtruct evsel ;struct evlist ; -extern struct runtime_stat rt_stat;extern struct stats walltime_nsecs_stats;extern struct rusage_stats ru_stats;
@@ -162,13 +157,10 @@ typedef void (*print_metric_t)(struct perf_stat_config *config, const char *fmt, double val);typedef void (*new_line_t )(struct perf_stat_config *config,void *ctx); -void runtime_stat__init (struct runtime_stat *st); -void runtime_stat__exit (struct runtime_stat *st);void perf_stat__init_shadow_stats (void );void perf_stat__reset_shadow_stats (void ); -void perf_stat__reset_shadow_per_stat (struct runtime_stat *st); -void perf_stat__update_shadow_stats (struct evsel *counter,u64 count, -int map_idx,struct runtime_stat *st); +void perf_stat__reset_shadow_per_stat (void ); +void perf_stat__update_shadow_stats (struct evsel *counter,u64 count,int map_idx);struct perf_stat_output_ctx {void *ctx;print_metric_t print_metric;
@@ -180,8 +172,7 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,struct evsel *evsel, double avg, int map_idx, struct perf_stat_output_ctx *out, - struct rblist *metric_events, - struct runtime_stat *st); + struct rblist *metric_events);int evlist__alloc_stats (struct perf_stat_config *config,struct evlist *evlist,bool alloc_raw);
@@ -220,5 +211,5 @@ void evlist__print_counters(struct evlist *evlist, struct perf_stat_config *conf struct target *_target, struct timespec *ts, int argc, const char **argv);struct metric_expr ; -double test_generic_metric (struct metric_expr *mexp,int map_idx,struct runtime_stat *st); +double test_generic_metric (struct metric_expr *mexp,int map_idx);#endif
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 48/51 perf stat: Add cpu_aggr_map for loop
In reply to Ian RogersRename variables, add a comment and add a cpu_aggr_map__for_each_idx to aid the readability of the stat-display code. In particular, try to make sure aggr_idx is used consistently to differentiate from other kinds of index.
--- tools/perf/util/cpumap.h | 3 + tools/perf/util/stat-display.c | 112 +++++++++++++++-------------- tools/perf/util/stat-shadow.c | 128 ++++++++++++++++----------------- tools/perf/util/stat.c | 8 +-- tools/perf/util/stat.h | 6 +- 5 files changed, 132 insertions(+), 125 deletions(-)
tools/perf/util/cpumap.h +3 -0
@@ -35,6 +35,9 @@ struct cpu_aggr_map {struct aggr_cpu_id map[]; }; +#define cpu_aggr_map__for_each_idx (idx, aggr_map) \ + for ((idx) = 0; (idx) < aggr_map->nr; (idx)++) +struct perf_record_cpu_map_data ;bool perf_record_cpu_map_data__test_bit (int i,const struct perf_record_cpu_map_data *data);
tools/perf/util/stat-display.c +58 -54
331 lines not on this page · raw message
tools/perf/util/stat-shadow.c +64 -64
397 lines not on this page · raw message
tools/perf/util/stat.c +4 -4
@@ -651,15 +651,15 @@ void perf_stat_process_percore(struct perf_stat_config *config, struct evlist *estatic void evsel__update_shadow_stats (struct evsel *evsel) {struct perf_stat_evsel *ps = evsel->stats; -int i; +int aggr_idx;if (ps->aggr ==NULL )return ; -for (i =0 ; i < ps->nr_aggr; i++) { -struct perf_counts_values *aggr_counts = &ps->aggr[i].counts; +for (aggr_idx =0 ; aggr_idx < ps->nr_aggr; aggr_idx++) { +struct perf_counts_values *aggr_counts = &ps->aggr[aggr_idx].counts; -perf_stat__update_shadow_stats (evsel, aggr_counts->val, i); +perf_stat__update_shadow_stats (evsel, aggr_counts->val, aggr_idx); } }
tools/perf/util/stat.h +3 -3
@@ -160,7 +160,7 @@ typedef void (*new_line_t)(struct perf_stat_config *config, void *ctx);void perf_stat__init_shadow_stats (void );void perf_stat__reset_shadow_stats (void );void perf_stat__reset_shadow_per_stat (void ); -void perf_stat__update_shadow_stats (struct evsel *counter,u64 count,int map_idx); +void perf_stat__update_shadow_stats (struct evsel *counter,u64 count,int aggr_idx);struct perf_stat_output_ctx {void *ctx;print_metric_t print_metric;
@@ -170,7 +170,7 @@ struct perf_stat_output_ctx {void perf_stat__print_shadow_stats (struct perf_stat_config *config,struct evsel *evsel, -double avg,int map_idx, +double avg,int aggr_idx,struct perf_stat_output_ctx *out,struct rblist *metric_events);
@@ -211,5 +211,5 @@ void evlist__print_counters(struct evlist *evlist, struct perf_stat_config *conf struct target *_target, struct timespec *ts, int argc, const char **argv);struct metric_expr ; -double test_generic_metric (struct metric_expr *mexp,int map_idx); +double test_generic_metric (struct metric_expr *mexp,int aggr_idx);#endif
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 49/51 perf metric: Directly use counts rather than saved_value
In reply to Ian RogersBugs with double aggregation have been introduced because of aggregation of counters and again with saved_value. Remove the generic metric use-case. Update parse-metric and pmu-events tests to update aggregate rather than saved_value counts.
--- tools/perf/tests/parse-metric.c | 4 +-- tools/perf/tests/pmu-events.c | 4 +-- tools/perf/util/stat-shadow.c | 56 +++++++++++---------------------- 3 files changed, 23 insertions(+), 41 deletions(-)
tools/perf/tests/parse-metric.c +2 -2
@@ -35,10 +35,10 @@ static void load_runtime_stat(struct evlist *evlist, struct value *vals)struct evsel *evsel;u64 count; -perf_stat__reset_shadow_stats (); +evlist__alloc_aggr_stats (evlist,1 );evlist__for_each_entry (evlist, evsel) { count =find_value (evsel->name, vals); -perf_stat__update_shadow_stats (evsel, count,0 ); + evsel->stats->aggr->counts.val = count;if (!strcmp (evsel->name,"duration_time" ))update_stats (&walltime_nsecs_stats, count); }
tools/perf/tests/pmu-events.c +2 -2
@@ -863,9 +863,9 @@ static int test__parsing_callback(const struct pmu_metric *pm,* zero when subtracted and so try to make them unique. */ k =1 ; -perf_stat__reset_shadow_stats (); +evlist__alloc_aggr_stats (evlist,1 );evlist__for_each_entry (evlist, evsel) { -perf_stat__update_shadow_stats (evsel, k,0 ); + evsel->stats->aggr->counts.val = k;if (!strcmp (evsel->name,"duration_time" ))update_stats (&walltime_nsecs_stats, k); k++;
tools/perf/util/stat-shadow.c +19 -37
98 lines not on this page · raw message
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Ian Rogers
reviewerPATCH 50/51 perf stat: Use counts rather than saved_value
In reply to Ian RogersSwitch the hard coded metrics to use the aggregate value rather than from saved_value. When computing a metric like IPC the aggregate count comes from instructions then cycles is looked up and if present IPC computed. Rather than lookup from the saved_value rbtree, search the counter's evlist for the desired counter.
A new helper evsel__stat_type is used to both quickly find a metric function and to identify when a counter is the one being sought. So that both total and miss counts can be sought, the stat_type enum is expanded. The ratio functions are rewritten to share a common helper with the ratios being directly passed rather than computed from an enum value.
--- tools/perf/util/evsel.h | 2 +- tools/perf/util/stat-shadow.c | 534 +++++++++++++++++----------------- 2 files changed, 270 insertions(+), 266 deletions(-)
tools/perf/util/evsel.h +1 -1
@@ -436,7 +436,7 @@ static inline bool evsel__is_bpf_output(struct evsel *evsel)return evsel__match (evsel,SOFTWARE ,SW_BPF_OUTPUT ); } -static inline bool evsel__is_clock (struct evsel *evsel) +static inline bool evsel__is_clock (const struct evsel *evsel) {return evsel__match (evsel,SOFTWARE ,SW_CPU_CLOCK ) ||evsel__match (evsel,SOFTWARE ,SW_TASK_CLOCK );
tools/perf/util/stat-shadow.c +269 -265
636 lines not on this page · raw message
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Namhyung Kim
maintainerRe: [PATCH v1 50/51] perf stat: Use counts rather than saved_value
Quoted 15 lines · Ian Rogers
Switch the hard coded metrics to use the aggregate value rather than from
saved_value. When computing a metric like IPC the aggregate count comes from instructions then cycles is looked up and if present IPC computed. Rather than lookup from thesaved_valuerbtree, search the counter's evlist for the desired counter.A new helper
evsel__stat_typeis used to both quickly find a metric function and to identify when a counter is the one being sought. So that both total and miss counts can be sought, thestat_typeenum is expanded. The ratio functions are rewritten to share a common helper with the ratios being directly passed rather than computed from an enum value.Signed-off-by Ian Rogers <[email protected]>---
[SNIP]
Quoted 14 lines
tools/perf/util/stat-shadow.c +4
-9-static double runtime_stat_avg (enum stat_type type,int aggr_idx, -struct runtime_stat_data *rsd) +static double find_stat (const struct evsel *evsel,int aggr_idx,enum stat_type type) { -struct saved_value *v; - - v =saved_value_lookup (NULL , aggr_idx, false, type, rsd->ctx, rsd->cgrp); -if (!v) -return 0.0 ; - -return avg_stats (&v->stats); +const struct evsel *cur; +int evsel_ctx =evsel_context (evsel); +
tools/perf/util/stat-shadow.c void perf_stat__update_shadow_stats(struct evsel *counter, u64 count, · line 365
Quoted 10 lines
tools/perf/util/stat-shadow.c +10
-0+evlist__for_each_entry (evsel->evlist, cur) { +struct perf_stat_aggr *aggr; + +/* Ignore the evsel that is being searched from. */ +if (evsel == cur) +continue ; + +/* Ignore evsels that are part of different groups. */ +if (evsel->core.leader->nr_members && + evsel->core.leader != cur->core.leader)
The evsel->nr_members is somewhat confusing in that it counts itself as a member. I'm not sure it resets the nr_members to 0 for standalone events. You'd better checking nr_members greater than 1 for group events.
Thanks,
Namhyung
Quoted 18 lines
tools/perf/util/stat-shadow.c +17
-0+continue ; +/* Ignore evsels with mismatched modifiers. */ +if (evsel_ctx !=evsel_context (cur)) +continue ; +/* Ignore if not the cgroup we're looking for. */ +if (evsel->cgrp != cur->cgrp) +continue ; +/* Ignore if not the stat we're looking for. */ +if (type !=evsel__stat_type (cur)) +continue ; + + aggr = &cur->stats->aggr[aggr_idx]; +if (type ==STAT_NSECS ) +return aggr->counts.val; +return aggr->counts.val * cur->scale; + } +return 0.0 ; }
Ian Rogers
reviewerRe: [PATCH v1 50/51] perf stat: Use counts rather than saved_value
Quoted 39 lines · Namhyung Kim
Quoted 15 lines · Ian Rogers
Switch the hard coded metrics to use the aggregate value rather than from
saved_value. When computing a metric like IPC the aggregate count comes from instructions then cycles is looked up and if present IPC computed. Rather than lookup from thesaved_valuerbtree, search the counter's evlist for the desired counter.A new helper
evsel__stat_typeis used to both quickly find a metric function and to identify when a counter is the one being sought. So that both total and miss counts can be sought, thestat_typeenum is expanded. The ratio functions are rewritten to share a common helper with the ratios being directly passed rather than computed from an enum value.Signed-off-by Ian Rogers <[email protected]>---
[SNIP]
Quoted 21 lines
tools/perf/util/stat-shadow.c +11
-9-static double runtime_stat_avg (enum stat_type type,int aggr_idx, -struct runtime_stat_data *rsd) +static double find_stat (const struct evsel *evsel,int aggr_idx,enum stat_type type) { -struct saved_value *v; - - v =saved_value_lookup (NULL , aggr_idx, false, type, rsd->ctx, rsd->cgrp); -if (!v) -return 0.0 ; - -return avg_stats (&v->stats); +const struct evsel *cur; +int evsel_ctx =evsel_context (evsel); + +evlist__for_each_entry (evsel->evlist, cur) { +struct perf_stat_aggr *aggr; + +/* Ignore the evsel that is being searched from. */ +if (evsel == cur) +continue ; +
Quoted 8 lines
tools/perf/util/stat-shadow.c void perf_stat__update_shadow_stats(struct evsel *counter, u64 count, · line 365
Quoted 3 lines
tools/perf/util/stat-shadow.c +3
-0+/* Ignore evsels that are part of different groups. */ +if (evsel->core.leader->nr_members && + evsel->core.leader != cur->core.leader)The
evsel->nr_membersis somewhat confusing in that it counts itself as a member. I'm not sure it resets thenr_membersto 0 for standalone events. You'd better checkingnr_membersgreater than 1 for group events.
Agreed. The code is correct as the nr_members is only set when the group is closed by the call to parse_events_set_leader, standalone events don't close a group and so have nr_members of 0, but I agree that's confusing.
I'm actually looking at a related bug where telling metrics not to group events breaks the topdown events that must be grouped with slots.
One thing that bugs me is the libperf evsel idx variable. When an evsel is added to an evlist the idx is that number of elements in the evlist. However, we reorganize the list in parse-events and so the idx is just a hopefully unique value in the list. In places in parse events we use the idx for computing the length of the evlist by subtracting the last idx from the first and adding 1. Removing the idx isn't straightforward though as later on it is used for mmaps.
Thanks,
Ian
Quoted 22 lines
Thanks,
NamhyungQuoted 18 lines
tools/perf/util/stat-shadow.c +17
-0+continue ; +/* Ignore evsels with mismatched modifiers. */ +if (evsel_ctx !=evsel_context (cur)) +continue ; +/* Ignore if not the cgroup we're looking for. */ +if (evsel->cgrp != cur->cgrp) +continue ; +/* Ignore if not the stat we're looking for. */ +if (type !=evsel__stat_type (cur)) +continue ; + + aggr = &cur->stats->aggr[aggr_idx]; +if (type ==STAT_NSECS ) +return aggr->counts.val; +return aggr->counts.val * cur->scale; + } +return 0.0 ; }
Ian Rogers
reviewerPATCH 51/51 perf stat: Remove saved_value/runtime_stat
In reply to Ian RogersAs saved_value/runtime_stat are only written to and not read, remove the associated logic and writes.
--- tools/perf/builtin-script.c | 5 - tools/perf/builtin-stat.c | 6 - tools/perf/tests/parse-metric.c | 1 - tools/perf/tests/pmu-events.c | 1 - tools/perf/util/stat-shadow.c | 198 -------------------------------- tools/perf/util/stat.c | 24 ---- tools/perf/util/stat.h | 4 - 7 files changed, 239 deletions(-)
tools/perf/builtin-script.c +0 -5
@@ -2072,9 +2072,6 @@ static void perf_sample__fprint_metric(struct perf_script *script,if (evsel_script (leader)->gnum++ ==0 )perf_stat__reset_shadow_stats (); val = sample->period * evsel->scale; -perf_stat__update_shadow_stats (evsel, - val, - sample->cpu);evsel_script (evsel)->val = val;if (evsel_script (leader)->gnum == leader->core.nr_members) { for_each_group_member (ev2, leader) {
@@ -2792,8 +2789,6 @@ static int __cmd_script(struct perf_script *script)signal (SIGINT , sig_handler); -perf_stat__init_shadow_stats (); -/* override event processing functions */ if (script->show_task_events) { script->tool.comm = process_comm_event;
tools/perf/builtin-stat.c +0 -6
@@ -424,7 +424,6 @@ static void process_counters(void)perf_stat_merge_counters (&stat_config, evsel_list);perf_stat_process_percore (&stat_config, evsel_list); -perf_stat_process_shadow_stats (&stat_config, evsel_list); }static void process_interval (void )
@@ -434,7 +433,6 @@ static void process_interval(void)clock_gettime (CLOCK_MONOTONIC , &ts);diff_timespec (&rs, &ts, &ref_time); -perf_stat__reset_shadow_per_stat ();evlist__reset_aggr_stats (evsel_list);if (read_counters (&rs) ==0 )
@@ -910,7 +908,6 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)evlist__copy_prev_raw_counts (evsel_list);evlist__reset_prev_raw_counts (evsel_list);evlist__reset_aggr_stats (evsel_list); -perf_stat__reset_shadow_per_stat (); }else {update_stats (&walltime_nsecs_stats, t1 - t0);update_rusage_stats (&ru_stats, &stat_config.ru_data);
@@ -2132,8 +2129,6 @@ static int __cmd_report(int argc, const char **argv) input_name ="perf.data" ; } -perf_stat__init_shadow_stats (); - perf_stat.data.path = input_name; perf_stat.data.mode =PERF_DATA_MODE_READ ;
@@ -2413,7 +2408,6 @@ int cmd_stat(int argc, const char **argv) &stat_config.metric_events);zfree (&metrics); } -perf_stat__init_shadow_stats ();if (add_default_attributes ()) goto out;
tools/perf/tests/parse-metric.c +0 -1
@@ -296,7 +296,6 @@ static int test_metric_group(void)static int test__parse_metric (struct test_suite *test__maybe_unused ,int subtest__maybe_unused ) { -perf_stat__init_shadow_stats ();TEST_ASSERT_VAL ("IPC failed" ,test_ipc () ==0 );TEST_ASSERT_VAL ("frontend failed" ,test_frontend () ==0 );TEST_ASSERT_VAL ("DCache_L2 failed" ,test_dcache_l2 () ==0 );
tools/perf/tests/pmu-events.c +0 -1
@@ -905,7 +905,6 @@ static int test__parsing(struct test_suite *test __maybe_unused, {int failures =0 ; -perf_stat__init_shadow_stats ();pmu_for_each_core_metric (test__parsing_callback, &failures);pmu_for_each_sys_metric (test__parsing_callback, &failures);
tools/perf/util/stat-shadow.c +0 -198
225 lines not on this page · raw message
tools/perf/util/stat.c +0 -24
@@ -648,30 +648,6 @@ void perf_stat_process_percore(struct perf_stat_config *config, struct evlist *eevsel__process_percore (evsel); } -static void evsel__update_shadow_stats (struct evsel *evsel) -{ -struct perf_stat_evsel *ps = evsel->stats; -int aggr_idx; - -if (ps->aggr ==NULL ) -return ; - -for (aggr_idx =0 ; aggr_idx < ps->nr_aggr; aggr_idx++) { -struct perf_counts_values *aggr_counts = &ps->aggr[aggr_idx].counts; - -perf_stat__update_shadow_stats (evsel, aggr_counts->val, aggr_idx); - } -} - -void perf_stat_process_shadow_stats (struct perf_stat_config *config__maybe_unused , -struct evlist *evlist) -{ -struct evsel *evsel; - -evlist__for_each_entry (evlist, evsel) -evsel__update_shadow_stats (evsel); -} -int perf_event__process_stat_event (struct perf_session *session,union perf_event *event) {
tools/perf/util/stat.h +0 -4
@@ -157,10 +157,7 @@ typedef void (*print_metric_t)(struct perf_stat_config *config, const char *fmt, double val);typedef void (*new_line_t )(struct perf_stat_config *config,void *ctx); -void perf_stat__init_shadow_stats (void );void perf_stat__reset_shadow_stats (void ); -void perf_stat__reset_shadow_per_stat (void ); -void perf_stat__update_shadow_stats (struct evsel *counter,u64 count,int aggr_idx);struct perf_stat_output_ctx {void *ctx;print_metric_t print_metric;
@@ -189,7 +186,6 @@ int perf_stat_process_counter(struct perf_stat_config *config, struct evsel *counter);void perf_stat_merge_counters (struct perf_stat_config *config,struct evlist *evlist);void perf_stat_process_percore (struct perf_stat_config *config,struct evlist *evlist); -void perf_stat_process_shadow_stats (struct perf_stat_config *config,struct evlist *evlist);struct perf_tool ;union perf_event ;
Signature · 1 line
2.39.2.637.g21b0678d19-goog
Arnaldo Carvalho de Melo
maintainerEm Sun, Feb 19, 2023 at 01:27:57AM -0800, Ian Rogers escreveu:
Quoted 25 lines
Recently the shadow stat metrics broke due to repeated aggregation and a quick fix was applied:
https://lore.kernel.org/lkml/[email protected]/
This is the longer fix but one that comes with some extras. To avoid fixing issues for hard coded metrics, the topdown, SMI cost and transaction flags are moved into json metrics. A side effect of this is that TopdownL1 metrics will now be displayed when supported, if no "perf stat" events are specified.Another fix included here is for event grouping as raised in:
https://lore.kernel.org/lkml/CA+icZUU_ew7pzWJJZLbj1xsU6MQTPrj8tkFfDhNdTDRQfGUBMQ@mail.gmail.com/
Metrics are now tagged with NMI and SMT flags, meaning that the events shouldn't be grouped if the NMI watchdog is enabled or SMT is enabled.Given the two issues, the metrics are re-generated and the patches also include the latest Intel vendor events. The changes to the metric generation code can be seen in:
https://github.com/intel/perfmon/pull/56Hard coded metrics support thresholds, the patches add this ability to json metrics so that the hard coded metrics can be removed. Migrate remaining hard coded metrics to looking up counters from the evlist/aggregation count. Finally, get rid of the
saved_valuelogic and thereby look to fix the aggregation issues.
Quoted 3 lines
Some related fix ups and code clean ups are included in the changes, in particular to aid with the code's readability and to keep topdown documentation in sync.
That is great work but won't have a reasonable time sitting on linux-next to make it into 6.3.
I have just applied it locally for the usual set of tests, that I'll report back here.
- Arnaldo
Quoted 184 lines
Ian Rogers (51):
perf tools: Ensure evsel name is initialized
perf metrics: Improve variable names
perf pmu-events: Removeaggr_modefrompmu_event
perf pmu-events: Changeaggr_modeto be an enum
perf pmu-events: Change deprecated to be a bool
perf pmu-events: Change perpkg to be a bool
perf expr: Make the online topology accessible globally perf pmu-events: Make themetric_constraintan enum perf pmu-events: Don't '\0' terminate enum values
perf vendor events intel: Refresh alderlake events perf vendor events intel: Refresh alderlake-n metrics perf vendor events intel: Refresh broadwell metrics perf vendor events intel: Refresh broadwellde metrics perf vendor events intel: Refresh broadwellx metrics perf vendor events intel: Refresh cascadelakex events perf vendor events intel: Add graniterapids events perf vendor events intel: Refresh haswell metrics
perf vendor events intel: Refresh haswellx metrics perf vendor events intel: Refresh icelake events
perf vendor events intel: Refresh icelakex metrics perf vendor events intel: Refresh ivybridge metrics perf vendor events intel: Refresh ivytown metrics
perf vendor events intel: Refresh jaketown events
perf vendor events intel: Refresh knightslanding events perf vendor events intel: Refresh sandybridge events perf vendor events intel: Refresh sapphirerapids events perf vendor events intel: Refresh silvermont events perf vendor events intel: Refresh skylake events
perf vendor events intel: Refresh skylakex metrics perf vendor events intel: Refresh tigerlake events perf vendor events intel: Refresh westmereep-dp events perf jevents: Add rand support to metrics
perf jevent: Parse metric thresholds
perf pmu-events: Test parsing metric thresholds with the fake PMU perf list: Support for printing metric thresholds
perf metric: Compute and print threshold values
perf expr: More explicit NAN handling
perf metric: Add --metric-no-threshold option
perf stat: Add TopdownL1 metric as a default if present perf stat: Implement --topdown using json metrics
perf stat: Remove topdown event special handling
perf doc: Refresh topdown documentation
perf stat: Remove hard coded transaction events
perf stat: Use metrics for --smi-cost
perf stat: Removeperf_stat_evsel_id
perf stat: Move enums from header
perf stat: Hideruntime_stat
perf stat: Addcpu_aggr_mapfor loop
perf metric: Directly use counts rather thansaved_valueperf stat: Use counts rather thansaved_value
perf stat: Remove saved_value/runtime_stattools/perf/Documentation/perf-stat.txt | 27 +- tools/perf/Documentation/topdown.txt | 70 +- tools/perf/arch/powerpc/util/header.c | 2 +- tools/perf/arch/x86/util/evlist.c | 6 +- tools/perf/arch/x86/util/topdown.c | 78 +- tools/perf/arch/x86/util/topdown.h | 1 - tools/perf/builtin-list.c | 13 +- tools/perf/builtin-script.c | 9 +- tools/perf/builtin-stat.c | 233 +- .../arch/x86/alderlake/adl-metrics.json | 3190 ++++++++++------- .../pmu-events/arch/x86/alderlake/cache.json | 36 +- .../arch/x86/alderlake/floating-point.json | 27 + .../arch/x86/alderlake/frontend.json | 9 + .../pmu-events/arch/x86/alderlake/memory.json | 3 +- .../arch/x86/alderlake/pipeline.json | 14 +- .../arch/x86/alderlake/uncore-other.json | 28 +- .../arch/x86/alderlaken/adln-metrics.json | 811 +++-- .../arch/x86/broadwell/bdw-metrics.json | 1439 ++++---- .../arch/x86/broadwellde/bdwde-metrics.json | 1405 ++++---- .../arch/x86/broadwellx/bdx-metrics.json | 1626 +++++---- .../arch/x86/broadwellx/uncore-cache.json | 74 +- .../x86/broadwellx/uncore-interconnect.json | 64 +- .../arch/x86/broadwellx/uncore-other.json | 4 +- .../arch/x86/cascadelakex/cache.json | 24 +- .../arch/x86/cascadelakex/clx-metrics.json | 2198 ++++++------ .../arch/x86/cascadelakex/frontend.json | 8 +- .../arch/x86/cascadelakex/pipeline.json | 16 + .../arch/x86/cascadelakex/uncore-memory.json | 18 +- .../arch/x86/cascadelakex/uncore-other.json | 120 +- .../arch/x86/cascadelakex/uncore-power.json | 8 +- .../arch/x86/graniterapids/cache.json | 54 + .../arch/x86/graniterapids/frontend.json | 10 + .../arch/x86/graniterapids/memory.json | 174 + .../arch/x86/graniterapids/other.json | 29 + .../arch/x86/graniterapids/pipeline.json | 102 + .../x86/graniterapids/virtual-memory.json | 26 + .../arch/x86/haswell/hsw-metrics.json | 1220 ++++--- .../arch/x86/haswellx/hsx-metrics.json | 1397 ++++---- .../pmu-events/arch/x86/icelake/cache.json | 16 + .../arch/x86/icelake/floating-point.json | 31 + .../arch/x86/icelake/icl-metrics.json | 1932 +++++----- .../pmu-events/arch/x86/icelake/pipeline.json | 23 +- .../arch/x86/icelake/uncore-other.json | 56 + .../arch/x86/icelakex/icx-metrics.json | 2153 +++++------ .../arch/x86/icelakex/uncore-memory.json | 2 +- .../arch/x86/icelakex/uncore-other.json | 4 +- .../arch/x86/ivybridge/ivb-metrics.json | 1270 ++++--- .../arch/x86/ivytown/ivt-metrics.json | 1311 ++++--- .../pmu-events/arch/x86/jaketown/cache.json | 6 +- .../arch/x86/jaketown/floating-point.json | 2 +- .../arch/x86/jaketown/frontend.json | 12 +- .../arch/x86/jaketown/jkt-metrics.json | 602 ++-- .../arch/x86/jaketown/pipeline.json | 2 +- .../arch/x86/jaketown/uncore-cache.json | 22 +- .../x86/jaketown/uncore-interconnect.json | 74 +- .../arch/x86/jaketown/uncore-memory.json | 4 +- .../arch/x86/jaketown/uncore-other.json | 22 +- .../arch/x86/jaketown/uncore-power.json | 8 +- .../arch/x86/knightslanding/cache.json | 94 +- .../arch/x86/knightslanding/pipeline.json | 8 +- .../arch/x86/knightslanding/uncore-other.json | 8 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 29 +- .../arch/x86/sandybridge/cache.json | 8 +- .../arch/x86/sandybridge/floating-point.json | 2 +- .../arch/x86/sandybridge/frontend.json | 12 +- .../arch/x86/sandybridge/pipeline.json | 2 +- .../arch/x86/sandybridge/snb-metrics.json | 601 ++-- .../arch/x86/sapphirerapids/cache.json | 24 +- .../x86/sapphirerapids/floating-point.json | 32 + .../arch/x86/sapphirerapids/frontend.json | 8 + .../arch/x86/sapphirerapids/pipeline.json | 19 +- .../arch/x86/sapphirerapids/spr-metrics.json | 2283 ++++++------ .../arch/x86/sapphirerapids/uncore-other.json | 60 + .../arch/x86/silvermont/frontend.json | 2 +- .../arch/x86/silvermont/pipeline.json | 2 +- .../pmu-events/arch/x86/skylake/cache.json | 25 +- .../pmu-events/arch/x86/skylake/frontend.json | 8 +- .../pmu-events/arch/x86/skylake/other.json | 1 + .../pmu-events/arch/x86/skylake/pipeline.json | 16 + .../arch/x86/skylake/skl-metrics.json | 1877 ++++++---- .../arch/x86/skylake/uncore-other.json | 1 + .../pmu-events/arch/x86/skylakex/cache.json | 8 +- .../arch/x86/skylakex/frontend.json | 8 +- .../arch/x86/skylakex/pipeline.json | 16 + .../arch/x86/skylakex/skx-metrics.json | 2097 +++++------ .../arch/x86/skylakex/uncore-memory.json | 2 +- .../arch/x86/skylakex/uncore-other.json | 96 +- .../arch/x86/skylakex/uncore-power.json | 6 +- .../arch/x86/tigerlake/floating-point.json | 31 + .../arch/x86/tigerlake/pipeline.json | 18 + .../arch/x86/tigerlake/tgl-metrics.json | 1942 +++++----- .../arch/x86/tigerlake/uncore-other.json | 28 +- .../arch/x86/westmereep-dp/cache.json | 2 +- .../x86/westmereep-dp/virtual-memory.json | 2 +- tools/perf/pmu-events/jevents.py | 58 +- tools/perf/pmu-events/metric.py | 8 +- tools/perf/pmu-events/pmu-events.h | 35 +- tools/perf/tests/expand-cgroup.c | 3 +- tools/perf/tests/expr.c | 7 +- tools/perf/tests/parse-metric.c | 21 +- tools/perf/tests/pmu-events.c | 49 +- tools/perf/util/cpumap.h | 3 + tools/perf/util/cputopo.c | 14 + tools/perf/util/cputopo.h | 5 + tools/perf/util/evsel.h | 2 +- tools/perf/util/expr.c | 16 +- tools/perf/util/expr.y | 12 +- tools/perf/util/metricgroup.c | 178 +- tools/perf/util/metricgroup.h | 5 +- tools/perf/util/pmu.c | 17 +- tools/perf/util/print-events.h | 1 + tools/perf/util/smt.c | 11 +- tools/perf/util/smt.h | 12 +- tools/perf/util/stat-display.c | 117 +- tools/perf/util/stat-shadow.c | 1287 ++----- tools/perf/util/stat.c | 74 - tools/perf/util/stat.h | 96 +- tools/perf/util/synthetic-events.c | 2 +- tools/perf/util/topdown.c | 68 +- tools/perf/util/topdown.h | 11 +- 120 files changed, 18025 insertions(+), 15590 deletions(-) create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/cache.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/frontend.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/memory.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/other.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/pipeline.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/virtual-memory.jsonSignature · 1 line
2.39.2.637.g21b0678d19-goog
Signature · 1 line
- Arnaldo
Ian Rogers
reviewerQuoted 31 lines · Arnaldo Carvalho de Melo
Em Sun, Feb 19, 2023 at 01:27:57AM -0800, Ian Rogers escreveu:
Quoted 25 lines
Recently the shadow stat metrics broke due to repeated aggregation and a quick fix was applied:
https://lore.kernel.org/lkml/[email protected]/
This is the longer fix but one that comes with some extras. To avoid fixing issues for hard coded metrics, the topdown, SMI cost and transaction flags are moved into json metrics. A side effect of this is that TopdownL1 metrics will now be displayed when supported, if no "perf stat" events are specified.Another fix included here is for event grouping as raised in:
https://lore.kernel.org/lkml/CA+icZUU_ew7pzWJJZLbj1xsU6MQTPrj8tkFfDhNdTDRQfGUBMQ@mail.gmail.com/
Metrics are now tagged with NMI and SMT flags, meaning that the events shouldn't be grouped if the NMI watchdog is enabled or SMT is enabled.Given the two issues, the metrics are re-generated and the patches also include the latest Intel vendor events. The changes to the metric generation code can be seen in:
https://github.com/intel/perfmon/pull/56Hard coded metrics support thresholds, the patches add this ability to json metrics so that the hard coded metrics can be removed. Migrate remaining hard coded metrics to looking up counters from the evlist/aggregation count. Finally, get rid of the
saved_valuelogic and thereby look to fix the aggregation issues.Quoted 3 lines
Some related fix ups and code clean ups are included in the changes, in particular to aid with the code's readability and to keep topdown documentation in sync.
Quoted 5 lines
That is great work but won't have a reasonable time sitting on linux-next to make it into 6.3.
I have just applied it locally for the usual set of tests, that I'll report back here.
Ugh. I'm guessing it won't be useful if I point out more things broken with the current workaround, like metrics with --repeat :-/
Thanks,
Ian
Quoted 190 lines
- Arnaldo
Quoted 181 lines
Ian Rogers (51):
perf tools: Ensure evsel name is initialized
perf metrics: Improve variable names
perf pmu-events: Removeaggr_modefrompmu_event
perf pmu-events: Changeaggr_modeto be an enum
perf pmu-events: Change deprecated to be a bool
perf pmu-events: Change perpkg to be a bool
perf expr: Make the online topology accessible globally perf pmu-events: Make themetric_constraintan enum perf pmu-events: Don't '\0' terminate enum values
perf vendor events intel: Refresh alderlake events perf vendor events intel: Refresh alderlake-n metrics perf vendor events intel: Refresh broadwell metrics perf vendor events intel: Refresh broadwellde metrics perf vendor events intel: Refresh broadwellx metrics perf vendor events intel: Refresh cascadelakex events perf vendor events intel: Add graniterapids events perf vendor events intel: Refresh haswell metrics
perf vendor events intel: Refresh haswellx metrics perf vendor events intel: Refresh icelake events
perf vendor events intel: Refresh icelakex metrics perf vendor events intel: Refresh ivybridge metrics perf vendor events intel: Refresh ivytown metrics
perf vendor events intel: Refresh jaketown events
perf vendor events intel: Refresh knightslanding events perf vendor events intel: Refresh sandybridge events perf vendor events intel: Refresh sapphirerapids events perf vendor events intel: Refresh silvermont events perf vendor events intel: Refresh skylake events
perf vendor events intel: Refresh skylakex metrics perf vendor events intel: Refresh tigerlake events perf vendor events intel: Refresh westmereep-dp events perf jevents: Add rand support to metrics
perf jevent: Parse metric thresholds
perf pmu-events: Test parsing metric thresholds with the fake PMU perf list: Support for printing metric thresholds
perf metric: Compute and print threshold values
perf expr: More explicit NAN handling
perf metric: Add --metric-no-threshold option
perf stat: Add TopdownL1 metric as a default if present perf stat: Implement --topdown using json metrics
perf stat: Remove topdown event special handling
perf doc: Refresh topdown documentation
perf stat: Remove hard coded transaction events
perf stat: Use metrics for --smi-cost
perf stat: Removeperf_stat_evsel_id
perf stat: Move enums from header
perf stat: Hideruntime_stat
perf stat: Addcpu_aggr_mapfor loop
perf metric: Directly use counts rather thansaved_valueperf stat: Use counts rather thansaved_value
perf stat: Remove saved_value/runtime_stattools/perf/Documentation/perf-stat.txt | 27 +- tools/perf/Documentation/topdown.txt | 70 +- tools/perf/arch/powerpc/util/header.c | 2 +- tools/perf/arch/x86/util/evlist.c | 6 +- tools/perf/arch/x86/util/topdown.c | 78 +- tools/perf/arch/x86/util/topdown.h | 1 - tools/perf/builtin-list.c | 13 +- tools/perf/builtin-script.c | 9 +- tools/perf/builtin-stat.c | 233 +- .../arch/x86/alderlake/adl-metrics.json | 3190 ++++++++++------- .../pmu-events/arch/x86/alderlake/cache.json | 36 +- .../arch/x86/alderlake/floating-point.json | 27 + .../arch/x86/alderlake/frontend.json | 9 + .../pmu-events/arch/x86/alderlake/memory.json | 3 +- .../arch/x86/alderlake/pipeline.json | 14 +- .../arch/x86/alderlake/uncore-other.json | 28 +- .../arch/x86/alderlaken/adln-metrics.json | 811 +++-- .../arch/x86/broadwell/bdw-metrics.json | 1439 ++++---- .../arch/x86/broadwellde/bdwde-metrics.json | 1405 ++++---- .../arch/x86/broadwellx/bdx-metrics.json | 1626 +++++---- .../arch/x86/broadwellx/uncore-cache.json | 74 +- .../x86/broadwellx/uncore-interconnect.json | 64 +- .../arch/x86/broadwellx/uncore-other.json | 4 +- .../arch/x86/cascadelakex/cache.json | 24 +- .../arch/x86/cascadelakex/clx-metrics.json | 2198 ++++++------ .../arch/x86/cascadelakex/frontend.json | 8 +- .../arch/x86/cascadelakex/pipeline.json | 16 + .../arch/x86/cascadelakex/uncore-memory.json | 18 +- .../arch/x86/cascadelakex/uncore-other.json | 120 +- .../arch/x86/cascadelakex/uncore-power.json | 8 +- .../arch/x86/graniterapids/cache.json | 54 + .../arch/x86/graniterapids/frontend.json | 10 + .../arch/x86/graniterapids/memory.json | 174 + .../arch/x86/graniterapids/other.json | 29 + .../arch/x86/graniterapids/pipeline.json | 102 + .../x86/graniterapids/virtual-memory.json | 26 + .../arch/x86/haswell/hsw-metrics.json | 1220 ++++--- .../arch/x86/haswellx/hsx-metrics.json | 1397 ++++---- .../pmu-events/arch/x86/icelake/cache.json | 16 + .../arch/x86/icelake/floating-point.json | 31 + .../arch/x86/icelake/icl-metrics.json | 1932 +++++----- .../pmu-events/arch/x86/icelake/pipeline.json | 23 +- .../arch/x86/icelake/uncore-other.json | 56 + .../arch/x86/icelakex/icx-metrics.json | 2153 +++++------ .../arch/x86/icelakex/uncore-memory.json | 2 +- .../arch/x86/icelakex/uncore-other.json | 4 +- .../arch/x86/ivybridge/ivb-metrics.json | 1270 ++++--- .../arch/x86/ivytown/ivt-metrics.json | 1311 ++++--- .../pmu-events/arch/x86/jaketown/cache.json | 6 +- .../arch/x86/jaketown/floating-point.json | 2 +- .../arch/x86/jaketown/frontend.json | 12 +- .../arch/x86/jaketown/jkt-metrics.json | 602 ++-- .../arch/x86/jaketown/pipeline.json | 2 +- .../arch/x86/jaketown/uncore-cache.json | 22 +- .../x86/jaketown/uncore-interconnect.json | 74 +- .../arch/x86/jaketown/uncore-memory.json | 4 +- .../arch/x86/jaketown/uncore-other.json | 22 +- .../arch/x86/jaketown/uncore-power.json | 8 +- .../arch/x86/knightslanding/cache.json | 94 +- .../arch/x86/knightslanding/pipeline.json | 8 +- .../arch/x86/knightslanding/uncore-other.json | 8 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 29 +- .../arch/x86/sandybridge/cache.json | 8 +- .../arch/x86/sandybridge/floating-point.json | 2 +- .../arch/x86/sandybridge/frontend.json | 12 +- .../arch/x86/sandybridge/pipeline.json | 2 +- .../arch/x86/sandybridge/snb-metrics.json | 601 ++-- .../arch/x86/sapphirerapids/cache.json | 24 +- .../x86/sapphirerapids/floating-point.json | 32 + .../arch/x86/sapphirerapids/frontend.json | 8 + .../arch/x86/sapphirerapids/pipeline.json | 19 +- .../arch/x86/sapphirerapids/spr-metrics.json | 2283 ++++++------ .../arch/x86/sapphirerapids/uncore-other.json | 60 + .../arch/x86/silvermont/frontend.json | 2 +- .../arch/x86/silvermont/pipeline.json | 2 +- .../pmu-events/arch/x86/skylake/cache.json | 25 +- .../pmu-events/arch/x86/skylake/frontend.json | 8 +- .../pmu-events/arch/x86/skylake/other.json | 1 + .../pmu-events/arch/x86/skylake/pipeline.json | 16 + .../arch/x86/skylake/skl-metrics.json | 1877 ++++++---- .../arch/x86/skylake/uncore-other.json | 1 + .../pmu-events/arch/x86/skylakex/cache.json | 8 +- .../arch/x86/skylakex/frontend.json | 8 +- .../arch/x86/skylakex/pipeline.json | 16 + .../arch/x86/skylakex/skx-metrics.json | 2097 +++++------ .../arch/x86/skylakex/uncore-memory.json | 2 +- .../arch/x86/skylakex/uncore-other.json | 96 +- .../arch/x86/skylakex/uncore-power.json | 6 +- .../arch/x86/tigerlake/floating-point.json | 31 + .../arch/x86/tigerlake/pipeline.json | 18 + .../arch/x86/tigerlake/tgl-metrics.json | 1942 +++++----- .../arch/x86/tigerlake/uncore-other.json | 28 +- .../arch/x86/westmereep-dp/cache.json | 2 +- .../x86/westmereep-dp/virtual-memory.json | 2 +- tools/perf/pmu-events/jevents.py | 58 +- tools/perf/pmu-events/metric.py | 8 +- tools/perf/pmu-events/pmu-events.h | 35 +- tools/perf/tests/expand-cgroup.c | 3 +- tools/perf/tests/expr.c | 7 +- tools/perf/tests/parse-metric.c | 21 +- tools/perf/tests/pmu-events.c | 49 +- tools/perf/util/cpumap.h | 3 + tools/perf/util/cputopo.c | 14 + tools/perf/util/cputopo.h | 5 + tools/perf/util/evsel.h | 2 +- tools/perf/util/expr.c | 16 +- tools/perf/util/expr.y | 12 +- tools/perf/util/metricgroup.c | 178 +- tools/perf/util/metricgroup.h | 5 +- tools/perf/util/pmu.c | 17 +- tools/perf/util/print-events.h | 1 + tools/perf/util/smt.c | 11 +- tools/perf/util/smt.h | 12 +- tools/perf/util/stat-display.c | 117 +- tools/perf/util/stat-shadow.c | 1287 ++----- tools/perf/util/stat.c | 74 - tools/perf/util/stat.h | 96 +- tools/perf/util/synthetic-events.c | 2 +- tools/perf/util/topdown.c | 68 +- tools/perf/util/topdown.h | 11 +- 120 files changed, 18025 insertions(+), 15590 deletions(-) create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/cache.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/frontend.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/memory.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/other.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/pipeline.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/virtual-memory.jsonQuoted 3 lines
--
2.39.2.637.g21b0678d19-goog--
- Arnaldo
Ian Rogers
reviewerQuoted 40 lines · Ian Rogers
Quoted 31 lines · Arnaldo Carvalho de Melo
Em Sun, Feb 19, 2023 at 01:27:57AM -0800, Ian Rogers escreveu:
Quoted 25 lines
Recently the shadow stat metrics broke due to repeated aggregation and a quick fix was applied:
https://lore.kernel.org/lkml/[email protected]/
This is the longer fix but one that comes with some extras. To avoid fixing issues for hard coded metrics, the topdown, SMI cost and transaction flags are moved into json metrics. A side effect of this is that TopdownL1 metrics will now be displayed when supported, if no "perf stat" events are specified.Another fix included here is for event grouping as raised in:
https://lore.kernel.org/lkml/CA+icZUU_ew7pzWJJZLbj1xsU6MQTPrj8tkFfDhNdTDRQfGUBMQ@mail.gmail.com/
Metrics are now tagged with NMI and SMT flags, meaning that the events shouldn't be grouped if the NMI watchdog is enabled or SMT is enabled.Given the two issues, the metrics are re-generated and the patches also include the latest Intel vendor events. The changes to the metric generation code can be seen in:
https://github.com/intel/perfmon/pull/56Hard coded metrics support thresholds, the patches add this ability to json metrics so that the hard coded metrics can be removed. Migrate remaining hard coded metrics to looking up counters from the evlist/aggregation count. Finally, get rid of the
saved_valuelogic and thereby look to fix the aggregation issues.Quoted 3 lines
Some related fix ups and code clean ups are included in the changes, in particular to aid with the code's readability and to keep topdown documentation in sync.
Quoted 5 lines
That is great work but won't have a reasonable time sitting on linux-next to make it into 6.3.
I have just applied it locally for the usual set of tests, that I'll report back here.
Quoted 5 lines
Ugh. I'm guessing it won't be useful if I point out more things broken with the current workaround, like metrics with --repeat :-/
Thanks,
Ian
So currently the flow of patches is:
1) initially testing - acme tmp.perf/core
2) things staged for next release - acme perf/core (perhaps this should be called perf-next)
3) linux wide next release testing - linux-next
4) release - linus/master
I wonder if there should be a perf-next-next branch to work around the "sitting time" problem. Otherwise anybody who touches code in these 51 patches will create a merge conflict. Given the aggregation issues we're likely to see changes in this code and so conflicts are likely to happen.
The patch flow with perf-next-next would be:
1) initial testing - tmp.perf-next-next
2) things acquiring sitting time and where developers work - perf-next-next
3) things staged for the next release - perf-next
4) as 3 above
5) as 4 above
With linux-next picking up acme perf/core (aka perf-next) daily it isn't clear whether we should work off of perf-core or linux-next as they are so in sync. This process means we've lost a sitting place for developer patches and we're going to feel the pain in terms of merge conflicts on the list, difficulty building off of the latest work without cherry-picking from the list, etc.
Thanks,
Ian
Quoted 190 lines
Quoted 190 lines
- Arnaldo
Quoted 181 lines
Ian Rogers (51):
perf tools: Ensure evsel name is initialized
perf metrics: Improve variable names
perf pmu-events: Removeaggr_modefrompmu_event
perf pmu-events: Changeaggr_modeto be an enum
perf pmu-events: Change deprecated to be a bool
perf pmu-events: Change perpkg to be a bool
perf expr: Make the online topology accessible globally perf pmu-events: Make themetric_constraintan enum perf pmu-events: Don't '\0' terminate enum values
perf vendor events intel: Refresh alderlake events perf vendor events intel: Refresh alderlake-n metrics perf vendor events intel: Refresh broadwell metrics perf vendor events intel: Refresh broadwellde metrics perf vendor events intel: Refresh broadwellx metrics perf vendor events intel: Refresh cascadelakex events perf vendor events intel: Add graniterapids events perf vendor events intel: Refresh haswell metrics
perf vendor events intel: Refresh haswellx metrics perf vendor events intel: Refresh icelake events
perf vendor events intel: Refresh icelakex metrics perf vendor events intel: Refresh ivybridge metrics perf vendor events intel: Refresh ivytown metrics
perf vendor events intel: Refresh jaketown events
perf vendor events intel: Refresh knightslanding events perf vendor events intel: Refresh sandybridge events perf vendor events intel: Refresh sapphirerapids events perf vendor events intel: Refresh silvermont events perf vendor events intel: Refresh skylake events
perf vendor events intel: Refresh skylakex metrics perf vendor events intel: Refresh tigerlake events perf vendor events intel: Refresh westmereep-dp events perf jevents: Add rand support to metrics
perf jevent: Parse metric thresholds
perf pmu-events: Test parsing metric thresholds with the fake PMU perf list: Support for printing metric thresholds
perf metric: Compute and print threshold values
perf expr: More explicit NAN handling
perf metric: Add --metric-no-threshold option
perf stat: Add TopdownL1 metric as a default if present perf stat: Implement --topdown using json metrics
perf stat: Remove topdown event special handling
perf doc: Refresh topdown documentation
perf stat: Remove hard coded transaction events
perf stat: Use metrics for --smi-cost
perf stat: Removeperf_stat_evsel_id
perf stat: Move enums from header
perf stat: Hideruntime_stat
perf stat: Addcpu_aggr_mapfor loop
perf metric: Directly use counts rather thansaved_valueperf stat: Use counts rather thansaved_value
perf stat: Remove saved_value/runtime_stattools/perf/Documentation/perf-stat.txt | 27 +- tools/perf/Documentation/topdown.txt | 70 +- tools/perf/arch/powerpc/util/header.c | 2 +- tools/perf/arch/x86/util/evlist.c | 6 +- tools/perf/arch/x86/util/topdown.c | 78 +- tools/perf/arch/x86/util/topdown.h | 1 - tools/perf/builtin-list.c | 13 +- tools/perf/builtin-script.c | 9 +- tools/perf/builtin-stat.c | 233 +- .../arch/x86/alderlake/adl-metrics.json | 3190 ++++++++++------- .../pmu-events/arch/x86/alderlake/cache.json | 36 +- .../arch/x86/alderlake/floating-point.json | 27 + .../arch/x86/alderlake/frontend.json | 9 + .../pmu-events/arch/x86/alderlake/memory.json | 3 +- .../arch/x86/alderlake/pipeline.json | 14 +- .../arch/x86/alderlake/uncore-other.json | 28 +- .../arch/x86/alderlaken/adln-metrics.json | 811 +++-- .../arch/x86/broadwell/bdw-metrics.json | 1439 ++++---- .../arch/x86/broadwellde/bdwde-metrics.json | 1405 ++++---- .../arch/x86/broadwellx/bdx-metrics.json | 1626 +++++---- .../arch/x86/broadwellx/uncore-cache.json | 74 +- .../x86/broadwellx/uncore-interconnect.json | 64 +- .../arch/x86/broadwellx/uncore-other.json | 4 +- .../arch/x86/cascadelakex/cache.json | 24 +- .../arch/x86/cascadelakex/clx-metrics.json | 2198 ++++++------ .../arch/x86/cascadelakex/frontend.json | 8 +- .../arch/x86/cascadelakex/pipeline.json | 16 + .../arch/x86/cascadelakex/uncore-memory.json | 18 +- .../arch/x86/cascadelakex/uncore-other.json | 120 +- .../arch/x86/cascadelakex/uncore-power.json | 8 +- .../arch/x86/graniterapids/cache.json | 54 + .../arch/x86/graniterapids/frontend.json | 10 + .../arch/x86/graniterapids/memory.json | 174 + .../arch/x86/graniterapids/other.json | 29 + .../arch/x86/graniterapids/pipeline.json | 102 + .../x86/graniterapids/virtual-memory.json | 26 + .../arch/x86/haswell/hsw-metrics.json | 1220 ++++--- .../arch/x86/haswellx/hsx-metrics.json | 1397 ++++---- .../pmu-events/arch/x86/icelake/cache.json | 16 + .../arch/x86/icelake/floating-point.json | 31 + .../arch/x86/icelake/icl-metrics.json | 1932 +++++----- .../pmu-events/arch/x86/icelake/pipeline.json | 23 +- .../arch/x86/icelake/uncore-other.json | 56 + .../arch/x86/icelakex/icx-metrics.json | 2153 +++++------ .../arch/x86/icelakex/uncore-memory.json | 2 +- .../arch/x86/icelakex/uncore-other.json | 4 +- .../arch/x86/ivybridge/ivb-metrics.json | 1270 ++++--- .../arch/x86/ivytown/ivt-metrics.json | 1311 ++++--- .../pmu-events/arch/x86/jaketown/cache.json | 6 +- .../arch/x86/jaketown/floating-point.json | 2 +- .../arch/x86/jaketown/frontend.json | 12 +- .../arch/x86/jaketown/jkt-metrics.json | 602 ++-- .../arch/x86/jaketown/pipeline.json | 2 +- .../arch/x86/jaketown/uncore-cache.json | 22 +- .../x86/jaketown/uncore-interconnect.json | 74 +- .../arch/x86/jaketown/uncore-memory.json | 4 +- .../arch/x86/jaketown/uncore-other.json | 22 +- .../arch/x86/jaketown/uncore-power.json | 8 +- .../arch/x86/knightslanding/cache.json | 94 +- .../arch/x86/knightslanding/pipeline.json | 8 +- .../arch/x86/knightslanding/uncore-other.json | 8 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 29 +- .../arch/x86/sandybridge/cache.json | 8 +- .../arch/x86/sandybridge/floating-point.json | 2 +- .../arch/x86/sandybridge/frontend.json | 12 +- .../arch/x86/sandybridge/pipeline.json | 2 +- .../arch/x86/sandybridge/snb-metrics.json | 601 ++-- .../arch/x86/sapphirerapids/cache.json | 24 +- .../x86/sapphirerapids/floating-point.json | 32 + .../arch/x86/sapphirerapids/frontend.json | 8 + .../arch/x86/sapphirerapids/pipeline.json | 19 +- .../arch/x86/sapphirerapids/spr-metrics.json | 2283 ++++++------ .../arch/x86/sapphirerapids/uncore-other.json | 60 + .../arch/x86/silvermont/frontend.json | 2 +- .../arch/x86/silvermont/pipeline.json | 2 +- .../pmu-events/arch/x86/skylake/cache.json | 25 +- .../pmu-events/arch/x86/skylake/frontend.json | 8 +- .../pmu-events/arch/x86/skylake/other.json | 1 + .../pmu-events/arch/x86/skylake/pipeline.json | 16 + .../arch/x86/skylake/skl-metrics.json | 1877 ++++++---- .../arch/x86/skylake/uncore-other.json | 1 + .../pmu-events/arch/x86/skylakex/cache.json | 8 +- .../arch/x86/skylakex/frontend.json | 8 +- .../arch/x86/skylakex/pipeline.json | 16 + .../arch/x86/skylakex/skx-metrics.json | 2097 +++++------ .../arch/x86/skylakex/uncore-memory.json | 2 +- .../arch/x86/skylakex/uncore-other.json | 96 +- .../arch/x86/skylakex/uncore-power.json | 6 +- .../arch/x86/tigerlake/floating-point.json | 31 + .../arch/x86/tigerlake/pipeline.json | 18 + .../arch/x86/tigerlake/tgl-metrics.json | 1942 +++++----- .../arch/x86/tigerlake/uncore-other.json | 28 +- .../arch/x86/westmereep-dp/cache.json | 2 +- .../x86/westmereep-dp/virtual-memory.json | 2 +- tools/perf/pmu-events/jevents.py | 58 +- tools/perf/pmu-events/metric.py | 8 +- tools/perf/pmu-events/pmu-events.h | 35 +- tools/perf/tests/expand-cgroup.c | 3 +- tools/perf/tests/expr.c | 7 +- tools/perf/tests/parse-metric.c | 21 +- tools/perf/tests/pmu-events.c | 49 +- tools/perf/util/cpumap.h | 3 + tools/perf/util/cputopo.c | 14 + tools/perf/util/cputopo.h | 5 + tools/perf/util/evsel.h | 2 +- tools/perf/util/expr.c | 16 +- tools/perf/util/expr.y | 12 +- tools/perf/util/metricgroup.c | 178 +- tools/perf/util/metricgroup.h | 5 +- tools/perf/util/pmu.c | 17 +- tools/perf/util/print-events.h | 1 + tools/perf/util/smt.c | 11 +- tools/perf/util/smt.h | 12 +- tools/perf/util/stat-display.c | 117 +- tools/perf/util/stat-shadow.c | 1287 ++----- tools/perf/util/stat.c | 74 - tools/perf/util/stat.h | 96 +- tools/perf/util/synthetic-events.c | 2 +- tools/perf/util/topdown.c | 68 +- tools/perf/util/topdown.h | 11 +- 120 files changed, 18025 insertions(+), 15590 deletions(-) create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/cache.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/frontend.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/memory.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/other.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/pipeline.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/virtual-memory.jsonQuoted 3 lines
--
2.39.2.637.g21b0678d19-goog--
- Arnaldo
Arnaldo Carvalho de Melo
maintainerEm Tue, Feb 21, 2023 at 09:44:36AM -0800, Ian Rogers escreveu:
Quoted 44 lines · Ian Rogers
Quoted 43 lines · Arnaldo Carvalho de Melo
Quoted 31 lines
Em Sun, Feb 19, 2023 at 01:27:57AM -0800, Ian Rogers escreveu:
Quoted 25 lines
Recently the shadow stat metrics broke due to repeated aggregation and a quick fix was applied:
https://lore.kernel.org/lkml/[email protected]/
This is the longer fix but one that comes with some extras. To avoid fixing issues for hard coded metrics, the topdown, SMI cost and transaction flags are moved into json metrics. A side effect of this is that TopdownL1 metrics will now be displayed when supported, if no "perf stat" events are specified.Another fix included here is for event grouping as raised in:
https://lore.kernel.org/lkml/CA+icZUU_ew7pzWJJZLbj1xsU6MQTPrj8tkFfDhNdTDRQfGUBMQ@mail.gmail.com/
Metrics are now tagged with NMI and SMT flags, meaning that the events shouldn't be grouped if the NMI watchdog is enabled or SMT is enabled.Given the two issues, the metrics are re-generated and the patches also include the latest Intel vendor events. The changes to the metric generation code can be seen in:
https://github.com/intel/perfmon/pull/56Hard coded metrics support thresholds, the patches add this ability to json metrics so that the hard coded metrics can be removed. Migrate remaining hard coded metrics to looking up counters from the evlist/aggregation count. Finally, get rid of the
saved_valuelogic and thereby look to fix the aggregation issues.Quoted 3 lines
Some related fix ups and code clean ups are included in the changes, in particular to aid with the code's readability and to keep topdown documentation in sync.
Quoted 5 lines
That is great work but won't have a reasonable time sitting on linux-next to make it into 6.3.
I have just applied it locally for the usual set of tests, that I'll report back here.
Ugh. I'm guessing it won't be useful if I point out more things broken with the current workaround, like metrics with --repeat :-/
Quoted 8 lines
Quoted 2 lines
Thanks,
IanSo currently the flow of patches is:
1) initially testing - acme tmp.perf/core
2) things staged for next release - acme perf/core (perhaps this should be called perf-next)
Yeah, perf-tools-next probably.
Quoted 17 lines
3) linux wide next release testing - linux-next
4) release - linus/masterI wonder if there should be a perf-next-next branch to work around the "sitting time" problem. Otherwise anybody who touches code in these 51 patches will create a merge conflict. Given the aggregation issues we're likely to see changes in this code and so conflicts are likely to happen.
The patch flow with perf-next-next would be:
1) initial testing - tmp.perf-next-next
2) things acquiring sitting time and where developers work - perf-next-next
3) things staged for the next release - perf-next
4) as 3 above
5) as 4 above
Quoted 6 lines
With linux-next picking up acme perf/core (aka perf-next) daily it isn't clear whether we should work off of perf-core or linux-next as they are so in sync. This process means we've lost a sitting place for developer patches and we're going to feel the pain in terms of merge conflicts on the list, difficulty building off of the latest work without cherry-picking from the list, etc.
I'll send perf/core to Linus today and then your 51 patches will appear on perf-tools-next, where we'll do what was done before in perf/core (remained like that for historical reasons).
I'll make perf/urgent become 'perf-tools', and when the merge window closes, we turn 'perf-tools-next' into 'perf-tools',
- Arnaldo
Quoted 193 lines
Thanks,
IanQuoted 190 lines
Quoted 190 lines
- Arnaldo
Quoted 181 lines
Ian Rogers (51):
perf tools: Ensure evsel name is initialized
perf metrics: Improve variable names
perf pmu-events: Removeaggr_modefrompmu_event
perf pmu-events: Changeaggr_modeto be an enum
perf pmu-events: Change deprecated to be a bool
perf pmu-events: Change perpkg to be a bool
perf expr: Make the online topology accessible globally perf pmu-events: Make themetric_constraintan enum perf pmu-events: Don't '\0' terminate enum values
perf vendor events intel: Refresh alderlake events perf vendor events intel: Refresh alderlake-n metrics perf vendor events intel: Refresh broadwell metrics perf vendor events intel: Refresh broadwellde metrics perf vendor events intel: Refresh broadwellx metrics perf vendor events intel: Refresh cascadelakex events perf vendor events intel: Add graniterapids events perf vendor events intel: Refresh haswell metrics
perf vendor events intel: Refresh haswellx metrics perf vendor events intel: Refresh icelake events
perf vendor events intel: Refresh icelakex metrics perf vendor events intel: Refresh ivybridge metrics perf vendor events intel: Refresh ivytown metrics
perf vendor events intel: Refresh jaketown events
perf vendor events intel: Refresh knightslanding events perf vendor events intel: Refresh sandybridge events perf vendor events intel: Refresh sapphirerapids events perf vendor events intel: Refresh silvermont events perf vendor events intel: Refresh skylake events
perf vendor events intel: Refresh skylakex metrics perf vendor events intel: Refresh tigerlake events perf vendor events intel: Refresh westmereep-dp events perf jevents: Add rand support to metrics
perf jevent: Parse metric thresholds
perf pmu-events: Test parsing metric thresholds with the fake PMU perf list: Support for printing metric thresholds
perf metric: Compute and print threshold values
perf expr: More explicit NAN handling
perf metric: Add --metric-no-threshold option
perf stat: Add TopdownL1 metric as a default if present perf stat: Implement --topdown using json metrics
perf stat: Remove topdown event special handling
perf doc: Refresh topdown documentation
perf stat: Remove hard coded transaction events
perf stat: Use metrics for --smi-cost
perf stat: Removeperf_stat_evsel_id
perf stat: Move enums from header
perf stat: Hideruntime_stat
perf stat: Addcpu_aggr_mapfor loop
perf metric: Directly use counts rather thansaved_valueperf stat: Use counts rather thansaved_value
perf stat: Remove saved_value/runtime_stattools/perf/Documentation/perf-stat.txt | 27 +- tools/perf/Documentation/topdown.txt | 70 +- tools/perf/arch/powerpc/util/header.c | 2 +- tools/perf/arch/x86/util/evlist.c | 6 +- tools/perf/arch/x86/util/topdown.c | 78 +- tools/perf/arch/x86/util/topdown.h | 1 - tools/perf/builtin-list.c | 13 +- tools/perf/builtin-script.c | 9 +- tools/perf/builtin-stat.c | 233 +- .../arch/x86/alderlake/adl-metrics.json | 3190 ++++++++++------- .../pmu-events/arch/x86/alderlake/cache.json | 36 +- .../arch/x86/alderlake/floating-point.json | 27 + .../arch/x86/alderlake/frontend.json | 9 + .../pmu-events/arch/x86/alderlake/memory.json | 3 +- .../arch/x86/alderlake/pipeline.json | 14 +- .../arch/x86/alderlake/uncore-other.json | 28 +- .../arch/x86/alderlaken/adln-metrics.json | 811 +++-- .../arch/x86/broadwell/bdw-metrics.json | 1439 ++++---- .../arch/x86/broadwellde/bdwde-metrics.json | 1405 ++++---- .../arch/x86/broadwellx/bdx-metrics.json | 1626 +++++---- .../arch/x86/broadwellx/uncore-cache.json | 74 +- .../x86/broadwellx/uncore-interconnect.json | 64 +- .../arch/x86/broadwellx/uncore-other.json | 4 +- .../arch/x86/cascadelakex/cache.json | 24 +- .../arch/x86/cascadelakex/clx-metrics.json | 2198 ++++++------ .../arch/x86/cascadelakex/frontend.json | 8 +- .../arch/x86/cascadelakex/pipeline.json | 16 + .../arch/x86/cascadelakex/uncore-memory.json | 18 +- .../arch/x86/cascadelakex/uncore-other.json | 120 +- .../arch/x86/cascadelakex/uncore-power.json | 8 +- .../arch/x86/graniterapids/cache.json | 54 + .../arch/x86/graniterapids/frontend.json | 10 + .../arch/x86/graniterapids/memory.json | 174 + .../arch/x86/graniterapids/other.json | 29 + .../arch/x86/graniterapids/pipeline.json | 102 + .../x86/graniterapids/virtual-memory.json | 26 + .../arch/x86/haswell/hsw-metrics.json | 1220 ++++--- .../arch/x86/haswellx/hsx-metrics.json | 1397 ++++---- .../pmu-events/arch/x86/icelake/cache.json | 16 + .../arch/x86/icelake/floating-point.json | 31 + .../arch/x86/icelake/icl-metrics.json | 1932 +++++----- .../pmu-events/arch/x86/icelake/pipeline.json | 23 +- .../arch/x86/icelake/uncore-other.json | 56 + .../arch/x86/icelakex/icx-metrics.json | 2153 +++++------ .../arch/x86/icelakex/uncore-memory.json | 2 +- .../arch/x86/icelakex/uncore-other.json | 4 +- .../arch/x86/ivybridge/ivb-metrics.json | 1270 ++++--- .../arch/x86/ivytown/ivt-metrics.json | 1311 ++++--- .../pmu-events/arch/x86/jaketown/cache.json | 6 +- .../arch/x86/jaketown/floating-point.json | 2 +- .../arch/x86/jaketown/frontend.json | 12 +- .../arch/x86/jaketown/jkt-metrics.json | 602 ++-- .../arch/x86/jaketown/pipeline.json | 2 +- .../arch/x86/jaketown/uncore-cache.json | 22 +- .../x86/jaketown/uncore-interconnect.json | 74 +- .../arch/x86/jaketown/uncore-memory.json | 4 +- .../arch/x86/jaketown/uncore-other.json | 22 +- .../arch/x86/jaketown/uncore-power.json | 8 +- .../arch/x86/knightslanding/cache.json | 94 +- .../arch/x86/knightslanding/pipeline.json | 8 +- .../arch/x86/knightslanding/uncore-other.json | 8 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 29 +- .../arch/x86/sandybridge/cache.json | 8 +- .../arch/x86/sandybridge/floating-point.json | 2 +- .../arch/x86/sandybridge/frontend.json | 12 +- .../arch/x86/sandybridge/pipeline.json | 2 +- .../arch/x86/sandybridge/snb-metrics.json | 601 ++-- .../arch/x86/sapphirerapids/cache.json | 24 +- .../x86/sapphirerapids/floating-point.json | 32 + .../arch/x86/sapphirerapids/frontend.json | 8 + .../arch/x86/sapphirerapids/pipeline.json | 19 +- .../arch/x86/sapphirerapids/spr-metrics.json | 2283 ++++++------ .../arch/x86/sapphirerapids/uncore-other.json | 60 + .../arch/x86/silvermont/frontend.json | 2 +- .../arch/x86/silvermont/pipeline.json | 2 +- .../pmu-events/arch/x86/skylake/cache.json | 25 +- .../pmu-events/arch/x86/skylake/frontend.json | 8 +- .../pmu-events/arch/x86/skylake/other.json | 1 + .../pmu-events/arch/x86/skylake/pipeline.json | 16 + .../arch/x86/skylake/skl-metrics.json | 1877 ++++++---- .../arch/x86/skylake/uncore-other.json | 1 + .../pmu-events/arch/x86/skylakex/cache.json | 8 +- .../arch/x86/skylakex/frontend.json | 8 +- .../arch/x86/skylakex/pipeline.json | 16 + .../arch/x86/skylakex/skx-metrics.json | 2097 +++++------ .../arch/x86/skylakex/uncore-memory.json | 2 +- .../arch/x86/skylakex/uncore-other.json | 96 +- .../arch/x86/skylakex/uncore-power.json | 6 +- .../arch/x86/tigerlake/floating-point.json | 31 + .../arch/x86/tigerlake/pipeline.json | 18 + .../arch/x86/tigerlake/tgl-metrics.json | 1942 +++++----- .../arch/x86/tigerlake/uncore-other.json | 28 +- .../arch/x86/westmereep-dp/cache.json | 2 +- .../x86/westmereep-dp/virtual-memory.json | 2 +- tools/perf/pmu-events/jevents.py | 58 +- tools/perf/pmu-events/metric.py | 8 +- tools/perf/pmu-events/pmu-events.h | 35 +- tools/perf/tests/expand-cgroup.c | 3 +- tools/perf/tests/expr.c | 7 +- tools/perf/tests/parse-metric.c | 21 +- tools/perf/tests/pmu-events.c | 49 +- tools/perf/util/cpumap.h | 3 + tools/perf/util/cputopo.c | 14 + tools/perf/util/cputopo.h | 5 + tools/perf/util/evsel.h | 2 +- tools/perf/util/expr.c | 16 +- tools/perf/util/expr.y | 12 +- tools/perf/util/metricgroup.c | 178 +- tools/perf/util/metricgroup.h | 5 +- tools/perf/util/pmu.c | 17 +- tools/perf/util/print-events.h | 1 + tools/perf/util/smt.c | 11 +- tools/perf/util/smt.h | 12 +- tools/perf/util/stat-display.c | 117 +- tools/perf/util/stat-shadow.c | 1287 ++----- tools/perf/util/stat.c | 74 - tools/perf/util/stat.h | 96 +- tools/perf/util/synthetic-events.c | 2 +- tools/perf/util/topdown.c | 68 +- tools/perf/util/topdown.h | 11 +- 120 files changed, 18025 insertions(+), 15590 deletions(-) create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/cache.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/frontend.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/memory.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/other.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/pipeline.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/virtual-memory.jsonQuoted 3 lines
--
2.39.2.637.g21b0678d19-goog--
- Arnaldo
Signature · 1 line
- Arnaldo
Quoted 25 lines · Ian Rogers
Recently the shadow stat metrics broke due to repeated aggregation and a quick fix was applied:
https://lore.kernel.org/lkml/[email protected]/
This is the longer fix but one that comes with some extras. To avoid fixing issues for hard coded metrics, the topdown, SMI cost and transaction flags are moved into json metrics. A side effect of this is that TopdownL1 metrics will now be displayed when supported, if no "perf stat" events are specified.Another fix included here is for event grouping as raised in:
https://lore.kernel.org/lkml/CA+icZUU_ew7pzWJJZLbj1xsU6MQTPrj8tkFfDhNdTDRQfGUBMQ@mail.gmail.com/
Metrics are now tagged with NMI and SMT flags, meaning that the events shouldn't be grouped if the NMI watchdog is enabled or SMT is enabled.Given the two issues, the metrics are re-generated and the patches also include the latest Intel vendor events. The changes to the metric generation code can be seen in:
https://github.com/intel/perfmon/pull/56Hard coded metrics support thresholds, the patches add this ability to json metrics so that the hard coded metrics can be removed. Migrate remaining hard coded metrics to looking up counters from the evlist/aggregation count. Finally, get rid of the
saved_valuelogic and thereby look to fix the aggregation issues.
Quoted 5 lines
Some related fix ups and code clean ups are included in the changes, in particular to aid with the code's readability and to keep topdown documentation in sync.
Ian Rogers (51):
Thanks Ian for the clean up and improvements. The patches 1-38 looks good to me.
I like the idea of utilizing the json metrics. But the changes for the later patches seem change the current user-visible behavior for some cases.
Thanks,
Kan
Quoted 180 lines
perf tools: Ensure evsel name is initialized
perf metrics: Improve variable names
perf pmu-events: Removeaggr_modefrompmu_event
perf pmu-events: Changeaggr_modeto be an enum
perf pmu-events: Change deprecated to be a bool
perf pmu-events: Change perpkg to be a bool
perf expr: Make the online topology accessible globally perf pmu-events: Make themetric_constraintan enum perf pmu-events: Don't '\0' terminate enum values
perf vendor events intel: Refresh alderlake events perf vendor events intel: Refresh alderlake-n metrics perf vendor events intel: Refresh broadwell metrics perf vendor events intel: Refresh broadwellde metrics perf vendor events intel: Refresh broadwellx metrics perf vendor events intel: Refresh cascadelakex events perf vendor events intel: Add graniterapids events perf vendor events intel: Refresh haswell metrics
perf vendor events intel: Refresh haswellx metrics perf vendor events intel: Refresh icelake events
perf vendor events intel: Refresh icelakex metrics perf vendor events intel: Refresh ivybridge metrics perf vendor events intel: Refresh ivytown metrics
perf vendor events intel: Refresh jaketown events
perf vendor events intel: Refresh knightslanding events perf vendor events intel: Refresh sandybridge events perf vendor events intel: Refresh sapphirerapids events perf vendor events intel: Refresh silvermont events perf vendor events intel: Refresh skylake events
perf vendor events intel: Refresh skylakex metrics perf vendor events intel: Refresh tigerlake events perf vendor events intel: Refresh westmereep-dp events perf jevents: Add rand support to metrics
perf jevent: Parse metric thresholds
perf pmu-events: Test parsing metric thresholds with the fake PMU perf list: Support for printing metric thresholds
perf metric: Compute and print threshold values
perf expr: More explicit NAN handling
perf metric: Add --metric-no-threshold option
perf stat: Add TopdownL1 metric as a default if present perf stat: Implement --topdown using json metrics
perf stat: Remove topdown event special handling
perf doc: Refresh topdown documentation
perf stat: Remove hard coded transaction events
perf stat: Use metrics for --smi-cost
perf stat: Removeperf_stat_evsel_id
perf stat: Move enums from header
perf stat: Hideruntime_stat
perf stat: Addcpu_aggr_mapfor loop
perf metric: Directly use counts rather thansaved_valueperf stat: Use counts rather thansaved_value
perf stat: Remove saved_value/runtime_stattools/perf/Documentation/perf-stat.txt | 27 +- tools/perf/Documentation/topdown.txt | 70 +- tools/perf/arch/powerpc/util/header.c | 2 +- tools/perf/arch/x86/util/evlist.c | 6 +- tools/perf/arch/x86/util/topdown.c | 78 +- tools/perf/arch/x86/util/topdown.h | 1 - tools/perf/builtin-list.c | 13 +- tools/perf/builtin-script.c | 9 +- tools/perf/builtin-stat.c | 233 +- .../arch/x86/alderlake/adl-metrics.json | 3190 ++++++++++------- .../pmu-events/arch/x86/alderlake/cache.json | 36 +- .../arch/x86/alderlake/floating-point.json | 27 + .../arch/x86/alderlake/frontend.json | 9 + .../pmu-events/arch/x86/alderlake/memory.json | 3 +- .../arch/x86/alderlake/pipeline.json | 14 +- .../arch/x86/alderlake/uncore-other.json | 28 +- .../arch/x86/alderlaken/adln-metrics.json | 811 +++-- .../arch/x86/broadwell/bdw-metrics.json | 1439 ++++---- .../arch/x86/broadwellde/bdwde-metrics.json | 1405 ++++---- .../arch/x86/broadwellx/bdx-metrics.json | 1626 +++++---- .../arch/x86/broadwellx/uncore-cache.json | 74 +- .../x86/broadwellx/uncore-interconnect.json | 64 +- .../arch/x86/broadwellx/uncore-other.json | 4 +- .../arch/x86/cascadelakex/cache.json | 24 +- .../arch/x86/cascadelakex/clx-metrics.json | 2198 ++++++------ .../arch/x86/cascadelakex/frontend.json | 8 +- .../arch/x86/cascadelakex/pipeline.json | 16 + .../arch/x86/cascadelakex/uncore-memory.json | 18 +- .../arch/x86/cascadelakex/uncore-other.json | 120 +- .../arch/x86/cascadelakex/uncore-power.json | 8 +- .../arch/x86/graniterapids/cache.json | 54 + .../arch/x86/graniterapids/frontend.json | 10 + .../arch/x86/graniterapids/memory.json | 174 + .../arch/x86/graniterapids/other.json | 29 + .../arch/x86/graniterapids/pipeline.json | 102 + .../x86/graniterapids/virtual-memory.json | 26 + .../arch/x86/haswell/hsw-metrics.json | 1220 ++++--- .../arch/x86/haswellx/hsx-metrics.json | 1397 ++++---- .../pmu-events/arch/x86/icelake/cache.json | 16 + .../arch/x86/icelake/floating-point.json | 31 + .../arch/x86/icelake/icl-metrics.json | 1932 +++++----- .../pmu-events/arch/x86/icelake/pipeline.json | 23 +- .../arch/x86/icelake/uncore-other.json | 56 + .../arch/x86/icelakex/icx-metrics.json | 2153 +++++------ .../arch/x86/icelakex/uncore-memory.json | 2 +- .../arch/x86/icelakex/uncore-other.json | 4 +- .../arch/x86/ivybridge/ivb-metrics.json | 1270 ++++--- .../arch/x86/ivytown/ivt-metrics.json | 1311 ++++--- .../pmu-events/arch/x86/jaketown/cache.json | 6 +- .../arch/x86/jaketown/floating-point.json | 2 +- .../arch/x86/jaketown/frontend.json | 12 +- .../arch/x86/jaketown/jkt-metrics.json | 602 ++-- .../arch/x86/jaketown/pipeline.json | 2 +- .../arch/x86/jaketown/uncore-cache.json | 22 +- .../x86/jaketown/uncore-interconnect.json | 74 +- .../arch/x86/jaketown/uncore-memory.json | 4 +- .../arch/x86/jaketown/uncore-other.json | 22 +- .../arch/x86/jaketown/uncore-power.json | 8 +- .../arch/x86/knightslanding/cache.json | 94 +- .../arch/x86/knightslanding/pipeline.json | 8 +- .../arch/x86/knightslanding/uncore-other.json | 8 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 29 +- .../arch/x86/sandybridge/cache.json | 8 +- .../arch/x86/sandybridge/floating-point.json | 2 +- .../arch/x86/sandybridge/frontend.json | 12 +- .../arch/x86/sandybridge/pipeline.json | 2 +- .../arch/x86/sandybridge/snb-metrics.json | 601 ++-- .../arch/x86/sapphirerapids/cache.json | 24 +- .../x86/sapphirerapids/floating-point.json | 32 + .../arch/x86/sapphirerapids/frontend.json | 8 + .../arch/x86/sapphirerapids/pipeline.json | 19 +- .../arch/x86/sapphirerapids/spr-metrics.json | 2283 ++++++------ .../arch/x86/sapphirerapids/uncore-other.json | 60 + .../arch/x86/silvermont/frontend.json | 2 +- .../arch/x86/silvermont/pipeline.json | 2 +- .../pmu-events/arch/x86/skylake/cache.json | 25 +- .../pmu-events/arch/x86/skylake/frontend.json | 8 +- .../pmu-events/arch/x86/skylake/other.json | 1 + .../pmu-events/arch/x86/skylake/pipeline.json | 16 + .../arch/x86/skylake/skl-metrics.json | 1877 ++++++---- .../arch/x86/skylake/uncore-other.json | 1 + .../pmu-events/arch/x86/skylakex/cache.json | 8 +- .../arch/x86/skylakex/frontend.json | 8 +- .../arch/x86/skylakex/pipeline.json | 16 + .../arch/x86/skylakex/skx-metrics.json | 2097 +++++------ .../arch/x86/skylakex/uncore-memory.json | 2 +- .../arch/x86/skylakex/uncore-other.json | 96 +- .../arch/x86/skylakex/uncore-power.json | 6 +- .../arch/x86/tigerlake/floating-point.json | 31 + .../arch/x86/tigerlake/pipeline.json | 18 + .../arch/x86/tigerlake/tgl-metrics.json | 1942 +++++----- .../arch/x86/tigerlake/uncore-other.json | 28 +- .../arch/x86/westmereep-dp/cache.json | 2 +- .../x86/westmereep-dp/virtual-memory.json | 2 +- tools/perf/pmu-events/jevents.py | 58 +- tools/perf/pmu-events/metric.py | 8 +- tools/perf/pmu-events/pmu-events.h | 35 +- tools/perf/tests/expand-cgroup.c | 3 +- tools/perf/tests/expr.c | 7 +- tools/perf/tests/parse-metric.c | 21 +- tools/perf/tests/pmu-events.c | 49 +- tools/perf/util/cpumap.h | 3 + tools/perf/util/cputopo.c | 14 + tools/perf/util/cputopo.h | 5 + tools/perf/util/evsel.h | 2 +- tools/perf/util/expr.c | 16 +- tools/perf/util/expr.y | 12 +- tools/perf/util/metricgroup.c | 178 +- tools/perf/util/metricgroup.h | 5 +- tools/perf/util/pmu.c | 17 +- tools/perf/util/print-events.h | 1 + tools/perf/util/smt.c | 11 +- tools/perf/util/smt.h | 12 +- tools/perf/util/stat-display.c | 117 +- tools/perf/util/stat-shadow.c | 1287 ++----- tools/perf/util/stat.c | 74 - tools/perf/util/stat.h | 96 +- tools/perf/util/synthetic-events.c | 2 +- tools/perf/util/topdown.c | 68 +- tools/perf/util/topdown.h | 11 +- 120 files changed, 18025 insertions(+), 15590 deletions(-) create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/cache.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/frontend.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/memory.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/other.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/pipeline.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/virtual-memory.json
Ian Rogers
reviewerQuoted 35 lines · Kan
Quoted 25 lines · Ian Rogers
Recently the shadow stat metrics broke due to repeated aggregation and a quick fix was applied:
https://lore.kernel.org/lkml/[email protected]/
This is the longer fix but one that comes with some extras. To avoid fixing issues for hard coded metrics, the topdown, SMI cost and transaction flags are moved into json metrics. A side effect of this is that TopdownL1 metrics will now be displayed when supported, if no "perf stat" events are specified.Another fix included here is for event grouping as raised in:
https://lore.kernel.org/lkml/CA+icZUU_ew7pzWJJZLbj1xsU6MQTPrj8tkFfDhNdTDRQfGUBMQ@mail.gmail.com/
Metrics are now tagged with NMI and SMT flags, meaning that the events shouldn't be grouped if the NMI watchdog is enabled or SMT is enabled.Given the two issues, the metrics are re-generated and the patches also include the latest Intel vendor events. The changes to the metric generation code can be seen in:
https://github.com/intel/perfmon/pull/56Hard coded metrics support thresholds, the patches add this ability to json metrics so that the hard coded metrics can be removed. Migrate remaining hard coded metrics to looking up counters from the evlist/aggregation count. Finally, get rid of the
saved_valuelogic and thereby look to fix the aggregation issues.Quoted 5 lines
Some related fix ups and code clean ups are included in the changes, in particular to aid with the code's readability and to keep topdown documentation in sync.
Ian Rogers (51):
Quoted 7 lines
Thanks Ian for the clean up and improvements. The patches 1-38 looks good to me.
Reviewed-by Kan Liang<[email protected]>I like the idea of utilizing the json metrics. But the changes for the later patches seem change the current user-visible behavior for some cases.
Thanks Kan, I'll put some comments on the previous thread wrt behavior change.
Ian
Quoted 183 lines
Thanks,
KanQuoted 180 lines
perf tools: Ensure evsel name is initialized
perf metrics: Improve variable names
perf pmu-events: Removeaggr_modefrompmu_event
perf pmu-events: Changeaggr_modeto be an enum
perf pmu-events: Change deprecated to be a bool
perf pmu-events: Change perpkg to be a bool
perf expr: Make the online topology accessible globally perf pmu-events: Make themetric_constraintan enum perf pmu-events: Don't '\0' terminate enum values
perf vendor events intel: Refresh alderlake events perf vendor events intel: Refresh alderlake-n metrics perf vendor events intel: Refresh broadwell metrics perf vendor events intel: Refresh broadwellde metrics perf vendor events intel: Refresh broadwellx metrics perf vendor events intel: Refresh cascadelakex events perf vendor events intel: Add graniterapids events perf vendor events intel: Refresh haswell metrics
perf vendor events intel: Refresh haswellx metrics perf vendor events intel: Refresh icelake events
perf vendor events intel: Refresh icelakex metrics perf vendor events intel: Refresh ivybridge metrics perf vendor events intel: Refresh ivytown metrics
perf vendor events intel: Refresh jaketown events
perf vendor events intel: Refresh knightslanding events perf vendor events intel: Refresh sandybridge events perf vendor events intel: Refresh sapphirerapids events perf vendor events intel: Refresh silvermont events perf vendor events intel: Refresh skylake events
perf vendor events intel: Refresh skylakex metrics perf vendor events intel: Refresh tigerlake events perf vendor events intel: Refresh westmereep-dp events perf jevents: Add rand support to metrics
perf jevent: Parse metric thresholds
perf pmu-events: Test parsing metric thresholds with the fake PMU perf list: Support for printing metric thresholds
perf metric: Compute and print threshold values
perf expr: More explicit NAN handling
perf metric: Add --metric-no-threshold option
perf stat: Add TopdownL1 metric as a default if present perf stat: Implement --topdown using json metrics
perf stat: Remove topdown event special handling
perf doc: Refresh topdown documentation
perf stat: Remove hard coded transaction events
perf stat: Use metrics for --smi-cost
perf stat: Removeperf_stat_evsel_id
perf stat: Move enums from header
perf stat: Hideruntime_stat
perf stat: Addcpu_aggr_mapfor loop
perf metric: Directly use counts rather thansaved_valueperf stat: Use counts rather thansaved_value
perf stat: Remove saved_value/runtime_stattools/perf/Documentation/perf-stat.txt | 27 +- tools/perf/Documentation/topdown.txt | 70 +- tools/perf/arch/powerpc/util/header.c | 2 +- tools/perf/arch/x86/util/evlist.c | 6 +- tools/perf/arch/x86/util/topdown.c | 78 +- tools/perf/arch/x86/util/topdown.h | 1 - tools/perf/builtin-list.c | 13 +- tools/perf/builtin-script.c | 9 +- tools/perf/builtin-stat.c | 233 +- .../arch/x86/alderlake/adl-metrics.json | 3190 ++++++++++------- .../pmu-events/arch/x86/alderlake/cache.json | 36 +- .../arch/x86/alderlake/floating-point.json | 27 + .../arch/x86/alderlake/frontend.json | 9 + .../pmu-events/arch/x86/alderlake/memory.json | 3 +- .../arch/x86/alderlake/pipeline.json | 14 +- .../arch/x86/alderlake/uncore-other.json | 28 +- .../arch/x86/alderlaken/adln-metrics.json | 811 +++-- .../arch/x86/broadwell/bdw-metrics.json | 1439 ++++---- .../arch/x86/broadwellde/bdwde-metrics.json | 1405 ++++---- .../arch/x86/broadwellx/bdx-metrics.json | 1626 +++++---- .../arch/x86/broadwellx/uncore-cache.json | 74 +- .../x86/broadwellx/uncore-interconnect.json | 64 +- .../arch/x86/broadwellx/uncore-other.json | 4 +- .../arch/x86/cascadelakex/cache.json | 24 +- .../arch/x86/cascadelakex/clx-metrics.json | 2198 ++++++------ .../arch/x86/cascadelakex/frontend.json | 8 +- .../arch/x86/cascadelakex/pipeline.json | 16 + .../arch/x86/cascadelakex/uncore-memory.json | 18 +- .../arch/x86/cascadelakex/uncore-other.json | 120 +- .../arch/x86/cascadelakex/uncore-power.json | 8 +- .../arch/x86/graniterapids/cache.json | 54 + .../arch/x86/graniterapids/frontend.json | 10 + .../arch/x86/graniterapids/memory.json | 174 + .../arch/x86/graniterapids/other.json | 29 + .../arch/x86/graniterapids/pipeline.json | 102 + .../x86/graniterapids/virtual-memory.json | 26 + .../arch/x86/haswell/hsw-metrics.json | 1220 ++++--- .../arch/x86/haswellx/hsx-metrics.json | 1397 ++++---- .../pmu-events/arch/x86/icelake/cache.json | 16 + .../arch/x86/icelake/floating-point.json | 31 + .../arch/x86/icelake/icl-metrics.json | 1932 +++++----- .../pmu-events/arch/x86/icelake/pipeline.json | 23 +- .../arch/x86/icelake/uncore-other.json | 56 + .../arch/x86/icelakex/icx-metrics.json | 2153 +++++------ .../arch/x86/icelakex/uncore-memory.json | 2 +- .../arch/x86/icelakex/uncore-other.json | 4 +- .../arch/x86/ivybridge/ivb-metrics.json | 1270 ++++--- .../arch/x86/ivytown/ivt-metrics.json | 1311 ++++--- .../pmu-events/arch/x86/jaketown/cache.json | 6 +- .../arch/x86/jaketown/floating-point.json | 2 +- .../arch/x86/jaketown/frontend.json | 12 +- .../arch/x86/jaketown/jkt-metrics.json | 602 ++-- .../arch/x86/jaketown/pipeline.json | 2 +- .../arch/x86/jaketown/uncore-cache.json | 22 +- .../x86/jaketown/uncore-interconnect.json | 74 +- .../arch/x86/jaketown/uncore-memory.json | 4 +- .../arch/x86/jaketown/uncore-other.json | 22 +- .../arch/x86/jaketown/uncore-power.json | 8 +- .../arch/x86/knightslanding/cache.json | 94 +- .../arch/x86/knightslanding/pipeline.json | 8 +- .../arch/x86/knightslanding/uncore-other.json | 8 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 29 +- .../arch/x86/sandybridge/cache.json | 8 +- .../arch/x86/sandybridge/floating-point.json | 2 +- .../arch/x86/sandybridge/frontend.json | 12 +- .../arch/x86/sandybridge/pipeline.json | 2 +- .../arch/x86/sandybridge/snb-metrics.json | 601 ++-- .../arch/x86/sapphirerapids/cache.json | 24 +- .../x86/sapphirerapids/floating-point.json | 32 + .../arch/x86/sapphirerapids/frontend.json | 8 + .../arch/x86/sapphirerapids/pipeline.json | 19 +- .../arch/x86/sapphirerapids/spr-metrics.json | 2283 ++++++------ .../arch/x86/sapphirerapids/uncore-other.json | 60 + .../arch/x86/silvermont/frontend.json | 2 +- .../arch/x86/silvermont/pipeline.json | 2 +- .../pmu-events/arch/x86/skylake/cache.json | 25 +- .../pmu-events/arch/x86/skylake/frontend.json | 8 +- .../pmu-events/arch/x86/skylake/other.json | 1 + .../pmu-events/arch/x86/skylake/pipeline.json | 16 + .../arch/x86/skylake/skl-metrics.json | 1877 ++++++---- .../arch/x86/skylake/uncore-other.json | 1 + .../pmu-events/arch/x86/skylakex/cache.json | 8 +- .../arch/x86/skylakex/frontend.json | 8 +- .../arch/x86/skylakex/pipeline.json | 16 + .../arch/x86/skylakex/skx-metrics.json | 2097 +++++------ .../arch/x86/skylakex/uncore-memory.json | 2 +- .../arch/x86/skylakex/uncore-other.json | 96 +- .../arch/x86/skylakex/uncore-power.json | 6 +- .../arch/x86/tigerlake/floating-point.json | 31 + .../arch/x86/tigerlake/pipeline.json | 18 + .../arch/x86/tigerlake/tgl-metrics.json | 1942 +++++----- .../arch/x86/tigerlake/uncore-other.json | 28 +- .../arch/x86/westmereep-dp/cache.json | 2 +- .../x86/westmereep-dp/virtual-memory.json | 2 +- tools/perf/pmu-events/jevents.py | 58 +- tools/perf/pmu-events/metric.py | 8 +- tools/perf/pmu-events/pmu-events.h | 35 +- tools/perf/tests/expand-cgroup.c | 3 +- tools/perf/tests/expr.c | 7 +- tools/perf/tests/parse-metric.c | 21 +- tools/perf/tests/pmu-events.c | 49 +- tools/perf/util/cpumap.h | 3 + tools/perf/util/cputopo.c | 14 + tools/perf/util/cputopo.h | 5 + tools/perf/util/evsel.h | 2 +- tools/perf/util/expr.c | 16 +- tools/perf/util/expr.y | 12 +- tools/perf/util/metricgroup.c | 178 +- tools/perf/util/metricgroup.h | 5 +- tools/perf/util/pmu.c | 17 +- tools/perf/util/print-events.h | 1 + tools/perf/util/smt.c | 11 +- tools/perf/util/smt.h | 12 +- tools/perf/util/stat-display.c | 117 +- tools/perf/util/stat-shadow.c | 1287 ++----- tools/perf/util/stat.c | 74 - tools/perf/util/stat.h | 96 +- tools/perf/util/synthetic-events.c | 2 +- tools/perf/util/topdown.c | 68 +- tools/perf/util/topdown.h | 11 +- 120 files changed, 18025 insertions(+), 15590 deletions(-) create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/cache.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/frontend.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/memory.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/other.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/pipeline.json create mode 100644 tools/perf/pmu-events/arch/x86/graniterapids/virtual-memory.json