Chapter 11. Performance Monitor
11-11
Event Counting
11.3.2.3 User Performance Monitor Counter Registers
(UPMC1DUPMC4)
The contents of the PMC1DPMC4 are reected to UPMC1DUPMC4, which can be read by
user-level software. The UPMC registers can be read with the
mfspr
instructions using the
following SPR numbers:
¥
¥
¥
¥
UPMC1 is SPR 937
UPMC2 is SPR 938
UPMC3 is SPR 941
UPMC4 is SPR 942
11.3.2.4 Sampled Instruction Address Register (SIAR)
The sampled instruction address register (SIAR) is a supervisor-level register that contains
the effective address of the last instruction to complete before the performance monitor
exception is signaled. The SIAR is shown in Figure 11-6.
Figure 11-6. Sampled instruction Address Register (SIAR)
Note that SIAR is not updated if performance monitor counting has been disabled by
setting MMCR0[0]. SIAR can be accessed with the
mtspr
and
mfspr
instructions using
SPR 955.
11.3.2.5 User Sampled Instruction Address Register (USIAR)
The contents of SIAR are reected to USIAR, which can be read by user-level software.
USIAR can be accessed with the
mfspr
instructions using SPR 939.
11.4 Event Counting
Counting can be enabled if conditions in the processor state match a software-speciTed
condition. Because a software task scheduler may switch a processors execution among
multiple processes and because statistics on only a particular process may be of interest, a
facility is provided to mark a process. The performance monitor bit, MSR[PMM], is used
for this purpose. System software may set this bit when a marked process is running. This
enables statistics to be gathered only during the execution of the marked process. The states
of MSR[PR] and MSR[PMM] together deTne a state that the processor (supervisor or user)
and the process (marked or unmarked) may be in at any time. If this state matches a state
speciTed in the MMCR, the state for which monitoring is enabled, counting is enabled.
0
31
Instruction Address