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

Table Of Contents
18-22 Vol. 3
DEBUGGING AND PERFORMANCE MONITORING
18.6.2 Filtering of Last Branch Records
MSR_LBR_SELECT is cleared to zero at RESET, and LBR filtering is disabled, i.e. all
branches will be captured. MSR_LBR_SELECT provides bit fields to specify the condi-
tions of subsets of branches that will not be captured in the LBR. The layout of
MSR_LBR_SELECT is shown in Table 18-6.
18.7 LAST BRANCH, INTERRUPT, AND EXCEPTION
RECORDING (PROCESSORS BASED ON INTEL
NETBURST
®
MICROARCHITECTURE)
Pentium 4 and Intel Xeon processors based on Intel NetBurst microarchitecture
provide the following methods for recording taken branches, interrupts and excep-
tions:
Store branch records in the last branch record (LBR) stack MSRs for the most
recent taken branches, interrupts, and/or exceptions in MSRs. A branch record
consist of a branch-from and a branch-to instruction address.
Send the branch records out on the system bus as branch trace messages
(BTMs).
Log BTMs in a memory-resident branch trace store (BTS) buffer.
To support these functions, the processor provides the following MSRs and related
facilities:
Table 18-6. MSR_LBR_SELECT
Bit Field Bit Offset Access Description
CPL_EQ_0 0 R/W When set, do not capture branches occurring in ring 0
CPL_NEQ_0 1 R/W When set, do not capture branches occurring in ring
>0
JCC 2 R/W When set, do not capture conditional branches
NEAR_REL_CALL 3 R/W When set, do not capture near relative calls
NEAR_IND_CALL 4 R/W When set, do not capture near indirect calls
NEAR_RET 5 R/W When set, do not capture near returns
NEAR_IND_JMP 6 R/W When set, do not capture near indirect jumps
NEAR_REL_JMP 7 R/W When set, do not capture near relative jumps
FAR_BRANCH 8 R/W When set, do not capture far branches
Reserved 63:9 Must be zero