1959826caSMatt Macy[ 2959826caSMatt Macy { 3*18054d02SAlexander Motin "BriefDescription": "Counts the number of branch instructions retired...", 4*18054d02SAlexander Motin "Counter": "0,1", 5*18054d02SAlexander Motin "EventCode": "0xC4", 6*18054d02SAlexander Motin "EventName": "BR_INST_RETIRED.ALL_BRANCHES", 7959826caSMatt Macy "PEBS": "1", 8959826caSMatt Macy "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.", 9*18054d02SAlexander Motin "SampleAfterValue": "200003" 10959826caSMatt Macy }, 11959826caSMatt Macy { 12*18054d02SAlexander Motin "BriefDescription": "Counts the number of taken branch instructions retired", 13959826caSMatt Macy "Counter": "0,1", 14*18054d02SAlexander Motin "EventCode": "0xC4", 15*18054d02SAlexander Motin "EventName": "BR_INST_RETIRED.ALL_TAKEN_BRANCHES", 16*18054d02SAlexander Motin "PEBS": "2", 17*18054d02SAlexander Motin "PEBScounters": "0,1", 18*18054d02SAlexander Motin "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.", 19959826caSMatt Macy "SampleAfterValue": "200003", 20*18054d02SAlexander Motin "UMask": "0x80" 21959826caSMatt Macy }, 22959826caSMatt Macy { 23*18054d02SAlexander Motin "BriefDescription": "Counts the number of near CALL branch instructions retired", 24959826caSMatt Macy "Counter": "0,1", 25*18054d02SAlexander Motin "EventCode": "0xC4", 26*18054d02SAlexander Motin "EventName": "BR_INST_RETIRED.CALL", 27959826caSMatt Macy "PEBS": "1", 28959826caSMatt Macy "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.", 29959826caSMatt Macy "SampleAfterValue": "200003", 30*18054d02SAlexander Motin "UMask": "0xf9" 31959826caSMatt Macy }, 32959826caSMatt Macy { 33*18054d02SAlexander Motin "BriefDescription": "Counts the number of far branch instructions retired", 34959826caSMatt Macy "Counter": "0,1", 35959826caSMatt Macy "EventCode": "0xC4", 36*18054d02SAlexander Motin "EventName": "BR_INST_RETIRED.FAR_BRANCH", 37959826caSMatt Macy "PEBS": "1", 38959826caSMatt Macy "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.", 39959826caSMatt Macy "SampleAfterValue": "200003", 40*18054d02SAlexander Motin "UMask": "0xbf" 41959826caSMatt Macy }, 42959826caSMatt Macy { 43*18054d02SAlexander Motin "BriefDescription": "Counts the number of near indirect CALL branch instructions retired", 44*18054d02SAlexander Motin "Counter": "0,1", 45*18054d02SAlexander Motin "EventCode": "0xC4", 46*18054d02SAlexander Motin "EventName": "BR_INST_RETIRED.IND_CALL", 47*18054d02SAlexander Motin "PEBS": "1", 48*18054d02SAlexander Motin "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.", 49*18054d02SAlexander Motin "SampleAfterValue": "200003", 50*18054d02SAlexander Motin "UMask": "0xfb" 51*18054d02SAlexander Motin }, 52*18054d02SAlexander Motin { 53*18054d02SAlexander Motin "BriefDescription": "Counts the number of JCC branch instructions retired", 54*18054d02SAlexander Motin "Counter": "0,1", 55*18054d02SAlexander Motin "EventCode": "0xC4", 56*18054d02SAlexander Motin "EventName": "BR_INST_RETIRED.JCC", 57*18054d02SAlexander Motin "PEBS": "1", 58*18054d02SAlexander Motin "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.", 59*18054d02SAlexander Motin "SampleAfterValue": "200003", 60*18054d02SAlexander Motin "UMask": "0x7e" 61*18054d02SAlexander Motin }, 62*18054d02SAlexander Motin { 63*18054d02SAlexander Motin "BriefDescription": "Counts the number of near indirect JMP and near indirect CALL branch instructions retired", 64*18054d02SAlexander Motin "Counter": "0,1", 65*18054d02SAlexander Motin "EventCode": "0xC4", 66*18054d02SAlexander Motin "EventName": "BR_INST_RETIRED.NON_RETURN_IND", 67*18054d02SAlexander Motin "PEBS": "1", 68*18054d02SAlexander Motin "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.", 69*18054d02SAlexander Motin "SampleAfterValue": "200003", 70*18054d02SAlexander Motin "UMask": "0xeb" 71*18054d02SAlexander Motin }, 72*18054d02SAlexander Motin { 73*18054d02SAlexander Motin "BriefDescription": "Counts the number of near relative CALL branch instructions retired", 74*18054d02SAlexander Motin "Counter": "0,1", 75*18054d02SAlexander Motin "EventCode": "0xC4", 76*18054d02SAlexander Motin "EventName": "BR_INST_RETIRED.REL_CALL", 77*18054d02SAlexander Motin "PEBS": "1", 78*18054d02SAlexander Motin "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.", 79*18054d02SAlexander Motin "SampleAfterValue": "200003", 80*18054d02SAlexander Motin "UMask": "0xfd" 81*18054d02SAlexander Motin }, 82*18054d02SAlexander Motin { 83*18054d02SAlexander Motin "BriefDescription": "Counts the number of near RET branch instructions retired", 84*18054d02SAlexander Motin "Counter": "0,1", 85*18054d02SAlexander Motin "EventCode": "0xC4", 86*18054d02SAlexander Motin "EventName": "BR_INST_RETIRED.RETURN", 87*18054d02SAlexander Motin "PEBS": "1", 88*18054d02SAlexander Motin "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.", 89*18054d02SAlexander Motin "SampleAfterValue": "200003", 90*18054d02SAlexander Motin "UMask": "0xf7" 91*18054d02SAlexander Motin }, 92*18054d02SAlexander Motin { 93*18054d02SAlexander Motin "BriefDescription": "Counts the number of taken JCC branch instructions retired", 94*18054d02SAlexander Motin "Counter": "0,1", 95*18054d02SAlexander Motin "EventCode": "0xC4", 96*18054d02SAlexander Motin "EventName": "BR_INST_RETIRED.TAKEN_JCC", 97*18054d02SAlexander Motin "PEBS": "1", 98*18054d02SAlexander Motin "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.", 99*18054d02SAlexander Motin "SampleAfterValue": "200003", 100*18054d02SAlexander Motin "UMask": "0xfe" 101*18054d02SAlexander Motin }, 102*18054d02SAlexander Motin { 103*18054d02SAlexander Motin "BriefDescription": "Counts the number of mispredicted branch instructions retired", 104*18054d02SAlexander Motin "Counter": "0,1", 105*18054d02SAlexander Motin "EventCode": "0xC5", 106*18054d02SAlexander Motin "EventName": "BR_MISP_RETIRED.ALL_BRANCHES", 107959826caSMatt Macy "PEBS": "1", 108959826caSMatt Macy "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.", 109*18054d02SAlexander Motin "SampleAfterValue": "200003" 110959826caSMatt Macy }, 111959826caSMatt Macy { 112*18054d02SAlexander Motin "BriefDescription": "Counts the number of mispredicted near indirect CALL branch instructions retired", 113959826caSMatt Macy "Counter": "0,1", 114959826caSMatt Macy "EventCode": "0xC5", 115*18054d02SAlexander Motin "EventName": "BR_MISP_RETIRED.IND_CALL", 116959826caSMatt Macy "PEBS": "1", 117959826caSMatt Macy "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.", 118959826caSMatt Macy "SampleAfterValue": "200003", 119*18054d02SAlexander Motin "UMask": "0xfb" 120959826caSMatt Macy }, 121959826caSMatt Macy { 122*18054d02SAlexander Motin "BriefDescription": "Counts the number of mispredicted JCC branch instructions retired", 123*18054d02SAlexander Motin "Counter": "0,1", 124*18054d02SAlexander Motin "EventCode": "0xC5", 125*18054d02SAlexander Motin "EventName": "BR_MISP_RETIRED.JCC", 126959826caSMatt Macy "PEBS": "1", 127*18054d02SAlexander Motin "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.", 128959826caSMatt Macy "SampleAfterValue": "200003", 129*18054d02SAlexander Motin "UMask": "0x7e" 130959826caSMatt Macy }, 131959826caSMatt Macy { 132*18054d02SAlexander Motin "BriefDescription": "Counts the number of mispredicted near indirect JMP and near indirect CALL branch instructions retired", 133*18054d02SAlexander Motin "Counter": "0,1", 134*18054d02SAlexander Motin "EventCode": "0xC5", 135*18054d02SAlexander Motin "EventName": "BR_MISP_RETIRED.NON_RETURN_IND", 136959826caSMatt Macy "PEBS": "1", 137959826caSMatt Macy "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.", 138*18054d02SAlexander Motin "SampleAfterValue": "200003", 139*18054d02SAlexander Motin "UMask": "0xeb" 140*18054d02SAlexander Motin }, 141*18054d02SAlexander Motin { 142*18054d02SAlexander Motin "BriefDescription": "Counts the number of mispredicted near RET branch instructions retired", 143*18054d02SAlexander Motin "Counter": "0,1", 144959826caSMatt Macy "EventCode": "0xC5", 145*18054d02SAlexander Motin "EventName": "BR_MISP_RETIRED.RETURN", 146*18054d02SAlexander Motin "PEBS": "1", 147*18054d02SAlexander Motin "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.", 148959826caSMatt Macy "SampleAfterValue": "200003", 149*18054d02SAlexander Motin "UMask": "0xf7" 150959826caSMatt Macy }, 151959826caSMatt Macy { 152*18054d02SAlexander Motin "BriefDescription": "Counts the number of mispredicted taken JCC branch instructions retired", 153959826caSMatt Macy "Counter": "0,1", 154*18054d02SAlexander Motin "EventCode": "0xC5", 155*18054d02SAlexander Motin "EventName": "BR_MISP_RETIRED.TAKEN_JCC", 156*18054d02SAlexander Motin "PEBS": "1", 157*18054d02SAlexander Motin "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.", 158*18054d02SAlexander Motin "SampleAfterValue": "200003", 159*18054d02SAlexander Motin "UMask": "0xfe" 160*18054d02SAlexander Motin }, 161*18054d02SAlexander Motin { 162*18054d02SAlexander Motin "BriefDescription": "Fixed Counter: Counts the number of unhalted core clock cycles", 163*18054d02SAlexander Motin "Counter": "Fixed counter 2", 164*18054d02SAlexander Motin "EventName": "CPU_CLK_UNHALTED.CORE", 165*18054d02SAlexander Motin "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.", 166959826caSMatt Macy "SampleAfterValue": "2000003", 167*18054d02SAlexander Motin "UMask": "0x2" 168959826caSMatt Macy }, 169959826caSMatt Macy { 170*18054d02SAlexander Motin "BriefDescription": "Core cycles when core is not halted", 171959826caSMatt Macy "Counter": "0,1", 172*18054d02SAlexander Motin "EventCode": "0x3C", 173*18054d02SAlexander Motin "EventName": "CPU_CLK_UNHALTED.CORE_P", 174*18054d02SAlexander Motin "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.", 175*18054d02SAlexander Motin "SampleAfterValue": "2000003" 176*18054d02SAlexander Motin }, 177*18054d02SAlexander Motin { 178*18054d02SAlexander Motin "BriefDescription": "Reference cycles when core is not halted", 179*18054d02SAlexander Motin "Counter": "0,1", 180*18054d02SAlexander Motin "EventCode": "0x3C", 181*18054d02SAlexander Motin "EventName": "CPU_CLK_UNHALTED.REF", 182*18054d02SAlexander Motin "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.", 183959826caSMatt Macy "SampleAfterValue": "2000003", 184*18054d02SAlexander Motin "UMask": "0x1" 185959826caSMatt Macy }, 186959826caSMatt Macy { 187*18054d02SAlexander Motin "BriefDescription": "Fixed Counter: Counts the number of unhalted reference clock cycles", 188*18054d02SAlexander Motin "Counter": "Fixed counter 3", 189*18054d02SAlexander Motin "EventName": "CPU_CLK_UNHALTED.REF_TSC", 190*18054d02SAlexander Motin "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.", 191*18054d02SAlexander Motin "SampleAfterValue": "2000003", 192*18054d02SAlexander Motin "UMask": "0x3" 193959826caSMatt Macy }, 194959826caSMatt Macy { 195*18054d02SAlexander Motin "BriefDescription": "Cycles the divider is busy. Does not imply a stall waiting for the divider.", 196959826caSMatt Macy "Counter": "0,1", 197*18054d02SAlexander Motin "EventCode": "0xCD", 198*18054d02SAlexander Motin "EventName": "CYCLES_DIV_BUSY.ALL", 199*18054d02SAlexander Motin "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.", 200*18054d02SAlexander Motin "SampleAfterValue": "2000003", 201*18054d02SAlexander Motin "UMask": "0x1" 202959826caSMatt Macy }, 203959826caSMatt Macy { 204*18054d02SAlexander Motin "BriefDescription": "Fixed Counter: Counts the number of instructions retired", 205*18054d02SAlexander Motin "Counter": "Fixed counter 1", 206*18054d02SAlexander Motin "EventName": "INST_RETIRED.ANY", 207*18054d02SAlexander Motin "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.", 208*18054d02SAlexander Motin "SampleAfterValue": "2000003", 209*18054d02SAlexander Motin "UMask": "0x1" 210*18054d02SAlexander Motin }, 211*18054d02SAlexander Motin { 212*18054d02SAlexander Motin "BriefDescription": "Instructions retired", 213959826caSMatt Macy "Counter": "0,1", 214*18054d02SAlexander Motin "EventCode": "0xC0", 215*18054d02SAlexander Motin "EventName": "INST_RETIRED.ANY_P", 216*18054d02SAlexander Motin "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.", 217*18054d02SAlexander Motin "SampleAfterValue": "2000003" 218*18054d02SAlexander Motin }, 219*18054d02SAlexander Motin { 220*18054d02SAlexander Motin "BriefDescription": "Counts all machine clears", 221*18054d02SAlexander Motin "Counter": "0,1", 222*18054d02SAlexander Motin "EventCode": "0xC3", 223959826caSMatt Macy "EventName": "MACHINE_CLEARS.ALL", 224*18054d02SAlexander Motin "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.", 225959826caSMatt Macy "SampleAfterValue": "200003", 226*18054d02SAlexander Motin "UMask": "0x8" 227959826caSMatt Macy }, 228959826caSMatt Macy { 229*18054d02SAlexander Motin "BriefDescription": "Self-Modifying Code detected", 230959826caSMatt Macy "Counter": "0,1", 231*18054d02SAlexander Motin "EventCode": "0xC3", 232*18054d02SAlexander Motin "EventName": "MACHINE_CLEARS.SMC", 233*18054d02SAlexander Motin "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.", 234959826caSMatt Macy "SampleAfterValue": "200003", 235*18054d02SAlexander Motin "UMask": "0x1" 236959826caSMatt Macy }, 237959826caSMatt Macy { 238*18054d02SAlexander Motin "BriefDescription": "Counts the number of cycles when no uops are allocated for any reason.", 239959826caSMatt Macy "Counter": "0,1", 240*18054d02SAlexander Motin "EventCode": "0xCA", 241*18054d02SAlexander Motin "EventName": "NO_ALLOC_CYCLES.ALL", 242*18054d02SAlexander Motin "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.", 243*18054d02SAlexander Motin "SampleAfterValue": "200003", 244*18054d02SAlexander Motin "UMask": "0x3f" 245*18054d02SAlexander Motin }, 246*18054d02SAlexander Motin { 247*18054d02SAlexander Motin "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", 248*18054d02SAlexander Motin "Counter": "0,1", 249*18054d02SAlexander Motin "EventCode": "0xCA", 250959826caSMatt Macy "EventName": "NO_ALLOC_CYCLES.MISPREDICTS", 251*18054d02SAlexander Motin "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.", 252959826caSMatt Macy "SampleAfterValue": "200003", 253*18054d02SAlexander Motin "UMask": "0x4" 254959826caSMatt Macy }, 255959826caSMatt Macy { 256*18054d02SAlexander Motin "BriefDescription": "Counts the number of cycles when no uops are allocated, the IQ is empty, and no other condition is blocking allocation.", 257959826caSMatt Macy "Counter": "0,1", 258*18054d02SAlexander Motin "EventCode": "0xCA", 259*18054d02SAlexander Motin "EventName": "NO_ALLOC_CYCLES.NOT_DELIVERED", 260*18054d02SAlexander Motin "PublicDescription": "The NO_ALLOC_CYCLES.NOT_DELIVERED event is used to measure front-end inefficiencies, i.e. when front-end of the machine is not delivering micro-ops to the back-end and the back-end is not stalled. This event can be used to identify if the machine is truly front-end bound. When this event occurs, it is an indication that the front-end of the machine is operating at less than its theoretical peak performance. Background: We can think of the processor pipeline as being divided into 2 broader parts: Front-end and Back-end. Front-end is responsible for fetching the instruction, decoding into micro-ops (uops) in machine understandable format and putting them into a micro-op queue to be consumed by back end. The back-end then takes these micro-ops, allocates the required resources. When all resources are ready, micro-ops are executed. If the back-end is not ready to accept micro-ops from the front-end, then we do not want to count these as front-end bottlenecks. However, whenever we have bottlenecks in the back-end, we will have allocation unit stalls and eventually forcing the front-end to wait until the back-end is ready to receive more UOPS. This event counts the cycles only when back-end is requesting more uops and front-end is not able to provide them. Some examples of conditions that cause front-end efficiencies are: Icache misses, ITLB misses, and decoder restrictions that limit the the front-end bandwidth.", 261*18054d02SAlexander Motin "SampleAfterValue": "200003", 262*18054d02SAlexander Motin "UMask": "0x50" 263*18054d02SAlexander Motin }, 264*18054d02SAlexander Motin { 265*18054d02SAlexander Motin "BriefDescription": "Counts the number of cycles when no uops are allocated and a RATstall is asserted.", 266*18054d02SAlexander Motin "Counter": "0,1", 267*18054d02SAlexander Motin "EventCode": "0xCA", 268959826caSMatt Macy "EventName": "NO_ALLOC_CYCLES.RAT_STALL", 269959826caSMatt Macy "SampleAfterValue": "200003", 270*18054d02SAlexander Motin "UMask": "0x20" 271959826caSMatt Macy }, 272959826caSMatt Macy { 273*18054d02SAlexander Motin "BriefDescription": "Counts the number of cycles when no uops are allocated and the ROB is full (less than 2 entries available)", 274*18054d02SAlexander Motin "Counter": "0,1", 275959826caSMatt Macy "EventCode": "0xCA", 276*18054d02SAlexander Motin "EventName": "NO_ALLOC_CYCLES.ROB_FULL", 277*18054d02SAlexander Motin "PublicDescription": "Counts the number of cycles when no uops are allocated and the ROB is full (less than 2 entries available).", 278959826caSMatt Macy "SampleAfterValue": "200003", 279*18054d02SAlexander Motin "UMask": "0x1" 280959826caSMatt Macy }, 281959826caSMatt Macy { 282*18054d02SAlexander Motin "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.", 283959826caSMatt Macy "Counter": "0,1", 284959826caSMatt Macy "EventCode": "0xCB", 285959826caSMatt Macy "EventName": "RS_FULL_STALL.ALL", 286959826caSMatt Macy "SampleAfterValue": "200003", 287*18054d02SAlexander Motin "UMask": "0x1f" 288959826caSMatt Macy }, 289959826caSMatt Macy { 290*18054d02SAlexander Motin "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", 291959826caSMatt Macy "Counter": "0,1", 292*18054d02SAlexander Motin "EventCode": "0xCB", 293*18054d02SAlexander Motin "EventName": "RS_FULL_STALL.MEC", 294*18054d02SAlexander Motin "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.", 295959826caSMatt Macy "SampleAfterValue": "200003", 296*18054d02SAlexander Motin "UMask": "0x1" 297959826caSMatt Macy }, 298959826caSMatt Macy { 299*18054d02SAlexander Motin "BriefDescription": "Micro-ops retired", 300959826caSMatt Macy "Counter": "0,1", 301*18054d02SAlexander Motin "EventCode": "0xC2", 302*18054d02SAlexander Motin "EventName": "UOPS_RETIRED.ALL", 303*18054d02SAlexander Motin "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.", 304*18054d02SAlexander Motin "SampleAfterValue": "2000003", 305*18054d02SAlexander Motin "UMask": "0x10" 306959826caSMatt Macy }, 307959826caSMatt Macy { 308*18054d02SAlexander Motin "BriefDescription": "MSROM micro-ops retired", 309959826caSMatt Macy "Counter": "0,1", 310*18054d02SAlexander Motin "EventCode": "0xC2", 311*18054d02SAlexander Motin "EventName": "UOPS_RETIRED.MS", 312*18054d02SAlexander Motin "PublicDescription": "This event counts the number of micro-ops retired that were supplied from MSROM.", 313*18054d02SAlexander Motin "SampleAfterValue": "2000003", 314*18054d02SAlexander Motin "UMask": "0x1" 315959826caSMatt Macy } 316959826caSMatt Macy]