1ecd94f1bSKan Liang[
2ecd94f1bSKan Liang    {
3fd550098SAndi Kleen        "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / (4 * cycles)",
4fd550098SAndi Kleen        "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.",
5fd550098SAndi Kleen        "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend",
6fd550098SAndi Kleen        "MetricGroup": "TopdownL1",
7fd550098SAndi Kleen        "MetricName": "Frontend_Bound"
8fd550098SAndi Kleen    },
9fd550098SAndi Kleen    {
10fd550098SAndi Kleen        "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))",
11fd550098SAndi Kleen        "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.",
12fd550098SAndi 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.",
13fd550098SAndi Kleen        "MetricGroup": "TopdownL1_SMT",
14fd550098SAndi Kleen        "MetricName": "Frontend_Bound_SMT"
15fd550098SAndi Kleen    },
16fd550098SAndi Kleen    {
17fd550098SAndi Kleen        "MetricExpr": "( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles)",
18fd550098SAndi Kleen        "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.",
19fd550098SAndi Kleen        "BriefDescription": "This category represents fraction of slots wasted due to incorrect speculations",
20fd550098SAndi Kleen        "MetricGroup": "TopdownL1",
21fd550098SAndi Kleen        "MetricName": "Bad_Speculation"
22fd550098SAndi Kleen    },
23fd550098SAndi Kleen    {
24fd550098SAndi Kleen        "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 ) )))",
25fd550098SAndi Kleen        "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.",
26fd550098SAndi 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.",
27fd550098SAndi Kleen        "MetricGroup": "TopdownL1_SMT",
28fd550098SAndi Kleen        "MetricName": "Bad_Speculation_SMT"
29fd550098SAndi Kleen    },
30fd550098SAndi Kleen    {
31fd550098SAndi Kleen        "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)) )",
32fd550098SAndi Kleen        "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.",
33fd550098SAndi 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",
34fd550098SAndi Kleen        "MetricGroup": "TopdownL1",
35fd550098SAndi Kleen        "MetricName": "Backend_Bound"
36fd550098SAndi Kleen    },
37fd550098SAndi Kleen    {
38fd550098SAndi Kleen        "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 ) )))) )",
39fd550098SAndi Kleen        "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.",
40fd550098SAndi 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.",
41fd550098SAndi Kleen        "MetricGroup": "TopdownL1_SMT",
42fd550098SAndi Kleen        "MetricName": "Backend_Bound_SMT"
43fd550098SAndi Kleen    },
44fd550098SAndi Kleen    {
45fd550098SAndi Kleen        "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / (4 * cycles)",
46fd550098SAndi Kleen        "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. ",
47fd550098SAndi Kleen        "BriefDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired",
48fd550098SAndi Kleen        "MetricGroup": "TopdownL1",
49fd550098SAndi Kleen        "MetricName": "Retiring"
50fd550098SAndi Kleen    },
51fd550098SAndi Kleen    {
52fd550098SAndi Kleen        "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))",
53fd550098SAndi Kleen        "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.",
54fd550098SAndi 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.",
55fd550098SAndi Kleen        "MetricGroup": "TopdownL1_SMT",
56fd550098SAndi Kleen        "MetricName": "Retiring_SMT"
57fd550098SAndi Kleen    },
58fd550098SAndi Kleen    {
59ecd94f1bSKan Liang        "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
60fd550098SAndi Kleen        "BriefDescription": "Instructions Per Cycle (per logical thread)",
61ecd94f1bSKan Liang        "MetricGroup": "TopDownL1",
62ecd94f1bSKan Liang        "MetricName": "IPC"
63ecd94f1bSKan Liang    },
64ecd94f1bSKan Liang    {
65ecd94f1bSKan Liang        "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
66fd550098SAndi Kleen        "BriefDescription": "Uops Per Instruction",
67fd550098SAndi Kleen        "MetricGroup": "Pipeline;Retiring",
68ecd94f1bSKan Liang        "MetricName": "UPI"
69ecd94f1bSKan Liang    },
70ecd94f1bSKan Liang    {
71fd550098SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_TAKEN",
72fd550098SAndi Kleen        "BriefDescription": "Instruction per taken branch",
73fd550098SAndi Kleen        "MetricGroup": "Branches;PGO",
74fd550098SAndi Kleen        "MetricName": "IpTB"
75fd550098SAndi Kleen    },
76fd550098SAndi Kleen    {
77fd550098SAndi Kleen        "MetricExpr": "BR_INST_RETIRED.ALL_BRANCHES / BR_INST_RETIRED.NEAR_TAKEN",
78fd550098SAndi Kleen        "BriefDescription": "Branch instructions per taken branch. ",
79fd550098SAndi Kleen        "MetricGroup": "Branches;PGO",
80fd550098SAndi Kleen        "MetricName": "BpTB"
81fd550098SAndi Kleen    },
82fd550098SAndi Kleen    {
83ecd94f1bSKan Liang        "MetricExpr": "min( 1 , UOPS_ISSUED.ANY / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 64 * ( ICACHE_64B.IFTAG_HIT + ICACHE_64B.IFTAG_MISS ) / 4.1 ) )",
84fd550098SAndi Kleen        "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely (includes speculatively fetches) consumed by program instructions",
85fd550098SAndi Kleen        "MetricGroup": "PGO",
86ecd94f1bSKan Liang        "MetricName": "IFetch_Line_Utilization"
87ecd94f1bSKan Liang    },
88ecd94f1bSKan Liang    {
89fd550098SAndi Kleen        "MetricExpr": "IDQ.DSB_UOPS / (( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS ))",
90fd550098SAndi Kleen        "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache)",
91ecd94f1bSKan Liang        "MetricGroup": "DSB;Frontend_Bandwidth",
92ecd94f1bSKan Liang        "MetricName": "DSB_Coverage"
93ecd94f1bSKan Liang    },
94ecd94f1bSKan Liang    {
95ecd94f1bSKan Liang        "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)",
96fd550098SAndi Kleen        "BriefDescription": "Cycles Per Instruction (threaded)",
97ecd94f1bSKan Liang        "MetricGroup": "Pipeline;Summary",
98ecd94f1bSKan Liang        "MetricName": "CPI"
99ecd94f1bSKan Liang    },
100ecd94f1bSKan Liang    {
101ecd94f1bSKan Liang        "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
102fd550098SAndi Kleen        "BriefDescription": "Per-thread actual clocks when the logical processor is active.",
103ecd94f1bSKan Liang        "MetricGroup": "Summary",
104ecd94f1bSKan Liang        "MetricName": "CLKS"
105ecd94f1bSKan Liang    },
106ecd94f1bSKan Liang    {
107fd550098SAndi Kleen        "MetricExpr": "4 * cycles",
108fd550098SAndi Kleen        "BriefDescription": "Total issue-pipeline slots (per core)",
109ecd94f1bSKan Liang        "MetricGroup": "TopDownL1",
110ecd94f1bSKan Liang        "MetricName": "SLOTS"
111ecd94f1bSKan Liang    },
112ecd94f1bSKan Liang    {
113fd550098SAndi Kleen        "MetricExpr": "4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))",
114fd550098SAndi Kleen        "BriefDescription": "Total issue-pipeline slots (per core)",
115fd550098SAndi Kleen        "MetricGroup": "TopDownL1_SMT",
116fd550098SAndi Kleen        "MetricName": "SLOTS_SMT"
117fd550098SAndi Kleen    },
118fd550098SAndi Kleen    {
119fd550098SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / MEM_INST_RETIRED.ALL_LOADS",
120fd550098SAndi Kleen        "BriefDescription": "Instructions per Load (lower number means loads are more frequent)",
121fd550098SAndi Kleen        "MetricGroup": "Instruction_Type;L1_Bound",
122fd550098SAndi Kleen        "MetricName": "IpL"
123fd550098SAndi Kleen    },
124fd550098SAndi Kleen    {
125fd550098SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / MEM_INST_RETIRED.ALL_STORES",
126fd550098SAndi Kleen        "BriefDescription": "Instructions per Store",
127fd550098SAndi Kleen        "MetricGroup": "Instruction_Type;Store_Bound",
128fd550098SAndi Kleen        "MetricName": "IpS"
129fd550098SAndi Kleen    },
130fd550098SAndi Kleen    {
131fd550098SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.ALL_BRANCHES",
132fd550098SAndi Kleen        "BriefDescription": "Instructions per Branch",
133fd550098SAndi Kleen        "MetricGroup": "Branches;Instruction_Type;Port_5;Port_6",
134fd550098SAndi Kleen        "MetricName": "IpB"
135fd550098SAndi Kleen    },
136fd550098SAndi Kleen    {
137fd550098SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_CALL",
138fd550098SAndi Kleen        "BriefDescription": "Instruction per (near) call",
139fd550098SAndi Kleen        "MetricGroup": "Branches",
140fd550098SAndi Kleen        "MetricName": "IpCall"
141fd550098SAndi Kleen    },
142fd550098SAndi Kleen    {
143ecd94f1bSKan Liang        "MetricExpr": "INST_RETIRED.ANY",
144fd550098SAndi Kleen        "BriefDescription": "Total number of retired Instructions",
145ecd94f1bSKan Liang        "MetricGroup": "Summary",
146ecd94f1bSKan Liang        "MetricName": "Instructions"
147ecd94f1bSKan Liang    },
148ecd94f1bSKan Liang    {
149fd550098SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / cycles",
150ecd94f1bSKan Liang        "BriefDescription": "Instructions Per Cycle (per physical core)",
151ecd94f1bSKan Liang        "MetricGroup": "SMT",
152ecd94f1bSKan Liang        "MetricName": "CoreIPC"
153ecd94f1bSKan Liang    },
154ecd94f1bSKan Liang    {
155fd550098SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))",
156fd550098SAndi Kleen        "BriefDescription": "Instructions Per Cycle (per physical core)",
157fd550098SAndi Kleen        "MetricGroup": "SMT",
158fd550098SAndi Kleen        "MetricName": "CoreIPC_SMT"
159fd550098SAndi Kleen    },
160fd550098SAndi Kleen    {
161fd550098SAndi Kleen        "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 + FP_ARITH_INST_RETIRED.512B_PACKED_DOUBLE ) + 16 * FP_ARITH_INST_RETIRED.512B_PACKED_SINGLE )) / cycles",
162fd550098SAndi Kleen        "BriefDescription": "Floating Point Operations Per Cycle",
163fd550098SAndi Kleen        "MetricGroup": "FLOPS",
164fd550098SAndi Kleen        "MetricName": "FLOPc"
165fd550098SAndi Kleen    },
166fd550098SAndi Kleen    {
167fd550098SAndi Kleen        "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 + FP_ARITH_INST_RETIRED.512B_PACKED_DOUBLE ) + 16 * FP_ARITH_INST_RETIRED.512B_PACKED_SINGLE )) / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))",
168fd550098SAndi Kleen        "BriefDescription": "Floating Point Operations Per Cycle",
169fd550098SAndi Kleen        "MetricGroup": "FLOPS_SMT",
170fd550098SAndi Kleen        "MetricName": "FLOPc_SMT"
171fd550098SAndi Kleen    },
172fd550098SAndi Kleen    {
173ecd94f1bSKan Liang        "MetricExpr": "UOPS_EXECUTED.THREAD / (( UOPS_EXECUTED.CORE_CYCLES_GE_1 / 2 ) if #SMT_on else UOPS_EXECUTED.CORE_CYCLES_GE_1)",
174fd550098SAndi Kleen        "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
175ecd94f1bSKan Liang        "MetricGroup": "Pipeline;Ports_Utilization",
176ecd94f1bSKan Liang        "MetricName": "ILP"
177ecd94f1bSKan Liang    },
178ecd94f1bSKan Liang    {
179fd550098SAndi 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)) * (( INT_MISC.CLEAR_RESTEER_CYCLES + 9 * BACLEARS.ANY ) / cycles) / (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * cycles)) ) * (4 * cycles) / BR_MISP_RETIRED.ALL_BRANCHES",
180fd550098SAndi Kleen        "BriefDescription": "Branch Misprediction Cost: Fraction of TopDown slots wasted per branch misprediction (jeclear and baclear)",
181fd550098SAndi Kleen        "MetricGroup": "Branch_Mispredicts",
182fd550098SAndi Kleen        "MetricName": "Branch_Misprediction_Cost"
183ecd94f1bSKan Liang    },
184ecd94f1bSKan Liang    {
185fd550098SAndi 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 ) )))) * (( INT_MISC.CLEAR_RESTEER_CYCLES + 9 * 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",
186fd550098SAndi Kleen        "BriefDescription": "Branch Misprediction Cost: Fraction of TopDown slots wasted per branch misprediction (jeclear and baclear)",
187fd550098SAndi Kleen        "MetricGroup": "Branch_Mispredicts_SMT",
188fd550098SAndi Kleen        "MetricName": "Branch_Misprediction_Cost_SMT"
189fd550098SAndi Kleen    },
190fd550098SAndi Kleen    {
191fd550098SAndi Kleen        "MetricExpr": "INST_RETIRED.ANY / BR_MISP_RETIRED.ALL_BRANCHES",
192fd550098SAndi Kleen        "BriefDescription": "Number of Instructions per non-speculative Branch Misprediction (JEClear)",
193fd550098SAndi Kleen        "MetricGroup": "Branch_Mispredicts",
194fd550098SAndi Kleen        "MetricName": "IpMispredict"
195fd550098SAndi Kleen    },
196fd550098SAndi Kleen    {
197fd550098SAndi Kleen        "MetricExpr": "( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )",
198ecd94f1bSKan Liang        "BriefDescription": "Core actual clocks when any thread is active on the physical core",
199ecd94f1bSKan Liang        "MetricGroup": "SMT",
200ecd94f1bSKan Liang        "MetricName": "CORE_CLKS"
201ecd94f1bSKan Liang    },
202ecd94f1bSKan Liang    {
2032d08f87fSWilliam Cohen        "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_RETIRED.L1_MISS + MEM_LOAD_RETIRED.FB_HIT )",
204fd550098SAndi Kleen        "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads (in core cycles)",
205ecd94f1bSKan Liang        "MetricGroup": "Memory_Bound;Memory_Lat",
206ecd94f1bSKan Liang        "MetricName": "Load_Miss_Real_Latency"
207ecd94f1bSKan Liang    },
208ecd94f1bSKan Liang    {
209fd550098SAndi Kleen        "MetricExpr": "L1D_PEND_MISS.PENDING / L1D_PEND_MISS.PENDING_CYCLES",
210fd550098SAndi Kleen        "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss. Per-thread)",
211ecd94f1bSKan Liang        "MetricGroup": "Memory_Bound;Memory_BW",
212ecd94f1bSKan Liang        "MetricName": "MLP"
213ecd94f1bSKan Liang    },
214ecd94f1bSKan Liang    {
215fd550098SAndi Kleen        "MetricExpr": "( ITLB_MISSES.WALK_PENDING + DTLB_LOAD_MISSES.WALK_PENDING + DTLB_STORE_MISSES.WALK_PENDING + EPT.WALK_PENDING ) / ( 2 * cycles )",
216ecd94f1bSKan Liang        "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
217ecd94f1bSKan Liang        "MetricGroup": "TLB",
218ecd94f1bSKan Liang        "MetricName": "Page_Walks_Utilization"
219ecd94f1bSKan Liang    },
220ecd94f1bSKan Liang    {
221fd550098SAndi Kleen        "MetricExpr": "( ITLB_MISSES.WALK_PENDING + DTLB_LOAD_MISSES.WALK_PENDING + DTLB_STORE_MISSES.WALK_PENDING + EPT.WALK_PENDING ) / ( 2 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )) )",
222fd550098SAndi Kleen        "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
223fd550098SAndi Kleen        "MetricGroup": "TLB_SMT",
224fd550098SAndi Kleen        "MetricName": "Page_Walks_Utilization_SMT"
225fd550098SAndi Kleen    },
226fd550098SAndi Kleen    {
227fd550098SAndi Kleen        "MetricExpr": "64 * L1D.REPLACEMENT / 1000000000 / duration_time",
228fd550098SAndi Kleen        "BriefDescription": "Average data fill bandwidth to the L1 data cache [GB / sec]",
229fd550098SAndi Kleen        "MetricGroup": "Memory_BW",
230fd550098SAndi Kleen        "MetricName": "L1D_Cache_Fill_BW"
231fd550098SAndi Kleen    },
232fd550098SAndi Kleen    {
233fd550098SAndi Kleen        "MetricExpr": "64 * L2_LINES_IN.ALL / 1000000000 / duration_time",
234fd550098SAndi Kleen        "BriefDescription": "Average data fill bandwidth to the L2 cache [GB / sec]",
235fd550098SAndi Kleen        "MetricGroup": "Memory_BW",
236fd550098SAndi Kleen        "MetricName": "L2_Cache_Fill_BW"
237fd550098SAndi Kleen    },
238fd550098SAndi Kleen    {
239fd550098SAndi Kleen        "MetricExpr": "64 * LONGEST_LAT_CACHE.MISS / 1000000000 / duration_time",
240fd550098SAndi Kleen        "BriefDescription": "Average per-core data fill bandwidth to the L3 cache [GB / sec]",
241fd550098SAndi Kleen        "MetricGroup": "Memory_BW",
242fd550098SAndi Kleen        "MetricName": "L3_Cache_Fill_BW"
243fd550098SAndi Kleen    },
244fd550098SAndi Kleen    {
245fd550098SAndi Kleen        "MetricExpr": "64 * OFFCORE_REQUESTS.ALL_REQUESTS / 1000000000 / duration_time",
246fd550098SAndi Kleen        "BriefDescription": "Average per-core data fill bandwidth to the L3 cache [GB / sec]",
247fd550098SAndi Kleen        "MetricGroup": "Memory_BW",
248fd550098SAndi Kleen        "MetricName": "L3_Cache_Access_BW"
249fd550098SAndi Kleen    },
250fd550098SAndi Kleen    {
251fd550098SAndi Kleen        "MetricExpr": "1000 * MEM_LOAD_RETIRED.L1_MISS / INST_RETIRED.ANY",
252fd550098SAndi Kleen        "BriefDescription": "L1 cache true misses per kilo instruction for retired demand loads",
253fd550098SAndi Kleen        "MetricGroup": "Cache_Misses;",
254fd550098SAndi Kleen        "MetricName": "L1MPKI"
255fd550098SAndi Kleen    },
256fd550098SAndi Kleen    {
257fd550098SAndi Kleen        "MetricExpr": "1000 * MEM_LOAD_RETIRED.L2_MISS / INST_RETIRED.ANY",
258fd550098SAndi Kleen        "BriefDescription": "L2 cache true misses per kilo instruction for retired demand loads",
259fd550098SAndi Kleen        "MetricGroup": "Cache_Misses;",
260fd550098SAndi Kleen        "MetricName": "L2MPKI"
261fd550098SAndi Kleen    },
262fd550098SAndi Kleen    {
263fd550098SAndi Kleen        "MetricExpr": "1000 * L2_RQSTS.MISS / INST_RETIRED.ANY",
264fd550098SAndi Kleen        "BriefDescription": "L2 cache misses per kilo instruction for all request types (including speculative)",
265fd550098SAndi Kleen        "MetricGroup": "Cache_Misses;",
266fd550098SAndi Kleen        "MetricName": "L2MPKI_All"
267fd550098SAndi Kleen    },
268fd550098SAndi Kleen    {
269fd550098SAndi Kleen        "MetricExpr": "1000 * ( L2_RQSTS.REFERENCES - L2_RQSTS.MISS ) / INST_RETIRED.ANY",
270fd550098SAndi Kleen        "BriefDescription": "L2 cache hits per kilo instruction for all request types (including speculative)",
271fd550098SAndi Kleen        "MetricGroup": "Cache_Misses;",
272fd550098SAndi Kleen        "MetricName": "L2HPKI_All"
273fd550098SAndi Kleen    },
274fd550098SAndi Kleen    {
275fd550098SAndi Kleen        "MetricExpr": "1000 * MEM_LOAD_RETIRED.L3_MISS / INST_RETIRED.ANY",
276fd550098SAndi Kleen        "BriefDescription": "L3 cache true misses per kilo instruction for retired demand loads",
277fd550098SAndi Kleen        "MetricGroup": "Cache_Misses;",
278fd550098SAndi Kleen        "MetricName": "L3MPKI"
279fd550098SAndi Kleen    },
280fd550098SAndi Kleen    {
281ecd94f1bSKan Liang        "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
282fd550098SAndi Kleen        "BriefDescription": "Average CPU Utilization",
283ecd94f1bSKan Liang        "MetricGroup": "Summary",
284ecd94f1bSKan Liang        "MetricName": "CPU_Utilization"
285ecd94f1bSKan Liang    },
286ecd94f1bSKan Liang    {
287fd550098SAndi Kleen        "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 + FP_ARITH_INST_RETIRED.512B_PACKED_DOUBLE ) + 16 * FP_ARITH_INST_RETIRED.512B_PACKED_SINGLE )) / 1000000000 ) / duration_time",
288ecd94f1bSKan Liang        "BriefDescription": "Giga Floating Point Operations Per Second",
289ecd94f1bSKan Liang        "MetricGroup": "FLOPS;Summary",
290ecd94f1bSKan Liang        "MetricName": "GFLOPs"
291ecd94f1bSKan Liang    },
292ecd94f1bSKan Liang    {
293ecd94f1bSKan Liang        "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
294fd550098SAndi Kleen        "BriefDescription": "Average Frequency Utilization relative nominal frequency",
295ecd94f1bSKan Liang        "MetricGroup": "Power",
296ecd94f1bSKan Liang        "MetricName": "Turbo_Utilization"
297ecd94f1bSKan Liang    },
298ecd94f1bSKan Liang    {
299ecd94f1bSKan Liang        "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
300fd550098SAndi Kleen        "BriefDescription": "Fraction of cycles where both hardware threads were active",
301ecd94f1bSKan Liang        "MetricGroup": "SMT;Summary",
302ecd94f1bSKan Liang        "MetricName": "SMT_2T_Utilization"
303ecd94f1bSKan Liang    },
304ecd94f1bSKan Liang    {
305ecd94f1bSKan Liang        "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
306fd550098SAndi Kleen        "BriefDescription": "Fraction of cycles spent in Kernel mode",
307ecd94f1bSKan Liang        "MetricGroup": "Summary",
308ecd94f1bSKan Liang        "MetricName": "Kernel_Utilization"
309ecd94f1bSKan Liang    },
310ecd94f1bSKan Liang    {
311fd550098SAndi Kleen        "MetricExpr": "( 64 * ( uncore_imc@cas_count_read@ + uncore_imc@cas_count_write@ ) / 1000000000 ) / duration_time",
312fd550098SAndi Kleen        "BriefDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]",
313fd550098SAndi Kleen        "MetricGroup": "Memory_BW",
314fd550098SAndi Kleen        "MetricName": "DRAM_BW_Use"
315fd550098SAndi Kleen    },
316fd550098SAndi Kleen    {
317fd550098SAndi Kleen        "MetricExpr": "1000000000 * ( cha@event\\=0x36\\\\\\,umask\\=0x21@ / cha@event\\=0x35\\\\\\,umask\\=0x21@ ) / ( cha_0@event\\=0x0@ / duration_time )",
318fd550098SAndi Kleen        "BriefDescription": "Average latency of data read request to external memory (in nanoseconds). Accounts for demand loads and L1/L2 prefetches",
319fd550098SAndi Kleen        "MetricGroup": "Memory_Lat",
320fd550098SAndi Kleen        "MetricName": "DRAM_Read_Latency"
321fd550098SAndi Kleen    },
322fd550098SAndi Kleen    {
323fd550098SAndi Kleen        "MetricExpr": "cha@event\\=0x36\\\\\\,umask\\=0x21@ / cha@event\\=0x36\\\\\\,umask\\=0x21\\\\\\,thresh\\=1@",
324fd550098SAndi Kleen        "BriefDescription": "Average number of parallel data read requests to external memory. Accounts for demand loads and L1/L2 prefetches",
325fd550098SAndi Kleen        "MetricGroup": "Memory_BW",
326fd550098SAndi Kleen        "MetricName": "DRAM_Parallel_Reads"
327fd550098SAndi Kleen    },
328fd550098SAndi Kleen    {
329fd550098SAndi Kleen        "MetricExpr": "( 1000000000 * ( imc@event\\=0xe0\\\\\\,umask\\=0x1@ / imc@event\\=0xe3@ ) / imc_0@event\\=0x0@ ) if 1 if 1 == 1 else 0 else 0",
330fd550098SAndi Kleen        "BriefDescription": "Average latency of data read request to external 3D X-Point memory [in nanoseconds]. Accounts for demand loads and L1/L2 data-read prefetches",
331fd550098SAndi Kleen        "MetricGroup": "Memory_Lat",
332fd550098SAndi Kleen        "MetricName": "MEM_PMM_Read_Latency"
333fd550098SAndi Kleen    },
334fd550098SAndi Kleen    {
335fd550098SAndi Kleen        "MetricExpr": "( ( 64 * imc@event\\=0xe3@ / 1000000000 ) / duration_time ) if 1 if 1 == 1 else 0 else 0",
336fd550098SAndi Kleen        "BriefDescription": "Average 3DXP Memory Bandwidth Use for reads [GB / sec]",
337fd550098SAndi Kleen        "MetricGroup": "Memory_BW",
338fd550098SAndi Kleen        "MetricName": "PMM_Read_BW"
339fd550098SAndi Kleen    },
340fd550098SAndi Kleen    {
341fd550098SAndi Kleen        "MetricExpr": "( ( 64 * imc@event\\=0xe7@ / 1000000000 ) / duration_time ) if 1 if 1 == 1 else 0 else 0",
342fd550098SAndi Kleen        "BriefDescription": "Average 3DXP Memory Bandwidth Use for Writes [GB / sec]",
343fd550098SAndi Kleen        "MetricGroup": "Memory_BW",
344fd550098SAndi Kleen        "MetricName": "PMM_Write_BW"
345fd550098SAndi Kleen    },
346fd550098SAndi Kleen    {
347fd550098SAndi Kleen        "MetricExpr": "cha_0@event\\=0x0@",
348fd550098SAndi Kleen        "BriefDescription": "Socket actual clocks when any core is active on that socket",
349fd550098SAndi Kleen        "MetricGroup": "",
350fd550098SAndi Kleen        "MetricName": "Socket_CLKS"
351fd550098SAndi Kleen    },
352fd550098SAndi Kleen    {
353ecd94f1bSKan Liang        "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
354ecd94f1bSKan Liang        "MetricGroup": "Power",
355fd550098SAndi Kleen        "BriefDescription": "C3 residency percent per core",
356ecd94f1bSKan Liang        "MetricName": "C3_Core_Residency"
357ecd94f1bSKan Liang    },
358ecd94f1bSKan Liang    {
359ecd94f1bSKan Liang        "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
360ecd94f1bSKan Liang        "MetricGroup": "Power",
361fd550098SAndi Kleen        "BriefDescription": "C6 residency percent per core",
362ecd94f1bSKan Liang        "MetricName": "C6_Core_Residency"
363ecd94f1bSKan Liang    },
364ecd94f1bSKan Liang    {
365ecd94f1bSKan Liang        "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
366ecd94f1bSKan Liang        "MetricGroup": "Power",
367fd550098SAndi Kleen        "BriefDescription": "C7 residency percent per core",
368ecd94f1bSKan Liang        "MetricName": "C7_Core_Residency"
369ecd94f1bSKan Liang    },
370ecd94f1bSKan Liang    {
371ecd94f1bSKan Liang        "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
372ecd94f1bSKan Liang        "MetricGroup": "Power",
373fd550098SAndi Kleen        "BriefDescription": "C2 residency percent per package",
374ecd94f1bSKan Liang        "MetricName": "C2_Pkg_Residency"
375ecd94f1bSKan Liang    },
376ecd94f1bSKan Liang    {
377ecd94f1bSKan Liang        "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
378ecd94f1bSKan Liang        "MetricGroup": "Power",
379fd550098SAndi Kleen        "BriefDescription": "C3 residency percent per package",
380ecd94f1bSKan Liang        "MetricName": "C3_Pkg_Residency"
381ecd94f1bSKan Liang    },
382ecd94f1bSKan Liang    {
383ecd94f1bSKan Liang        "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
384ecd94f1bSKan Liang        "MetricGroup": "Power",
385fd550098SAndi Kleen        "BriefDescription": "C6 residency percent per package",
386ecd94f1bSKan Liang        "MetricName": "C6_Pkg_Residency"
387ecd94f1bSKan Liang    },
388ecd94f1bSKan Liang    {
389ecd94f1bSKan Liang        "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
390ecd94f1bSKan Liang        "MetricGroup": "Power",
391fd550098SAndi Kleen        "BriefDescription": "C7 residency percent per package",
392ecd94f1bSKan Liang        "MetricName": "C7_Pkg_Residency"
393ecd94f1bSKan Liang    }
394ecd94f1bSKan Liang]
395