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

Table Of Contents
Vol. 3 18-73
DEBUGGING AND PERFORMANCE MONITORING
In IA-32e mode, the full 64-bit value is written to the register. If the processor is not
operating in IA-32e mode, 32-bit value is written to registers with bits 63:32 zeroed.
Registers not defined in 32-bit mode are written with zero.
Bytes 0xAF:0x90 are enhancement to the PEBS record format. Support for this
enhanced PEBS record format is indicated by IA32_PERF_CAPABILITIES[11:8]
encoding of 0001B.
The value written to bytes 0x97:0x90 is the state of the
IA32_PERF_GLOBAL_STATUS register before the PEBS assist occurred. This value is
written so software can determine which counters overflowed when this PEBS record
was written. Note that this field indicates the overflow status for all counters, regard-
less of whether they were programmed for PEBS or not.
Programming PEBS Facility
Only a subset of non-architectural performance event in the processor support PEBS.
The subset of precise events are listed in table 4. In addition to using
IA32_PERFEVTSELx to specify event unit/mask setting and setting the EN_PMCx bit
in the IA32_PEBS_ENABLE register for the respective counter, software must also
initialize the DS_BUFFER_MANAGEMENT_AREA data structure in memory to support
capturing PEBS records for precise events.
The beginning linear address of the DS_BUFFER_MANAGEMENT_AREA data structure
must be programmed into the IA32_DS_AREA register. The layout of the
DS_BUFFER_MANAGEMENT_AREA is shown in Figure 18-26.
PEBS Buffer Base: This field is programmed with the linear address of the first
byte of the PEBS buffer allocated by software. The processor reads this field to
determine the base address of the PEBS buffer. Software should allocate this
memory from the non-paged pool.
0x8 R/EIP 0x60 R10
0x10 R/EAX 0x68 R11
0x18 R/EBX 0x70 R12
0x20 R/ECX 0x78 R13
0x28 R/EDX 0x80 R14
0x30 R/ESI 0x88 R15
0x38 R/EDI
0x90 IA32_PERF_GLOBAL_STATUS
0x40 R/EBP 0x98 Data Linear Address
0x48 R/ESP 0xA0 Data Source Encoding
0x50 R8
0xA8 Latency value (core cycles)
Table 18-21. PEBS Record Format for Intel Core i7 Processor Family
Byte Offset Field Byte Offset Field