Intel 64 and IA-32 Architectures Software Developers Manual Volume 3B, System Programming Guide Part 2

Table Of Contents
Vol. 3 18-57
DEBUGGING AND PERFORMANCE MONITORING
A processor that supports architectural performance monitoring may not support all
the predefined architectural performance events (Table 18-10). The non-zero bits in
CPUID.0AH:EBX indicate the events that are available.
The behavior of each architectural performance event is expected to be consistent on
all processors that support that event. Minor variations between microarchitectures
are noted below:
UnHalted Core Cycles Event select 3CH, Umask 00H
This event counts core clock cycles when the clock signal on a specific core is
running (not halted). The counter does not advance in the following conditions:
an ACPI C-state other than C0 for normal operation
—HLT
STPCLK# pin asserted
being throttled by TM1
during the frequency switching phase of a performance state transition (see
Chapter 13, “Power and Thermal Management”)
The performance counter for this event counts across performance state
transitions using different core clock frequencies
Instructions Retired Event select C0H, Umask 00H
This event counts the number of instructions at retirement. For instructions that
consist of multiple micro-ops, this event counts the retirement of the last micro-
op of the instruction. An instruction with a REP prefix counts as one instruction
(not per iteration). Faults before the retirement of the last micro-op of a multi-
ops instruction are not counted.
This event does not increment under VM-exit conditions. Counters continue
counting during hardware interrupts, traps, and inside interrupt handlers.
UnHalted Reference Cycles — Event select 3CH, Umask 01H
Table 18-10. UMask and Event Select Encodings for Pre-Defined
Architectural Performance Events
Bit Position
CPUID.AH.EBX
Event Name UMask Event Select
0 UnHalted Core Cycles 00H 3CH
1 Instruction Retired 00H C0H
2 UnHalted Reference Cycles 01H 3CH
3LLC Reference 4FH 2EH
4 LLC Misses 41H 2EH
5 Branch Instruction Retired 00H C4H
6 Branch Misses Retired 00H C5H