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

Table Of Contents
Vol. 3 18-127
DEBUGGING AND PERFORMANCE MONITORING
18.20.3 Incrementing the Time-Stamp Counter
The time-stamp counter increments when the clock signal on the system bus is
active and when the sleep pin is not asserted. The counter value can be read with the
RDTSC instruction.
The time-stamp counter and the non-sleep clockticks count may not agree in all
cases and for all processors. See Section 18.11, “Time-Stamp Counter,” for more
information on counter operation.
18.20.4 Non-Halted Reference Clockticks
Software can use either processor-specific performance monitor events (for
example: CPU_CLK_UNHALTED.BUS on processors based on the Intel Core microar-
chitecture, and equivalent event specifications on the Intel Core Duo and Intel Core
Solo processors) to count non-halted reference clockticks.
These events count reference clock cycles whenever the specified processor is not
halted. The counter counts reference cycles associated with a fixed-frequency clock
source irrespective of P-state, TM2, or frequency transitions that may occur to the
processor.
18.20.5 Cycle Counting and Opportunistic Processor Operation
As a result of the state transitions due to opportunistic processor performance oper-
ation (see Chapter 13, “Power and Thermal Management”), a logical processor or a
processor core can operate at frequency different from that indicated by the
processor’s maximum qualified frequency.
The following items are expected to hold true irrespective of when opportunistic
processor operation causes state transitions:
The time stamp counter operates at a fixed-rate frequency of the processor.
The IA32_MPERF counter increments at the same TSC frequency irrespective of
any transitions caused by opportunistic processor operation.
The IA32_FIXED_CTR2 counter increments at the same TSC frequency
irrespective of any transitions caused by opportunistic processor operation.
The Local APIC timer operation is unaffected by opportunistic processor
operation.
The TSC, IA32_MPERF, and IA32_FIXED_CTR2 operate at the same, maximum-
resolved frequency of the platform, which is equal to the product of scalable bus
frequency and maximum resolved bus ratio.
For processors based on Intel Core microarchitecture, the scalable bus frequency is
encoded in the bit field MSR_FSB_FREQ[2:0] at (0CDH), see Appendix B, “Model-