
Chapter 11. Performance Monitor
11-7
Special-Purpose Registers Used by the Performance Monitor
MMCR0 can be accessed with the
mtspr
and
mfspr
instructions using SPR 952.
11.3.1.2 User Monitor Mode Control Register 0 (UMMCR0)
The contents of MMCR0 are reected to UMMCR0, which can be read by user-level
software. UMMCR0 can be accessed with the
mfspr
instructions using SPR 936.
11.3.1.3 Monitor Mode Control Register 1 (MMCR1)
The monitor mode control register 1 (MMCR1) functions as an event selector for
performance monitor counter registers 3 and 4 (PMC3 and PMC4). The MMCR1 register
is shown in Figure 11-2.
Figure 11-2. Monitor Mode Control Register 1 (MMCR1)
18
TRIGGER
Trigger.
0 The PMCs are incremented (if permitted by other MMCR bits).
1 PMC1 is incremented (if permitted by other MMCR bits). The PMCjs are not incremented
until PMC1 is negative or an enabled condition or event occurs, at which time the PMCjs
resume incrementing (if permitted by other MMCR bits) and MMCR0[TRIGGER] is
cleared. The description of FCECE explains the interaction between TRIGGER and
FCECE.
Uses of TRIGGER include the following:
¥ Resume counting in the PMCjs when PMC1 becomes negative without causing a
performance monitor interrupt. Then freeze all PMCs (and optionally cause a
performance monitor interrupt) when a PMCj becomes negative. The PMCjs then reect
the events that occurred after PMC1 became negative and before PMCj becomes
negative. This use requires the following MMCR0 bit settings:
D TRIGGER = 1
D PMC1CE = 0
D PMCjCE = 1
D TBEE = 0
D FCECE = 1
D PMXE = 1 (if a performance monitor interrupt is desired)
¥ Resume counting in the PMCjs when PMC1 becomes negative, and cause a
performance monitor interrupt without freezing any PMCs. The PMCjs then reect the
events that occurred between the time PMC1 became negative and the time the
interrupt handler reads them. This use requires the following MMCR0 bit settings:
D TRIGGER = 1
D PMC1CE = 1
D TBEE = 0
D FCECE = 0
D PMXE = 1
The use of the trigger and freeze counter conditions depends on the enabled conditions and
events described in Section 11.2, òPerformance Monitor Interrupt.ó
19D25
PMC1SEL
PMC1 selector. Contains a code (one of at most 128 values) that identiTes the event to be
counted in PMC1. See Table 11-8.
26D31
PMC2SEL
PMC2 selector. Contains a code (one of at most 64 values) that identiTes the event to be
counted in PMC2. See Table 11-9.
Table 11-3. MMCR0 Field Descriptions (Continued)
Bits
Name
Description
0
4 5
9 10
31
Reserved
PMC3SELECT
PMC4SELECT
0 0
êê
0 0 0 0
êê
0 0 0 0
êê
0 0 0 0
êê
0 0 0 0
êê
0 0 0 0 êê