11b097845SAndi Kleen[
21b097845SAndi Kleen    {
3a2f6001bSIan Rogers        "BriefDescription": "Counts the number of branch instructions retired...",
4a2f6001bSIan Rogers        "EventCode": "0xC4",
5a2f6001bSIan Rogers        "EventName": "BR_INST_RETIRED.ALL_BRANCHES",
61b097845SAndi Kleen        "PEBS": "1",
71b097845SAndi Kleen        "PublicDescription": "ALL_BRANCHES counts the number of any branch instructions retired.  Branch prediction predicts the branch target and enables the processor to begin executing instructions long before the branch true execution path is known. All branches utilize the branch prediction unit (BPU) for prediction. This unit predicts the target address not only based on the EIP of the branch but also based on the execution path through which execution reached this EIP. The BPU can efficiently predict the following branch types: conditional branches, direct calls and jumps, indirect calls and jumps, returns.",
8a2f6001bSIan Rogers        "SampleAfterValue": "200003"
91b097845SAndi Kleen    },
101b097845SAndi Kleen    {
11a2f6001bSIan Rogers        "BriefDescription": "Counts the number of taken branch instructions retired",
12a2f6001bSIan Rogers        "EventCode": "0xC4",
13a2f6001bSIan Rogers        "EventName": "BR_INST_RETIRED.ALL_TAKEN_BRANCHES",
14a2f6001bSIan Rogers        "PEBS": "2",
15a2f6001bSIan Rogers        "PublicDescription": "ALL_TAKEN_BRANCHES counts the number of all taken branch instructions retired.  Branch prediction predicts the branch target and enables the processor to begin executing instructions long before the branch true execution path is known. All branches utilize the branch prediction unit (BPU) for prediction. This unit predicts the target address not only based on the EIP of the branch but also based on the execution path through which execution reached this EIP. The BPU can efficiently predict the following branch types: conditional branches, direct calls and jumps, indirect calls and jumps, returns.",
161b097845SAndi Kleen        "SampleAfterValue": "200003",
17a2f6001bSIan Rogers        "UMask": "0x80"
181b097845SAndi Kleen    },
191b097845SAndi Kleen    {
20a2f6001bSIan Rogers        "BriefDescription": "Counts the number of near CALL branch instructions retired",
21a2f6001bSIan Rogers        "EventCode": "0xC4",
22a2f6001bSIan Rogers        "EventName": "BR_INST_RETIRED.CALL",
231b097845SAndi Kleen        "PEBS": "1",
241b097845SAndi Kleen        "PublicDescription": "CALL counts the number of near CALL branch instructions retired.  Branch prediction predicts the branch target and enables the processor to begin executing instructions long before the branch true execution path is known. All branches utilize the branch prediction unit (BPU) for prediction. This unit predicts the target address not only based on the EIP of the branch but also based on the execution path through which execution reached this EIP. The BPU can efficiently predict the following branch types: conditional branches, direct calls and jumps, indirect calls and jumps, returns.",
251b097845SAndi Kleen        "SampleAfterValue": "200003",
26a2f6001bSIan Rogers        "UMask": "0xf9"
271b097845SAndi Kleen    },
281b097845SAndi Kleen    {
29a2f6001bSIan Rogers        "BriefDescription": "Counts the number of far branch instructions retired",
301b097845SAndi Kleen        "EventCode": "0xC4",
31a2f6001bSIan Rogers        "EventName": "BR_INST_RETIRED.FAR_BRANCH",
321b097845SAndi Kleen        "PEBS": "1",
331b097845SAndi Kleen        "PublicDescription": "FAR counts the number of far branch instructions retired.  Branch prediction predicts the branch target and enables the processor to begin executing instructions long before the branch true execution path is known. All branches utilize the branch prediction unit (BPU) for prediction. This unit predicts the target address not only based on the EIP of the branch but also based on the execution path through which execution reached this EIP. The BPU can efficiently predict the following branch types: conditional branches, direct calls and jumps, indirect calls and jumps, returns.",
341b097845SAndi Kleen        "SampleAfterValue": "200003",
35a2f6001bSIan Rogers        "UMask": "0xbf"
361b097845SAndi Kleen    },
371b097845SAndi Kleen    {
38a2f6001bSIan Rogers        "BriefDescription": "Counts the number of near indirect CALL branch instructions retired",
39a2f6001bSIan Rogers        "EventCode": "0xC4",
40a2f6001bSIan Rogers        "EventName": "BR_INST_RETIRED.IND_CALL",
41a2f6001bSIan Rogers        "PEBS": "1",
42a2f6001bSIan Rogers        "PublicDescription": "IND_CALL counts the number of near indirect CALL branch instructions retired.  Branch prediction predicts the branch target and enables the processor to begin executing instructions long before the branch true execution path is known. All branches utilize the branch prediction unit (BPU) for prediction. This unit predicts the target address not only based on the EIP of the branch but also based on the execution path through which execution reached this EIP. The BPU can efficiently predict the following branch types: conditional branches, direct calls and jumps, indirect calls and jumps, returns.",
43a2f6001bSIan Rogers        "SampleAfterValue": "200003",
44a2f6001bSIan Rogers        "UMask": "0xfb"
45a2f6001bSIan Rogers    },
46a2f6001bSIan Rogers    {
47a2f6001bSIan Rogers        "BriefDescription": "Counts the number of JCC branch instructions retired",
48a2f6001bSIan Rogers        "EventCode": "0xC4",
49a2f6001bSIan Rogers        "EventName": "BR_INST_RETIRED.JCC",
50a2f6001bSIan Rogers        "PEBS": "1",
51a2f6001bSIan Rogers        "PublicDescription": "JCC counts the number of conditional branch (JCC) instructions retired. Branch prediction predicts the branch target and enables the processor to begin executing instructions long before the branch true execution path is known. All branches utilize the branch prediction unit (BPU) for prediction. This unit predicts the target address not only based on the EIP of the branch but also based on the execution path through which execution reached this EIP. The BPU can efficiently predict the following branch types: conditional branches, direct calls and jumps, indirect calls and jumps, returns.",
52a2f6001bSIan Rogers        "SampleAfterValue": "200003",
53a2f6001bSIan Rogers        "UMask": "0x7e"
54a2f6001bSIan Rogers    },
55a2f6001bSIan Rogers    {
56a2f6001bSIan Rogers        "BriefDescription": "Counts the number of near indirect JMP and near indirect CALL branch instructions retired",
57a2f6001bSIan Rogers        "EventCode": "0xC4",
58a2f6001bSIan Rogers        "EventName": "BR_INST_RETIRED.NON_RETURN_IND",
59a2f6001bSIan Rogers        "PEBS": "1",
60a2f6001bSIan Rogers        "PublicDescription": "NON_RETURN_IND counts the number of near indirect JMP and near indirect CALL branch instructions retired.  Branch prediction predicts the branch target and enables the processor to begin executing instructions long before the branch true execution path is known. All branches utilize the branch prediction unit (BPU) for prediction. This unit predicts the target address not only based on the EIP of the branch but also based on the execution path through which execution reached this EIP. The BPU can efficiently predict the following branch types: conditional branches, direct calls and jumps, indirect calls and jumps, returns.",
61a2f6001bSIan Rogers        "SampleAfterValue": "200003",
62a2f6001bSIan Rogers        "UMask": "0xeb"
63a2f6001bSIan Rogers    },
64a2f6001bSIan Rogers    {
65a2f6001bSIan Rogers        "BriefDescription": "Counts the number of near relative CALL branch instructions retired",
66a2f6001bSIan Rogers        "EventCode": "0xC4",
67a2f6001bSIan Rogers        "EventName": "BR_INST_RETIRED.REL_CALL",
68a2f6001bSIan Rogers        "PEBS": "1",
69a2f6001bSIan Rogers        "PublicDescription": "REL_CALL counts the number of near relative CALL branch instructions retired.  Branch prediction predicts the branch target and enables the processor to begin executing instructions long before the branch true execution path is known. All branches utilize the branch prediction unit (BPU) for prediction. This unit predicts the target address not only based on the EIP of the branch but also based on the execution path through which execution reached this EIP. The BPU can efficiently predict the following branch types: conditional branches, direct calls and jumps, indirect calls and jumps, returns.",
70a2f6001bSIan Rogers        "SampleAfterValue": "200003",
71a2f6001bSIan Rogers        "UMask": "0xfd"
72a2f6001bSIan Rogers    },
73a2f6001bSIan Rogers    {
74a2f6001bSIan Rogers        "BriefDescription": "Counts the number of near RET branch instructions retired",
75a2f6001bSIan Rogers        "EventCode": "0xC4",
76a2f6001bSIan Rogers        "EventName": "BR_INST_RETIRED.RETURN",
77a2f6001bSIan Rogers        "PEBS": "1",
78a2f6001bSIan Rogers        "PublicDescription": "RETURN counts the number of near RET branch instructions retired.  Branch prediction predicts the branch target and enables the processor to begin executing instructions long before the branch true execution path is known. All branches utilize the branch prediction unit (BPU) for prediction. This unit predicts the target address not only based on the EIP of the branch but also based on the execution path through which execution reached this EIP. The BPU can efficiently predict the following branch types: conditional branches, direct calls and jumps, indirect calls and jumps, returns.",
79a2f6001bSIan Rogers        "SampleAfterValue": "200003",
80a2f6001bSIan Rogers        "UMask": "0xf7"
81a2f6001bSIan Rogers    },
82a2f6001bSIan Rogers    {
83a2f6001bSIan Rogers        "BriefDescription": "Counts the number of taken JCC branch instructions retired",
84a2f6001bSIan Rogers        "EventCode": "0xC4",
85a2f6001bSIan Rogers        "EventName": "BR_INST_RETIRED.TAKEN_JCC",
86a2f6001bSIan Rogers        "PEBS": "1",
87a2f6001bSIan Rogers        "PublicDescription": "TAKEN_JCC counts the number of taken conditional branch (JCC) instructions retired. Branch prediction predicts the branch target and enables the processor to begin executing instructions long before the branch true execution path is known. All branches utilize the branch prediction unit (BPU) for prediction. This unit predicts the target address not only based on the EIP of the branch but also based on the execution path through which execution reached this EIP. The BPU can efficiently predict the following branch types: conditional branches, direct calls and jumps, indirect calls and jumps, returns.",
88a2f6001bSIan Rogers        "SampleAfterValue": "200003",
89a2f6001bSIan Rogers        "UMask": "0xfe"
90a2f6001bSIan Rogers    },
91a2f6001bSIan Rogers    {
92a2f6001bSIan Rogers        "BriefDescription": "Counts the number of mispredicted branch instructions retired",
93a2f6001bSIan Rogers        "EventCode": "0xC5",
94a2f6001bSIan Rogers        "EventName": "BR_MISP_RETIRED.ALL_BRANCHES",
951b097845SAndi Kleen        "PEBS": "1",
961b097845SAndi Kleen        "PublicDescription": "ALL_BRANCHES counts the number of any mispredicted branch instructions retired. This umask is an architecturally defined event. This event counts the number of retired branch instructions that were mispredicted by the processor, categorized by type. A branch misprediction occurs when the processor predicts that the branch would be taken, but it is not, or vice-versa.  When the misprediction is discovered, all the instructions executed in the wrong (speculative) path must be discarded, and the processor must start fetching from the correct path.",
97a2f6001bSIan Rogers        "SampleAfterValue": "200003"
981b097845SAndi Kleen    },
991b097845SAndi Kleen    {
100a2f6001bSIan Rogers        "BriefDescription": "Counts the number of mispredicted near indirect CALL branch instructions retired",
1011b097845SAndi Kleen        "EventCode": "0xC5",
102a2f6001bSIan Rogers        "EventName": "BR_MISP_RETIRED.IND_CALL",
1031b097845SAndi Kleen        "PEBS": "1",
1041b097845SAndi Kleen        "PublicDescription": "IND_CALL counts the number of mispredicted near indirect CALL branch instructions retired.  This event counts the number of retired branch instructions that were mispredicted by the processor, categorized by type. A branch misprediction occurs when the processor predicts that the branch would be taken, but it is not, or vice-versa.  When the misprediction is discovered, all the instructions executed in the wrong (speculative) path must be discarded, and the processor must start fetching from the correct path.",
1051b097845SAndi Kleen        "SampleAfterValue": "200003",
106a2f6001bSIan Rogers        "UMask": "0xfb"
1071b097845SAndi Kleen    },
1081b097845SAndi Kleen    {
109a2f6001bSIan Rogers        "BriefDescription": "Counts the number of mispredicted JCC branch instructions retired",
110a2f6001bSIan Rogers        "EventCode": "0xC5",
111a2f6001bSIan Rogers        "EventName": "BR_MISP_RETIRED.JCC",
1121b097845SAndi Kleen        "PEBS": "1",
113a2f6001bSIan Rogers        "PublicDescription": "JCC counts the number of mispredicted conditional branches (JCC) instructions retired.  This event counts the number of retired branch instructions that were mispredicted by the processor, categorized by type. A branch misprediction occurs when the processor predicts that the branch would be taken, but it is not, or vice-versa.  When the misprediction is discovered, all the instructions executed in the wrong (speculative) path must be discarded, and the processor must start fetching from the correct path.",
1141b097845SAndi Kleen        "SampleAfterValue": "200003",
115a2f6001bSIan Rogers        "UMask": "0x7e"
1161b097845SAndi Kleen    },
1171b097845SAndi Kleen    {
118a2f6001bSIan Rogers        "BriefDescription": "Counts the number of mispredicted near indirect JMP and near indirect CALL branch instructions retired",
119a2f6001bSIan Rogers        "EventCode": "0xC5",
120a2f6001bSIan Rogers        "EventName": "BR_MISP_RETIRED.NON_RETURN_IND",
1211b097845SAndi Kleen        "PEBS": "1",
1221b097845SAndi Kleen        "PublicDescription": "NON_RETURN_IND counts the number of mispredicted near indirect JMP and near indirect CALL branch instructions retired.  This event counts the number of retired branch instructions that were mispredicted by the processor, categorized by type. A branch misprediction occurs when the processor predicts that the branch would be taken, but it is not, or vice-versa.  When the misprediction is discovered, all the instructions executed in the wrong (speculative) path must be discarded, and the processor must start fetching from the correct path.",
123a2f6001bSIan Rogers        "SampleAfterValue": "200003",
124a2f6001bSIan Rogers        "UMask": "0xeb"
125a2f6001bSIan Rogers    },
126a2f6001bSIan Rogers    {
127a2f6001bSIan Rogers        "BriefDescription": "Counts the number of mispredicted near RET branch instructions retired",
1281b097845SAndi Kleen        "EventCode": "0xC5",
129a2f6001bSIan Rogers        "EventName": "BR_MISP_RETIRED.RETURN",
130a2f6001bSIan Rogers        "PEBS": "1",
131a2f6001bSIan Rogers        "PublicDescription": "RETURN counts the number of mispredicted near RET branch instructions retired.  This event counts the number of retired branch instructions that were mispredicted by the processor, categorized by type. A branch misprediction occurs when the processor predicts that the branch would be taken, but it is not, or vice-versa.  When the misprediction is discovered, all the instructions executed in the wrong (speculative) path must be discarded, and the processor must start fetching from the correct path.",
1321b097845SAndi Kleen        "SampleAfterValue": "200003",
133a2f6001bSIan Rogers        "UMask": "0xf7"
1341b097845SAndi Kleen    },
1351b097845SAndi Kleen    {
136a2f6001bSIan Rogers        "BriefDescription": "Counts the number of mispredicted taken JCC branch instructions retired",
137a2f6001bSIan Rogers        "EventCode": "0xC5",
138a2f6001bSIan Rogers        "EventName": "BR_MISP_RETIRED.TAKEN_JCC",
139a2f6001bSIan Rogers        "PEBS": "1",
140a2f6001bSIan Rogers        "PublicDescription": "TAKEN_JCC counts the number of mispredicted taken conditional branch (JCC) instructions retired.  This event counts the number of retired branch instructions that were mispredicted by the processor, categorized by type. A branch misprediction occurs when the processor predicts that the branch would be taken, but it is not, or vice-versa.  When the misprediction is discovered, all the instructions executed in the wrong (speculative) path must be discarded, and the processor must start fetching from the correct path.",
141a2f6001bSIan Rogers        "SampleAfterValue": "200003",
142a2f6001bSIan Rogers        "UMask": "0xfe"
143a2f6001bSIan Rogers    },
144a2f6001bSIan Rogers    {
145a2f6001bSIan Rogers        "BriefDescription": "Fixed Counter: Counts the number of unhalted core clock cycles",
146a2f6001bSIan Rogers        "EventName": "CPU_CLK_UNHALTED.CORE",
147a2f6001bSIan Rogers        "PublicDescription": "Counts the number of core cycles while the core is not in a halt state. The core enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios.  The core frequency may change from time to time. For this reason this event may have a changing ratio with regards to time. In systems with a constant core frequency, this event can give you a measurement of the elapsed time while the core was not in halt state by dividing the event count by the core frequency. This event is architecturally defined and is a designated fixed counter.  CPU_CLK_UNHALTED.CORE and CPU_CLK_UNHALTED.CORE_P use the core frequency which may change from time to time.  CPU_CLK_UNHALTE.REF_TSC and CPU_CLK_UNHALTED.REF are not affected by core frequency changes but counts as if the core is running at the maximum frequency all the time.  The fixed events are CPU_CLK_UNHALTED.CORE and CPU_CLK_UNHALTED.REF_TSC and the programmable events are CPU_CLK_UNHALTED.CORE_P and CPU_CLK_UNHALTED.REF.",
1481b097845SAndi Kleen        "SampleAfterValue": "2000003",
149a2f6001bSIan Rogers        "UMask": "0x2"
1501b097845SAndi Kleen    },
1511b097845SAndi Kleen    {
152a2f6001bSIan Rogers        "BriefDescription": "Core cycles when core is not halted",
153a2f6001bSIan Rogers        "EventCode": "0x3C",
154a2f6001bSIan Rogers        "EventName": "CPU_CLK_UNHALTED.CORE_P",
155a2f6001bSIan Rogers        "PublicDescription": "This event counts the number of core cycles while the core is not in a halt state. The core enters the halt state when it is running the HLT instruction. In mobile systems the core frequency may change from time to time. For this reason this event may have a changing ratio with regards to time.",
156a2f6001bSIan Rogers        "SampleAfterValue": "2000003"
157a2f6001bSIan Rogers    },
158a2f6001bSIan Rogers    {
159a2f6001bSIan Rogers        "BriefDescription": "Reference cycles when core is not halted",
160a2f6001bSIan Rogers        "EventCode": "0x3C",
161a2f6001bSIan Rogers        "EventName": "CPU_CLK_UNHALTED.REF",
162a2f6001bSIan Rogers        "PublicDescription": "This event counts the number of reference cycles that the core is not in a halt state. The core enters the halt state when it is running the HLT instruction. In mobile systems the core frequency may change from time. This event is not affected by core frequency changes but counts as if the core is running at the maximum frequency all the time.",
1631b097845SAndi Kleen        "SampleAfterValue": "2000003",
164a2f6001bSIan Rogers        "UMask": "0x1"
1651b097845SAndi Kleen    },
1661b097845SAndi Kleen    {
167a2f6001bSIan Rogers        "BriefDescription": "Fixed Counter: Counts the number of unhalted reference clock cycles",
168a2f6001bSIan Rogers        "EventName": "CPU_CLK_UNHALTED.REF_TSC",
169a2f6001bSIan Rogers        "PublicDescription": "Counts the number of reference cycles while the core is not in a halt state. The core enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios.  The core frequency may change from time. This event is not affected by core frequency changes but counts as if the core is running at the maximum frequency all the time.  Divide this event count by core frequency to determine the elapsed time while the core was not in halt state.  Divide this event count by core frequency to determine the elapsed time while the core was not in halt state.  This event is architecturally defined and is a designated fixed counter.  CPU_CLK_UNHALTED.CORE and CPU_CLK_UNHALTED.CORE_P use the core frequency which may change from time to time.  CPU_CLK_UNHALTE.REF_TSC and CPU_CLK_UNHALTED.REF are not affected by core frequency changes but counts as if the core is running at the maximum frequency all the time.  The fixed events are CPU_CLK_UNHALTED.CORE and CPU_CLK_UNHALTED.REF_TSC and the programmable events are CPU_CLK_UNHALTED.CORE_P and CPU_CLK_UNHALTED.REF.",
170a2f6001bSIan Rogers        "SampleAfterValue": "2000003",
171a2f6001bSIan Rogers        "UMask": "0x3"
1721b097845SAndi Kleen    },
1731b097845SAndi Kleen    {
174a2f6001bSIan Rogers        "BriefDescription": "Cycles the divider is busy.  Does not imply a stall waiting for the divider.",
175a2f6001bSIan Rogers        "EventCode": "0xCD",
176a2f6001bSIan Rogers        "EventName": "CYCLES_DIV_BUSY.ALL",
177a2f6001bSIan Rogers        "PublicDescription": "Cycles the divider is busy.This event counts the cycles when the divide unit is unable to accept a new divide UOP because it is busy processing a previously dispatched UOP. The cycles will be counted irrespective of whether or not another divide UOP is waiting to enter the divide unit (from the RS). This event might count cycles while a divide is in progress even if the RS is empty.  The divide instruction is one of the longest latency instructions in the machine.  Hence, it has a special event associated with it to help determine if divides are delaying the retirement of instructions.",
178a2f6001bSIan Rogers        "SampleAfterValue": "2000003",
179a2f6001bSIan Rogers        "UMask": "0x1"
1801b097845SAndi Kleen    },
1811b097845SAndi Kleen    {
182a2f6001bSIan Rogers        "BriefDescription": "Fixed Counter: Counts the number of instructions retired",
183a2f6001bSIan Rogers        "EventName": "INST_RETIRED.ANY",
184a2f6001bSIan Rogers        "PublicDescription": "This event counts the number of instructions that retire.  For instructions that consist of multiple micro-ops, this event counts exactly once, as the last micro-op of the instruction retires.  The event continues counting while instructions retire, including during interrupt service routines caused by hardware interrupts, faults or traps.  Background: Modern microprocessors employ extensive pipelining and speculative techniques.  Since sometimes an instruction is started but never completed, the notion of \"retirement\" is introduced.  A retired instruction is one that commits its states. Or stated differently, an instruction might be abandoned at some point. No instruction is truly finished until it retires.  This counter measures the number of completed instructions.  The fixed event is INST_RETIRED.ANY and the programmable event is INST_RETIRED.ANY_P.",
185a2f6001bSIan Rogers        "SampleAfterValue": "2000003",
186a2f6001bSIan Rogers        "UMask": "0x1"
187a2f6001bSIan Rogers    },
188a2f6001bSIan Rogers    {
189a2f6001bSIan Rogers        "BriefDescription": "Instructions retired",
190a2f6001bSIan Rogers        "EventCode": "0xC0",
191a2f6001bSIan Rogers        "EventName": "INST_RETIRED.ANY_P",
192a2f6001bSIan Rogers        "PublicDescription": "This event counts the number of instructions that retire execution. For instructions that consist of multiple micro-ops, this event counts the retirement of the last micro-op of the instruction. The counter continues counting during hardware interrupts, traps, and inside interrupt handlers.",
193a2f6001bSIan Rogers        "SampleAfterValue": "2000003"
194a2f6001bSIan Rogers    },
195a2f6001bSIan Rogers    {
196a2f6001bSIan Rogers        "BriefDescription": "Counts all machine clears",
197a2f6001bSIan Rogers        "EventCode": "0xC3",
1981b097845SAndi Kleen        "EventName": "MACHINE_CLEARS.ALL",
199a2f6001bSIan Rogers        "PublicDescription": "Machine clears happen when something happens in the machine that causes the hardware to need to take special care to get the right answer. When such a condition is signaled on an instruction, the front end of the machine is notified that it must restart, so no more instructions will be decoded from the current path.  All instructions \"older\" than this one will be allowed to finish.  This instruction and all \"younger\" instructions must be cleared, since they must not be allowed to complete.  Essentially, the hardware waits until the problematic instruction is the oldest instruction in the machine.  This means all older instructions are retired, and all pending stores (from older instructions) are completed.  Then the new path of instructions from the front end are allowed to start into the machine.  There are many conditions that might cause a machine clear (including the receipt of an interrupt, or a trap or a fault).  All those conditions (including but not limited to MACHINE_CLEARS.MEMORY_ORDERING, MACHINE_CLEARS.SMC, and MACHINE_CLEARS.FP_ASSIST) are captured in the ANY event. In addition, some conditions can be specifically counted (i.e. SMC, MEMORY_ORDERING, FP_ASSIST).  However, the sum of SMC, MEMORY_ORDERING, and FP_ASSIST machine clears will not necessarily equal the number of ANY.",
2001b097845SAndi Kleen        "SampleAfterValue": "200003",
201a2f6001bSIan Rogers        "UMask": "0x8"
2021b097845SAndi Kleen    },
2031b097845SAndi Kleen    {
204a2f6001bSIan Rogers        "BriefDescription": "Self-Modifying Code detected",
205a2f6001bSIan Rogers        "EventCode": "0xC3",
206a2f6001bSIan Rogers        "EventName": "MACHINE_CLEARS.SMC",
207a2f6001bSIan Rogers        "PublicDescription": "This event counts the number of times that a program writes to a code section. Self-modifying code causes a severe penalty in all Intel? architecture processors.",
2081b097845SAndi Kleen        "SampleAfterValue": "200003",
209a2f6001bSIan Rogers        "UMask": "0x1"
2101b097845SAndi Kleen    },
2111b097845SAndi Kleen    {
212a2f6001bSIan Rogers        "BriefDescription": "Counts the number of cycles when no uops are allocated for any reason.",
213a2f6001bSIan Rogers        "EventCode": "0xCA",
214a2f6001bSIan Rogers        "EventName": "NO_ALLOC_CYCLES.ALL",
215a2f6001bSIan Rogers        "PublicDescription": "The NO_ALLOC_CYCLES.ALL event counts the number of cycles when the front-end does not provide any instructions to be allocated for any reason. This event indicates the cycles where an allocation stalls occurs, and no UOPS are allocated in that cycle.",
216a2f6001bSIan Rogers        "SampleAfterValue": "200003",
217a2f6001bSIan Rogers        "UMask": "0x3f"
218a2f6001bSIan Rogers    },
219a2f6001bSIan Rogers    {
220a2f6001bSIan Rogers        "BriefDescription": "Counts the number of cycles when no uops are allocated and the alloc pipe is stalled waiting for a mispredicted jump to retire.  After the misprediction is detected, the front end will start immediately but the allocate pipe stalls until the mispredicted",
221a2f6001bSIan Rogers        "EventCode": "0xCA",
2221b097845SAndi Kleen        "EventName": "NO_ALLOC_CYCLES.MISPREDICTS",
223a2f6001bSIan Rogers        "PublicDescription": "Counts the number of cycles when no uops are allocated and the alloc pipe is stalled waiting for a mispredicted jump to retire.  After the misprediction is detected, the front end will start immediately but the allocate pipe stalls until the mispredicted.",
2241b097845SAndi Kleen        "SampleAfterValue": "200003",
225a2f6001bSIan Rogers        "UMask": "0x4"
2261b097845SAndi Kleen    },
2271b097845SAndi Kleen    {
228a2f6001bSIan Rogers        "BriefDescription": "Counts the number of cycles when no uops are allocated, the IQ is empty, and no other condition is blocking allocation.",
229a2f6001bSIan Rogers        "EventCode": "0xCA",
230a2f6001bSIan Rogers        "EventName": "NO_ALLOC_CYCLES.NOT_DELIVERED",
231*c3fdd79dSIan Rogers        "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.",
232a2f6001bSIan Rogers        "SampleAfterValue": "200003",
233a2f6001bSIan Rogers        "UMask": "0x50"
234a2f6001bSIan Rogers    },
235a2f6001bSIan Rogers    {
236a2f6001bSIan Rogers        "BriefDescription": "Counts the number of cycles when no uops are allocated and a RATstall is asserted.",
237a2f6001bSIan Rogers        "EventCode": "0xCA",
2381b097845SAndi Kleen        "EventName": "NO_ALLOC_CYCLES.RAT_STALL",
2391b097845SAndi Kleen        "SampleAfterValue": "200003",
240a2f6001bSIan Rogers        "UMask": "0x20"
2411b097845SAndi Kleen    },
2421b097845SAndi Kleen    {
243a2f6001bSIan Rogers        "BriefDescription": "Counts the number of cycles when no uops are allocated and the ROB is full (less than 2 entries available)",
2441b097845SAndi Kleen        "EventCode": "0xCA",
245a2f6001bSIan Rogers        "EventName": "NO_ALLOC_CYCLES.ROB_FULL",
246a2f6001bSIan Rogers        "PublicDescription": "Counts the number of cycles when no uops are allocated and the ROB is full (less than 2 entries available).",
2471b097845SAndi Kleen        "SampleAfterValue": "200003",
248a2f6001bSIan Rogers        "UMask": "0x1"
2491b097845SAndi Kleen    },
2501b097845SAndi Kleen    {
251a2f6001bSIan Rogers        "BriefDescription": "Counts the number of cycles the Alloc pipeline is stalled when any one of the RSs (IEC, FPC and MEC) is full. This event is a superset of all the individual RS stall event counts.",
2521b097845SAndi Kleen        "EventCode": "0xCB",
2531b097845SAndi Kleen        "EventName": "RS_FULL_STALL.ALL",
2541b097845SAndi Kleen        "SampleAfterValue": "200003",
255a2f6001bSIan Rogers        "UMask": "0x1f"
2561b097845SAndi Kleen    },
2571b097845SAndi Kleen    {
258a2f6001bSIan Rogers        "BriefDescription": "Counts the number of cycles and allocation pipeline is stalled and is waiting for a free MEC reservation station entry.  The cycles should be appropriately counted in case of the cracked ops e.g. In case of a cracked load-op, the load portion is sent to M",
259a2f6001bSIan Rogers        "EventCode": "0xCB",
260a2f6001bSIan Rogers        "EventName": "RS_FULL_STALL.MEC",
261a2f6001bSIan Rogers        "PublicDescription": "Counts the number of cycles and allocation pipeline is stalled and is waiting for a free MEC reservation station entry.  The cycles should be appropriately counted in case of the cracked ops e.g. In case of a cracked load-op, the load portion is sent to M.",
2621b097845SAndi Kleen        "SampleAfterValue": "200003",
263a2f6001bSIan Rogers        "UMask": "0x1"
2641b097845SAndi Kleen    },
2651b097845SAndi Kleen    {
266a2f6001bSIan Rogers        "BriefDescription": "Micro-ops retired",
267a2f6001bSIan Rogers        "EventCode": "0xC2",
268a2f6001bSIan Rogers        "EventName": "UOPS_RETIRED.ALL",
269a2f6001bSIan Rogers        "PublicDescription": "This event counts the number of micro-ops retired. The processor decodes complex macro instructions into a sequence of simpler micro-ops. Most instructions are composed of one or two micro-ops. Some instructions are decoded into longer sequences such as repeat instructions, floating point transcendental instructions, and assists. In some cases micro-op sequences are fused or whole instructions are fused into one micro-op. See other UOPS_RETIRED events for differentiating retired fused and non-fused micro-ops.",
270a2f6001bSIan Rogers        "SampleAfterValue": "2000003",
271a2f6001bSIan Rogers        "UMask": "0x10"
2721b097845SAndi Kleen    },
2731b097845SAndi Kleen    {
274a2f6001bSIan Rogers        "BriefDescription": "MSROM micro-ops retired",
275a2f6001bSIan Rogers        "EventCode": "0xC2",
276a2f6001bSIan Rogers        "EventName": "UOPS_RETIRED.MS",
277a2f6001bSIan Rogers        "PublicDescription": "This event counts the number of micro-ops retired that were supplied from MSROM.",
278a2f6001bSIan Rogers        "SampleAfterValue": "2000003",
279a2f6001bSIan Rogers        "UMask": "0x1"
2801b097845SAndi Kleen    }
2811b097845SAndi Kleen]
282