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

Table Of Contents
18-48 Vol. 3
DEBUGGING AND PERFORMANCE MONITORING
Unit mask (UMASK) field (bits 8 through 15) — These bits qualify the
condition that the selected event logic unit detects. Valid UMASK values for each
event logic unit are specific to the unit. For each architectural performance event,
its corresponding UMASK value defines a specific microarchitectural condition.
A pre-defined microarchitectural condition associated with an architectural event
may not be applicable to a given processor. The processor then reports only a
subset of pre-defined architectural events. Pre-defined architectural events are
listed in Table 18-10; support for pre-defined architectural events is enumerated
using CPUID.0AH:EBX. Architectural performance events available in the initial
implementation are listed in Table A-1.
USR (user mode) flag (bit 16) — Specifies that the selected microarchitectural
condition is counted only when the logical processor is operating at privilege
levels 1, 2 or 3. This flag can be used with the OS flag.
OS (operating system mode) flag (bit 17) Specifies that the selected
microarchitectural condition is counted only when the logical processor is
operating at privilege level 0. This flag can be used with the USR flag.
E (edge detect) flag (bit 18) — Enables (when set) edge detection of the
selected microarchitectural condition. The logical processor counts the number of
deasserted to asserted transitions for any condition that can be expressed by the
other fields. The mechanism does not permit back-to-back assertions to be
distinguished.
This mechanism allows software to measure not only the fraction of time spent in
a particular state, but also the average length of time spent in such a state (for
example, the time spent waiting for an interrupt to be serviced).
Figure 18-13. Layout of IA32_PERFEVTSELx MSRs
31
INV—Invert counter mask
EN—Enable counters
INT—APIC interrupt enable
PC—Pin control
8
7
0
Event Select
E—Edge detect
OS—Operating system mode
USR—User Mode
Counter Mask
E
E
N
I
N
T
19 1618 15172021222324
Reserved
I
N
V
P
C
U
S
R
O
S
Unit Mask (UMASK)
(CMASK)
63