1[ 2 { 3 "BriefDescription": "Counts the number of branch instructions retired...", 4 "EventCode": "0xC4", 5 "EventName": "BR_INST_RETIRED.ALL_BRANCHES", 6 "PEBS": "1", 7 "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.", 8 "SampleAfterValue": "200003" 9 }, 10 { 11 "BriefDescription": "Counts the number of taken branch instructions retired", 12 "EventCode": "0xC4", 13 "EventName": "BR_INST_RETIRED.ALL_TAKEN_BRANCHES", 14 "PEBS": "2", 15 "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.", 16 "SampleAfterValue": "200003", 17 "UMask": "0x80" 18 }, 19 { 20 "BriefDescription": "Counts the number of near CALL branch instructions retired", 21 "EventCode": "0xC4", 22 "EventName": "BR_INST_RETIRED.CALL", 23 "PEBS": "1", 24 "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.", 25 "SampleAfterValue": "200003", 26 "UMask": "0xf9" 27 }, 28 { 29 "BriefDescription": "Counts the number of far branch instructions retired", 30 "EventCode": "0xC4", 31 "EventName": "BR_INST_RETIRED.FAR_BRANCH", 32 "PEBS": "1", 33 "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.", 34 "SampleAfterValue": "200003", 35 "UMask": "0xbf" 36 }, 37 { 38 "BriefDescription": "Counts the number of near indirect CALL branch instructions retired", 39 "EventCode": "0xC4", 40 "EventName": "BR_INST_RETIRED.IND_CALL", 41 "PEBS": "1", 42 "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.", 43 "SampleAfterValue": "200003", 44 "UMask": "0xfb" 45 }, 46 { 47 "BriefDescription": "Counts the number of JCC branch instructions retired", 48 "EventCode": "0xC4", 49 "EventName": "BR_INST_RETIRED.JCC", 50 "PEBS": "1", 51 "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.", 52 "SampleAfterValue": "200003", 53 "UMask": "0x7e" 54 }, 55 { 56 "BriefDescription": "Counts the number of near indirect JMP and near indirect CALL branch instructions retired", 57 "EventCode": "0xC4", 58 "EventName": "BR_INST_RETIRED.NON_RETURN_IND", 59 "PEBS": "1", 60 "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.", 61 "SampleAfterValue": "200003", 62 "UMask": "0xeb" 63 }, 64 { 65 "BriefDescription": "Counts the number of near relative CALL branch instructions retired", 66 "EventCode": "0xC4", 67 "EventName": "BR_INST_RETIRED.REL_CALL", 68 "PEBS": "1", 69 "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.", 70 "SampleAfterValue": "200003", 71 "UMask": "0xfd" 72 }, 73 { 74 "BriefDescription": "Counts the number of near RET branch instructions retired", 75 "EventCode": "0xC4", 76 "EventName": "BR_INST_RETIRED.RETURN", 77 "PEBS": "1", 78 "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.", 79 "SampleAfterValue": "200003", 80 "UMask": "0xf7" 81 }, 82 { 83 "BriefDescription": "Counts the number of taken JCC branch instructions retired", 84 "EventCode": "0xC4", 85 "EventName": "BR_INST_RETIRED.TAKEN_JCC", 86 "PEBS": "1", 87 "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.", 88 "SampleAfterValue": "200003", 89 "UMask": "0xfe" 90 }, 91 { 92 "BriefDescription": "Counts the number of mispredicted branch instructions retired", 93 "EventCode": "0xC5", 94 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES", 95 "PEBS": "1", 96 "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.", 97 "SampleAfterValue": "200003" 98 }, 99 { 100 "BriefDescription": "Counts the number of mispredicted near indirect CALL branch instructions retired", 101 "EventCode": "0xC5", 102 "EventName": "BR_MISP_RETIRED.IND_CALL", 103 "PEBS": "1", 104 "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.", 105 "SampleAfterValue": "200003", 106 "UMask": "0xfb" 107 }, 108 { 109 "BriefDescription": "Counts the number of mispredicted JCC branch instructions retired", 110 "EventCode": "0xC5", 111 "EventName": "BR_MISP_RETIRED.JCC", 112 "PEBS": "1", 113 "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.", 114 "SampleAfterValue": "200003", 115 "UMask": "0x7e" 116 }, 117 { 118 "BriefDescription": "Counts the number of mispredicted near indirect JMP and near indirect CALL branch instructions retired", 119 "EventCode": "0xC5", 120 "EventName": "BR_MISP_RETIRED.NON_RETURN_IND", 121 "PEBS": "1", 122 "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.", 123 "SampleAfterValue": "200003", 124 "UMask": "0xeb" 125 }, 126 { 127 "BriefDescription": "Counts the number of mispredicted near RET branch instructions retired", 128 "EventCode": "0xC5", 129 "EventName": "BR_MISP_RETIRED.RETURN", 130 "PEBS": "1", 131 "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.", 132 "SampleAfterValue": "200003", 133 "UMask": "0xf7" 134 }, 135 { 136 "BriefDescription": "Counts the number of mispredicted taken JCC branch instructions retired", 137 "EventCode": "0xC5", 138 "EventName": "BR_MISP_RETIRED.TAKEN_JCC", 139 "PEBS": "1", 140 "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.", 141 "SampleAfterValue": "200003", 142 "UMask": "0xfe" 143 }, 144 { 145 "BriefDescription": "Fixed Counter: Counts the number of unhalted core clock cycles", 146 "EventName": "CPU_CLK_UNHALTED.CORE", 147 "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.", 148 "SampleAfterValue": "2000003", 149 "UMask": "0x2" 150 }, 151 { 152 "BriefDescription": "Core cycles when core is not halted", 153 "EventCode": "0x3C", 154 "EventName": "CPU_CLK_UNHALTED.CORE_P", 155 "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.", 156 "SampleAfterValue": "2000003" 157 }, 158 { 159 "BriefDescription": "Reference cycles when core is not halted", 160 "EventCode": "0x3C", 161 "EventName": "CPU_CLK_UNHALTED.REF", 162 "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.", 163 "SampleAfterValue": "2000003", 164 "UMask": "0x1" 165 }, 166 { 167 "BriefDescription": "Fixed Counter: Counts the number of unhalted reference clock cycles", 168 "EventName": "CPU_CLK_UNHALTED.REF_TSC", 169 "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.", 170 "SampleAfterValue": "2000003", 171 "UMask": "0x3" 172 }, 173 { 174 "BriefDescription": "Cycles the divider is busy. Does not imply a stall waiting for the divider.", 175 "EventCode": "0xCD", 176 "EventName": "CYCLES_DIV_BUSY.ALL", 177 "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.", 178 "SampleAfterValue": "2000003", 179 "UMask": "0x1" 180 }, 181 { 182 "BriefDescription": "Fixed Counter: Counts the number of instructions retired", 183 "EventName": "INST_RETIRED.ANY", 184 "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.", 185 "SampleAfterValue": "2000003", 186 "UMask": "0x1" 187 }, 188 { 189 "BriefDescription": "Instructions retired", 190 "EventCode": "0xC0", 191 "EventName": "INST_RETIRED.ANY_P", 192 "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.", 193 "SampleAfterValue": "2000003" 194 }, 195 { 196 "BriefDescription": "Counts all machine clears", 197 "EventCode": "0xC3", 198 "EventName": "MACHINE_CLEARS.ALL", 199 "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.", 200 "SampleAfterValue": "200003", 201 "UMask": "0x8" 202 }, 203 { 204 "BriefDescription": "Self-Modifying Code detected", 205 "EventCode": "0xC3", 206 "EventName": "MACHINE_CLEARS.SMC", 207 "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.", 208 "SampleAfterValue": "200003", 209 "UMask": "0x1" 210 }, 211 { 212 "BriefDescription": "Counts the number of cycles when no uops are allocated for any reason.", 213 "EventCode": "0xCA", 214 "EventName": "NO_ALLOC_CYCLES.ALL", 215 "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.", 216 "SampleAfterValue": "200003", 217 "UMask": "0x3f" 218 }, 219 { 220 "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", 221 "EventCode": "0xCA", 222 "EventName": "NO_ALLOC_CYCLES.MISPREDICTS", 223 "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.", 224 "SampleAfterValue": "200003", 225 "UMask": "0x4" 226 }, 227 { 228 "BriefDescription": "Counts the number of cycles when no uops are allocated, the IQ is empty, and no other condition is blocking allocation.", 229 "EventCode": "0xCA", 230 "EventName": "NO_ALLOC_CYCLES.NOT_DELIVERED", 231 "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.", 232 "SampleAfterValue": "200003", 233 "UMask": "0x50" 234 }, 235 { 236 "BriefDescription": "Counts the number of cycles when no uops are allocated and a RATstall is asserted.", 237 "EventCode": "0xCA", 238 "EventName": "NO_ALLOC_CYCLES.RAT_STALL", 239 "SampleAfterValue": "200003", 240 "UMask": "0x20" 241 }, 242 { 243 "BriefDescription": "Counts the number of cycles when no uops are allocated and the ROB is full (less than 2 entries available)", 244 "EventCode": "0xCA", 245 "EventName": "NO_ALLOC_CYCLES.ROB_FULL", 246 "PublicDescription": "Counts the number of cycles when no uops are allocated and the ROB is full (less than 2 entries available).", 247 "SampleAfterValue": "200003", 248 "UMask": "0x1" 249 }, 250 { 251 "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.", 252 "EventCode": "0xCB", 253 "EventName": "RS_FULL_STALL.ALL", 254 "SampleAfterValue": "200003", 255 "UMask": "0x1f" 256 }, 257 { 258 "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", 259 "EventCode": "0xCB", 260 "EventName": "RS_FULL_STALL.MEC", 261 "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.", 262 "SampleAfterValue": "200003", 263 "UMask": "0x1" 264 }, 265 { 266 "BriefDescription": "Micro-ops retired", 267 "EventCode": "0xC2", 268 "EventName": "UOPS_RETIRED.ALL", 269 "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.", 270 "SampleAfterValue": "2000003", 271 "UMask": "0x10" 272 }, 273 { 274 "BriefDescription": "MSROM micro-ops retired", 275 "EventCode": "0xC2", 276 "EventName": "UOPS_RETIRED.MS", 277 "PublicDescription": "This event counts the number of micro-ops retired that were supplied from MSROM.", 278 "SampleAfterValue": "2000003", 279 "UMask": "0x1" 280 } 281] 282