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

Table Of Contents
18-124 Vol. 3
DEBUGGING AND PERFORMANCE MONITORING
18.20 COUNTING CLOCKS
The count of cycles, also known as clockticks, forms a the basis for measuring how
long a program takes to execute. Clockticks are also used as part of efficiency ratios
like cycles per instruction (CPI). Processor clocks may stop ticking under circum-
stances like the following:
The processor is halted when there is nothing for the CPU to do. For example, the
processor may halt to save power while the computer is servicing an I/O request.
When Intel Hyper-Threading Technology is enabled, both logical processors must
be halted for performance-monitoring counters to be powered down.
The processor is asleep as a result of being halted or because of a power-
management scheme. There are different levels of sleep. In the some deep sleep
levels, the time-stamp counter stops counting.
In addition, processor core clocks may undergo transitions at different ratios relative
to the processor’s bus clock frequency. Some of the situations that can cause
processor core clock to undergo frequency transitions include:
TM2 transitions
Enhanced Intel SpeedStep Technology transitions (P-state transitions)
For Intel processors that support Intel Dynamic Acceleration or XE operation, the
processor core clocks may operate at a frequency that differs from the maximum
qualified frequency (as indicated by brand string information reported by CPUID
instruction). See Section 18.20.5 for more detail.
Table 18-30. Effect of Logical Processor and CPL Qualification
for Non-logical-Processor-specific (TI) Events
T1_OS/T1_USR =
00
T1_OS/T1_USR =
01
T1_OS/T1_USR =
11
T1_OS/T1_USR =
10
T0_OS/T0_USR =
00
Zero count Counts while (a)
T0 in USR or (b)
T1 in USR
Counts
irrespective of
CPL, T0, T1
Counts while (a)
T0 in OS or (b) T1
in OS
T0_OS/T0_USR =
01
Counts while (a)
T0 in USR or (b)
T1 in USR
Counts while (a)
T0 in USR or (b)
T1 in USR
Counts
irrespective of
CPL, T0, T1
Counts
irrespective of
CPL, T0, T1
T0_OS/T0_USR =
11
Counts
irrespective of
CPL, T0, T1
Counts
irrespective of
CPL, T0, T1
Counts
irrespective of
CPL, T0, T1
Counts
irrespective of
CPL, T0, T1
T0_OS/T0_USR =
0
Counts while (a)
T0 in OS or (b) T1
in OS
Counts
irrespective of
CPL, T0, T1
Counts
irrespective of
CPL, T0, T1
Counts while (a)
T0 in OS or (b) T1
in OS