1cf979623SAndi Kleen[
2cf979623SAndi Kleen    {
3fd550098SAndi Kleen        "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend",
461ec07f5SHaiyan Song        "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / (4 * cycles)",
5fd550098SAndi Kleen        "MetricGroup": "TopdownL1",
661ec07f5SHaiyan Song        "MetricName": "Frontend_Bound",
761ec07f5SHaiyan Song        "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-ops (uops). Ideally the Frontend can issue 4 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."
8fd550098SAndi Kleen    },
9fd550098SAndi Kleen    {
10fd550098SAndi Kleen        "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend. SMT version; use when SMT is enabled and measuring per logical CPU.",
1161ec07f5SHaiyan Song        "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))",
12fd550098SAndi Kleen        "MetricGroup": "TopdownL1_SMT",
1361ec07f5SHaiyan Song        "MetricName": "Frontend_Bound_SMT",
1461ec07f5SHaiyan Song        "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-ops (uops). Ideally the Frontend can issue 4 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. SMT version; use when SMT is enabled and measuring per logical CPU."
15fd550098SAndi Kleen    },
16fd550098SAndi Kleen    {
17fd550098SAndi Kleen        "BriefDescription": "This category represents fraction of slots wasted due to incorrect speculations",
1861ec07f5SHaiyan Song        "MetricExpr": "( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles)",
19fd550098SAndi Kleen        "MetricGroup": "TopdownL1",
2061ec07f5SHaiyan Song        "MetricName": "Bad_Speculation",
2161ec07f5SHaiyan Song        "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."
22fd550098SAndi Kleen    },
23fd550098SAndi Kleen    {
24fd550098SAndi Kleen        "BriefDescription": "This category represents fraction of slots wasted due to incorrect speculations. SMT version; use when SMT is enabled and measuring per logical CPU.",
2561ec07f5SHaiyan Song        "MetricExpr": "( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (( INT_MISC.RECOVERY_CYCLES_ANY / 2 )) ) / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))",
26fd550098SAndi Kleen        "MetricGroup": "TopdownL1_SMT",
2761ec07f5SHaiyan Song        "MetricName": "Bad_Speculation_SMT",
2861ec07f5SHaiyan Song        "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. SMT version; use when SMT is enabled and measuring per logical CPU."
29fd550098SAndi Kleen    },
30fd550098SAndi Kleen    {
31fd550098SAndi Kleen        "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",
3261ec07f5SHaiyan Song        "MetricExpr": "1 - ( (IDQ_UOPS_NOT_DELIVERED.CORE / (4 * cycles)) + (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles)) + (UOPS_RETIRED.RETIRE_SLOTS / (4 * cycles)) )",
33fd550098SAndi Kleen        "MetricGroup": "TopdownL1",
3461ec07f5SHaiyan Song        "MetricName": "Backend_Bound",
3561ec07f5SHaiyan Song        "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."
36fd550098SAndi Kleen    },
37fd550098SAndi Kleen    {
38fd550098SAndi Kleen        "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. SMT version; use when SMT is enabled and measuring per logical CPU.",
3961ec07f5SHaiyan Song        "MetricExpr": "1 - ( (IDQ_UOPS_NOT_DELIVERED.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) + (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (( INT_MISC.RECOVERY_CYCLES_ANY / 2 )) ) / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) + (UOPS_RETIRED.RETIRE_SLOTS / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) )",
40fd550098SAndi Kleen        "MetricGroup": "TopdownL1_SMT",
4161ec07f5SHaiyan Song        "MetricName": "Backend_Bound_SMT",
4261ec07f5SHaiyan Song        "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. SMT version; use when SMT is enabled and measuring per logical CPU."
43fd550098SAndi Kleen    },
44fd550098SAndi Kleen    {
45fd550098SAndi Kleen        "BriefDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired",
4661ec07f5SHaiyan Song        "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / (4 * cycles)",
47fd550098SAndi Kleen        "MetricGroup": "TopdownL1",
4861ec07f5SHaiyan Song        "MetricName": "Retiring",
4961ec07f5SHaiyan Song        "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 4 uops retired per cycle has been achieved.  Maximizing Retiring typically increases the Instruction-Per-Cycle metric. Note that a high Retiring value does not necessary mean there is no room for more performance.  For example; Microcode assists are categorized under Retiring. They hurt performance and can often be avoided. "
50fd550098SAndi Kleen    },
51fd550098SAndi Kleen    {
52fd550098SAndi Kleen        "BriefDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired. SMT version; use when SMT is enabled and measuring per logical CPU.",
5361ec07f5SHaiyan Song        "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))",
54fd550098SAndi Kleen        "MetricGroup": "TopdownL1_SMT",
5561ec07f5SHaiyan Song        "MetricName": "Retiring_SMT",
5661ec07f5SHaiyan Song        "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 4 uops retired per cycle has been achieved.  Maximizing Retiring typically increases the Instruction-Per-Cycle metric. Note that a high Retiring value does not necessary mean there is no room for more performance.  For example; Microcode assists are categorized under Retiring. They hurt performance and can often be avoided. SMT version; use when SMT is enabled and measuring per logical CPU."
57fd550098SAndi Kleen    },
58fd550098SAndi Kleen    {
5961ec07f5SHaiyan Song        "BriefDescription": "Instructions Per Cycle (per Logical Processor)",
60cf979623SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
61cf979623SAndi Kleen        "MetricGroup": "TopDownL1",
62cf979623SAndi Kleen        "MetricName": "IPC"
63cf979623SAndi Kleen    },
64cf979623SAndi Kleen    {
65fd550098SAndi Kleen        "BriefDescription": "Uops Per Instruction",
6661ec07f5SHaiyan Song        "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
6761ec07f5SHaiyan Song        "MetricGroup": "Pipeline;Retire",
68cf979623SAndi Kleen        "MetricName": "UPI"
69cf979623SAndi Kleen    },
70cf979623SAndi Kleen    {
71fd550098SAndi Kleen        "BriefDescription": "Instruction per taken branch",
7261ec07f5SHaiyan Song        "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_TAKEN",
7361ec07f5SHaiyan Song        "MetricGroup": "Branches;Fetch_BW;PGO",
74fd550098SAndi Kleen        "MetricName": "IpTB"
75fd550098SAndi Kleen    },
76fd550098SAndi Kleen    {
77fd550098SAndi Kleen        "BriefDescription": "Branch instructions per taken branch. ",
7861ec07f5SHaiyan Song        "MetricExpr": "BR_INST_RETIRED.ALL_BRANCHES / BR_INST_RETIRED.NEAR_TAKEN",
79fd550098SAndi Kleen        "MetricGroup": "Branches;PGO",
80fd550098SAndi Kleen        "MetricName": "BpTB"
81fd550098SAndi Kleen    },
82fd550098SAndi Kleen    {
83fd550098SAndi Kleen        "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely (includes speculatively fetches) consumed by program instructions",
8461ec07f5SHaiyan Song        "MetricExpr": "min( 1 , IDQ.MITE_UOPS / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 16 * ( ICACHE.HIT + ICACHE.MISSES ) / 4.0 ) )",
8561ec07f5SHaiyan Song        "MetricGroup": "PGO;IcMiss",
86cf979623SAndi Kleen        "MetricName": "IFetch_Line_Utilization"
87cf979623SAndi Kleen    },
88cf979623SAndi Kleen    {
89fd550098SAndi Kleen        "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache)",
9061ec07f5SHaiyan Song        "MetricExpr": "IDQ.DSB_UOPS / (( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS ) )",
9161ec07f5SHaiyan Song        "MetricGroup": "DSB;Fetch_BW",
92cf979623SAndi Kleen        "MetricName": "DSB_Coverage"
93cf979623SAndi Kleen    },
94cf979623SAndi Kleen    {
9561ec07f5SHaiyan Song        "BriefDescription": "Cycles Per Instruction (per Logical Processor)",
96008de6c6SAndi Kleen        "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)",
97cf979623SAndi Kleen        "MetricGroup": "Pipeline;Summary",
98cf979623SAndi Kleen        "MetricName": "CPI"
99cf979623SAndi Kleen    },
100cf979623SAndi Kleen    {
10161ec07f5SHaiyan Song        "BriefDescription": "Per-Logical Processor actual clocks when the Logical Processor is active.",
102cf979623SAndi Kleen        "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
103cf979623SAndi Kleen        "MetricGroup": "Summary",
104cf979623SAndi Kleen        "MetricName": "CLKS"
105cf979623SAndi Kleen    },
106cf979623SAndi Kleen    {
10761ec07f5SHaiyan Song        "BriefDescription": "Total issue-pipeline slots (per-Physical Core)",
108fd550098SAndi Kleen        "MetricExpr": "4 * cycles",
109cf979623SAndi Kleen        "MetricGroup": "TopDownL1",
110cf979623SAndi Kleen        "MetricName": "SLOTS"
111cf979623SAndi Kleen    },
112cf979623SAndi Kleen    {
11361ec07f5SHaiyan Song        "BriefDescription": "Total issue-pipeline slots (per-Physical Core)",
114fd550098SAndi Kleen        "MetricExpr": "4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))",
115fd550098SAndi Kleen        "MetricGroup": "TopDownL1_SMT",
116fd550098SAndi Kleen        "MetricName": "SLOTS_SMT"
117fd550098SAndi Kleen    },
118fd550098SAndi Kleen    {
11961ec07f5SHaiyan Song        "BriefDescription": "Instructions per Load (lower number means higher occurance rate)",
120fd550098SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_LOADS",
12161ec07f5SHaiyan Song        "MetricGroup": "Instruction_Type",
122fd550098SAndi Kleen        "MetricName": "IpL"
123fd550098SAndi Kleen    },
124fd550098SAndi Kleen    {
12561ec07f5SHaiyan Song        "BriefDescription": "Instructions per Store (lower number means higher occurance rate)",
126fd550098SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_STORES",
12761ec07f5SHaiyan Song        "MetricGroup": "Instruction_Type",
128fd550098SAndi Kleen        "MetricName": "IpS"
129fd550098SAndi Kleen    },
130fd550098SAndi Kleen    {
13161ec07f5SHaiyan Song        "BriefDescription": "Instructions per Branch (lower number means higher occurance rate)",
132fd550098SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.ALL_BRANCHES",
13361ec07f5SHaiyan Song        "MetricGroup": "Branches;Instruction_Type",
134fd550098SAndi Kleen        "MetricName": "IpB"
135fd550098SAndi Kleen    },
136fd550098SAndi Kleen    {
13761ec07f5SHaiyan Song        "BriefDescription": "Instruction per (near) call (lower number means higher occurance rate)",
138fd550098SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_CALL",
139fd550098SAndi Kleen        "MetricGroup": "Branches",
140fd550098SAndi Kleen        "MetricName": "IpCall"
141fd550098SAndi Kleen    },
142fd550098SAndi Kleen    {
143fd550098SAndi Kleen        "BriefDescription": "Total number of retired Instructions",
14461ec07f5SHaiyan Song        "MetricExpr": "INST_RETIRED.ANY",
145cf979623SAndi Kleen        "MetricGroup": "Summary",
146cf979623SAndi Kleen        "MetricName": "Instructions"
147cf979623SAndi Kleen    },
148cf979623SAndi Kleen    {
149cf979623SAndi Kleen        "BriefDescription": "Instructions Per Cycle (per physical core)",
15061ec07f5SHaiyan Song        "MetricExpr": "INST_RETIRED.ANY / cycles",
151cf979623SAndi Kleen        "MetricGroup": "SMT",
152cf979623SAndi Kleen        "MetricName": "CoreIPC"
153cf979623SAndi Kleen    },
154cf979623SAndi Kleen    {
155fd550098SAndi Kleen        "BriefDescription": "Instructions Per Cycle (per physical core)",
15661ec07f5SHaiyan Song        "MetricExpr": "INST_RETIRED.ANY / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))",
157fd550098SAndi Kleen        "MetricGroup": "SMT",
158fd550098SAndi Kleen        "MetricName": "CoreIPC_SMT"
159fd550098SAndi Kleen    },
160fd550098SAndi Kleen    {
161fd550098SAndi Kleen        "BriefDescription": "Floating Point Operations Per Cycle",
16261ec07f5SHaiyan Song        "MetricExpr": "(( 1 * ( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2 * FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4 * ( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8 * FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / cycles",
163fd550098SAndi Kleen        "MetricGroup": "FLOPS",
164fd550098SAndi Kleen        "MetricName": "FLOPc"
165fd550098SAndi Kleen    },
166fd550098SAndi Kleen    {
167fd550098SAndi Kleen        "BriefDescription": "Floating Point Operations Per Cycle",
16861ec07f5SHaiyan Song        "MetricExpr": "(( 1 * ( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2 * FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4 * ( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8 * FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))",
169fd550098SAndi Kleen        "MetricGroup": "FLOPS_SMT",
170fd550098SAndi Kleen        "MetricName": "FLOPc_SMT"
171fd550098SAndi Kleen    },
172fd550098SAndi Kleen    {
173fd550098SAndi Kleen        "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
17461ec07f5SHaiyan Song        "MetricExpr": "UOPS_EXECUTED.THREAD / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2 ) if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)",
17561ec07f5SHaiyan Song        "MetricGroup": "Pipeline",
176cf979623SAndi Kleen        "MetricName": "ILP"
177cf979623SAndi Kleen    },
178cf979623SAndi Kleen    {
17961ec07f5SHaiyan Song        "BriefDescription": "Branch Misprediction Cost: Fraction of TopDown slots wasted per non-speculative branch misprediction (jeclear)",
180fd550098SAndi Kleen        "MetricExpr": "( ((BR_MISP_RETIRED.ALL_BRANCHES / ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT )) * (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles))) + (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * cycles)) * (12 * ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY ) / cycles) / (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * cycles)) ) * (4 * cycles) / BR_MISP_RETIRED.ALL_BRANCHES",
18161ec07f5SHaiyan Song        "MetricGroup": "BrMispredicts",
182fd550098SAndi Kleen        "MetricName": "Branch_Misprediction_Cost"
183cf979623SAndi Kleen    },
184cf979623SAndi Kleen    {
18561ec07f5SHaiyan Song        "BriefDescription": "Branch Misprediction Cost: Fraction of TopDown slots wasted per non-speculative branch misprediction (jeclear)",
186fd550098SAndi Kleen        "MetricExpr": "( ((BR_MISP_RETIRED.ALL_BRANCHES / ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT )) * (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (( INT_MISC.RECOVERY_CYCLES_ANY / 2 )) ) / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))))) + (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) * (12 * ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY ) / cycles) / (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) ) * (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))) / BR_MISP_RETIRED.ALL_BRANCHES",
18761ec07f5SHaiyan Song        "MetricGroup": "BrMispredicts_SMT",
188fd550098SAndi Kleen        "MetricName": "Branch_Misprediction_Cost_SMT"
189fd550098SAndi Kleen    },
190fd550098SAndi Kleen    {
191fd550098SAndi Kleen        "BriefDescription": "Number of Instructions per non-speculative Branch Misprediction (JEClear)",
19261ec07f5SHaiyan Song        "MetricExpr": "INST_RETIRED.ANY / BR_MISP_RETIRED.ALL_BRANCHES",
19361ec07f5SHaiyan Song        "MetricGroup": "BrMispredicts",
194fd550098SAndi Kleen        "MetricName": "IpMispredict"
195fd550098SAndi Kleen    },
196fd550098SAndi Kleen    {
19761ec07f5SHaiyan Song        "BriefDescription": "Core actual clocks when any Logical Processor is active on the Physical Core",
198fd550098SAndi Kleen        "MetricExpr": "( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )",
199cf979623SAndi Kleen        "MetricGroup": "SMT",
200cf979623SAndi Kleen        "MetricName": "CORE_CLKS"
201cf979623SAndi Kleen    },
202cf979623SAndi Kleen    {
203fd550098SAndi Kleen        "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads (in core cycles)",
20461ec07f5SHaiyan Song        "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_UOPS_RETIRED.L1_MISS + mem_load_uops_retired.hit_lfb )",
205cf979623SAndi Kleen        "MetricGroup": "Memory_Bound;Memory_Lat",
206cf979623SAndi Kleen        "MetricName": "Load_Miss_Real_Latency"
207cf979623SAndi Kleen    },
208cf979623SAndi Kleen    {
20961ec07f5SHaiyan Song        "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss. Per-Logical Processor)",
210fd550098SAndi Kleen        "MetricExpr": "L1D_PEND_MISS.PENDING / L1D_PEND_MISS.PENDING_CYCLES",
211cf979623SAndi Kleen        "MetricGroup": "Memory_Bound;Memory_BW",
212cf979623SAndi Kleen        "MetricName": "MLP"
213cf979623SAndi Kleen    },
214cf979623SAndi Kleen    {
215cf979623SAndi Kleen        "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
21661ec07f5SHaiyan Song        "MetricExpr": "( cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\,cmask\\=1@ + 7 * ( DTLB_STORE_MISSES.WALK_COMPLETED + DTLB_LOAD_MISSES.WALK_COMPLETED + ITLB_MISSES.WALK_COMPLETED ) ) / cycles",
217cf979623SAndi Kleen        "MetricGroup": "TLB",
218cf979623SAndi Kleen        "MetricName": "Page_Walks_Utilization"
219cf979623SAndi Kleen    },
220cf979623SAndi Kleen    {
221fd550098SAndi Kleen        "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
22261ec07f5SHaiyan Song        "MetricExpr": "( cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\,cmask\\=1@ + 7 * ( DTLB_STORE_MISSES.WALK_COMPLETED + DTLB_LOAD_MISSES.WALK_COMPLETED + ITLB_MISSES.WALK_COMPLETED ) ) / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))",
223fd550098SAndi Kleen        "MetricGroup": "TLB_SMT",
224fd550098SAndi Kleen        "MetricName": "Page_Walks_Utilization_SMT"
225fd550098SAndi Kleen    },
226fd550098SAndi Kleen    {
227fd550098SAndi Kleen        "BriefDescription": "Average data fill bandwidth to the L1 data cache [GB / sec]",
22861ec07f5SHaiyan Song        "MetricExpr": "64 * L1D.REPLACEMENT / 1000000000 / duration_time",
229fd550098SAndi Kleen        "MetricGroup": "Memory_BW",
230fd550098SAndi Kleen        "MetricName": "L1D_Cache_Fill_BW"
231fd550098SAndi Kleen    },
232fd550098SAndi Kleen    {
233fd550098SAndi Kleen        "BriefDescription": "Average data fill bandwidth to the L2 cache [GB / sec]",
23461ec07f5SHaiyan Song        "MetricExpr": "64 * L2_LINES_IN.ALL / 1000000000 / duration_time",
235fd550098SAndi Kleen        "MetricGroup": "Memory_BW",
236fd550098SAndi Kleen        "MetricName": "L2_Cache_Fill_BW"
237fd550098SAndi Kleen    },
238fd550098SAndi Kleen    {
239fd550098SAndi Kleen        "BriefDescription": "Average per-core data fill bandwidth to the L3 cache [GB / sec]",
24061ec07f5SHaiyan Song        "MetricExpr": "64 * LONGEST_LAT_CACHE.MISS / 1000000000 / duration_time",
241fd550098SAndi Kleen        "MetricGroup": "Memory_BW",
242fd550098SAndi Kleen        "MetricName": "L3_Cache_Fill_BW"
243fd550098SAndi Kleen    },
244fd550098SAndi Kleen    {
245fd550098SAndi Kleen        "BriefDescription": "L1 cache true misses per kilo instruction for retired demand loads",
24661ec07f5SHaiyan Song        "MetricExpr": "1000 * MEM_LOAD_UOPS_RETIRED.L1_MISS / INST_RETIRED.ANY",
24761ec07f5SHaiyan Song        "MetricGroup": "Cache_Misses",
248fd550098SAndi Kleen        "MetricName": "L1MPKI"
249fd550098SAndi Kleen    },
250fd550098SAndi Kleen    {
251fd550098SAndi Kleen        "BriefDescription": "L2 cache true misses per kilo instruction for retired demand loads",
25261ec07f5SHaiyan Song        "MetricExpr": "1000 * MEM_LOAD_UOPS_RETIRED.L2_MISS / INST_RETIRED.ANY",
25361ec07f5SHaiyan Song        "MetricGroup": "Cache_Misses",
254fd550098SAndi Kleen        "MetricName": "L2MPKI"
255fd550098SAndi Kleen    },
256fd550098SAndi Kleen    {
257fd550098SAndi Kleen        "BriefDescription": "L2 cache misses per kilo instruction for all request types (including speculative)",
25861ec07f5SHaiyan Song        "MetricExpr": "1000 * L2_RQSTS.MISS / INST_RETIRED.ANY",
25961ec07f5SHaiyan Song        "MetricGroup": "Cache_Misses",
260fd550098SAndi Kleen        "MetricName": "L2MPKI_All"
261fd550098SAndi Kleen    },
262fd550098SAndi Kleen    {
263fd550098SAndi Kleen        "BriefDescription": "L2 cache hits per kilo instruction for all request types (including speculative)",
26461ec07f5SHaiyan Song        "MetricExpr": "1000 * ( L2_RQSTS.REFERENCES - L2_RQSTS.MISS ) / INST_RETIRED.ANY",
26561ec07f5SHaiyan Song        "MetricGroup": "Cache_Misses",
266fd550098SAndi Kleen        "MetricName": "L2HPKI_All"
267fd550098SAndi Kleen    },
268fd550098SAndi Kleen    {
269fd550098SAndi Kleen        "BriefDescription": "L3 cache true misses per kilo instruction for retired demand loads",
27061ec07f5SHaiyan Song        "MetricExpr": "1000 * MEM_LOAD_UOPS_RETIRED.L3_MISS / INST_RETIRED.ANY",
27161ec07f5SHaiyan Song        "MetricGroup": "Cache_Misses",
272fd550098SAndi Kleen        "MetricName": "L3MPKI"
273fd550098SAndi Kleen    },
274fd550098SAndi Kleen    {
275fd550098SAndi Kleen        "BriefDescription": "Average CPU Utilization",
27661ec07f5SHaiyan Song        "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
277cf979623SAndi Kleen        "MetricGroup": "Summary",
278cf979623SAndi Kleen        "MetricName": "CPU_Utilization"
279cf979623SAndi Kleen    },
280cf979623SAndi Kleen    {
281cf979623SAndi Kleen        "BriefDescription": "Giga Floating Point Operations Per Second",
28261ec07f5SHaiyan Song        "MetricExpr": "( (( 1 * ( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2 * FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4 * ( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8 * FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / 1000000000 ) / duration_time",
283cf979623SAndi Kleen        "MetricGroup": "FLOPS;Summary",
284cf979623SAndi Kleen        "MetricName": "GFLOPs"
285cf979623SAndi Kleen    },
286cf979623SAndi Kleen    {
287fd550098SAndi Kleen        "BriefDescription": "Average Frequency Utilization relative nominal frequency",
28861ec07f5SHaiyan Song        "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
289cf979623SAndi Kleen        "MetricGroup": "Power",
290cf979623SAndi Kleen        "MetricName": "Turbo_Utilization"
291cf979623SAndi Kleen    },
292cf979623SAndi Kleen    {
29361ec07f5SHaiyan Song        "BriefDescription": "Fraction of cycles where both hardware Logical Processors were active",
294cf979623SAndi Kleen        "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
295cf979623SAndi Kleen        "MetricGroup": "SMT;Summary",
296cf979623SAndi Kleen        "MetricName": "SMT_2T_Utilization"
297cf979623SAndi Kleen    },
298cf979623SAndi Kleen    {
299fd550098SAndi Kleen        "BriefDescription": "Fraction of cycles spent in Kernel mode",
30061ec07f5SHaiyan Song        "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
301cf979623SAndi Kleen        "MetricGroup": "Summary",
302cf979623SAndi Kleen        "MetricName": "Kernel_Utilization"
303cf979623SAndi Kleen    },
304cf979623SAndi Kleen    {
305fd550098SAndi Kleen        "BriefDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]",
30661ec07f5SHaiyan Song        "MetricExpr": "64 * ( arb@event\\=0x81\\,umask\\=0x1@ + arb@event\\=0x84\\,umask\\=0x1@ ) / 1000000 / duration_time / 1000",
307fd550098SAndi Kleen        "MetricGroup": "Memory_BW",
308fd550098SAndi Kleen        "MetricName": "DRAM_BW_Use"
309fd550098SAndi Kleen    },
310fd550098SAndi Kleen    {
31161ec07f5SHaiyan Song        "BriefDescription": "C3 residency percent per core",
312cf979623SAndi Kleen        "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
313cf979623SAndi Kleen        "MetricGroup": "Power",
314cf979623SAndi Kleen        "MetricName": "C3_Core_Residency"
315cf979623SAndi Kleen    },
316cf979623SAndi Kleen    {
31761ec07f5SHaiyan Song        "BriefDescription": "C6 residency percent per core",
318cf979623SAndi Kleen        "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
319cf979623SAndi Kleen        "MetricGroup": "Power",
320cf979623SAndi Kleen        "MetricName": "C6_Core_Residency"
321cf979623SAndi Kleen    },
322cf979623SAndi Kleen    {
32361ec07f5SHaiyan Song        "BriefDescription": "C7 residency percent per core",
324cf979623SAndi Kleen        "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
325cf979623SAndi Kleen        "MetricGroup": "Power",
326cf979623SAndi Kleen        "MetricName": "C7_Core_Residency"
327cf979623SAndi Kleen    },
328cf979623SAndi Kleen    {
32961ec07f5SHaiyan Song        "BriefDescription": "C2 residency percent per package",
330cf979623SAndi Kleen        "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
331cf979623SAndi Kleen        "MetricGroup": "Power",
332cf979623SAndi Kleen        "MetricName": "C2_Pkg_Residency"
333cf979623SAndi Kleen    },
334cf979623SAndi Kleen    {
33561ec07f5SHaiyan Song        "BriefDescription": "C3 residency percent per package",
336cf979623SAndi Kleen        "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
337cf979623SAndi Kleen        "MetricGroup": "Power",
338cf979623SAndi Kleen        "MetricName": "C3_Pkg_Residency"
339cf979623SAndi Kleen    },
340cf979623SAndi Kleen    {
34161ec07f5SHaiyan Song        "BriefDescription": "C6 residency percent per package",
342cf979623SAndi Kleen        "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
343cf979623SAndi Kleen        "MetricGroup": "Power",
344cf979623SAndi Kleen        "MetricName": "C6_Pkg_Residency"
345cf979623SAndi Kleen    },
346cf979623SAndi Kleen    {
34761ec07f5SHaiyan Song        "BriefDescription": "C7 residency percent per package",
348cf979623SAndi Kleen        "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
349cf979623SAndi Kleen        "MetricGroup": "Power",
350cf979623SAndi Kleen        "MetricName": "C7_Pkg_Residency"
351cf979623SAndi Kleen    }
352cf979623SAndi Kleen]
353