event is provided to the program by means of a pro
gram interruption, with the cause of the interruption
beingidemtified in the interruption code.
Control Register Allocation
The information for controlling program-event re
cording resides in control registers 9,10, and 11 and
consists of the following fields:
Control Register 9:a Genera,-Re9;ste3 o 4 16 31
Control Register10: __ __________ S_ta_rt_in_g_A_d_d_re_s_s ________ o 8 31
Control Register 11:r--I Ending Address o 8 31
PEREl'l!nt Mmks: Bits 0-3 of control register 9
specify which events are monitored. The bits are
assigned as follows:
Bit0: Successful-Branching Event
Bit 1: Instruction-Fetching Event
Bit 2: Storage-Alteration Event
Bit 3: General-Register-Alteration Event
Bits0··3, when ones, specify that the correspond
ing events are monitored. When the bit is zero, the
event is not monitored.
PERGeneral-Register Masks: Bits 16-31 of control
register 9 specify which general registers are moni
tored for alteration of their contents. The 16 bits, in
the order of ascending bit numbers, are made to
correspond one for one with the 16 registers, in the
order of ascending addresses. When the bit is one,
the register is included in monitoring for alteration;
if zero, the register is not monitored.
PERStarling Address: Bits 8-31 of control register 10 form :an address that designates the beginning of
the monitored main-storage area.
PERElrding Address: Bits 8-31 of control register
11 form :an address that designates the end of the40 System/370 Principles of Operation monitored main-storage area.
Programming Note
Most models operate at reduced performance while
monitoring for program events. In order to ensure
thatCPU performance is not degraded due to the
operation of the program-event-recording facility,
programs that do not utilize program-event record
ing should disable program-event recording by set
ting thePER mask in the EC-mode PSW to zero. No
degradation due to program-event recording occurs
in the BC mode or when thePER mask in the EC
modePSW is zero. Disabling of program-event re
cording in the EC mode by means of the masks and
addresses in control registers 9-11 does not neces
sarily assure avoidance of performance degradation
due to the use of the facility.
Operation
Program-event recording(PER) is available only in
the EC mode and is under control ofPSW bit 1, the PER mask; when the mask is zero, no program event
can cause an interruption;whel1 the mask is one, a
monitored event, as specified by the contents of
control registers 9,10, and 11, causes an interrup
tion. In BC mode thePER mask has, in effect, a
value of zero, and program-event recording is dis
abled.
An interruption due to a program event is taken
,after the execution of the instruction responsible for
the event. The occurrence of the event does not
affect the execution of the instruction, which may be
either completed, terminated, suppressed, or nulli
fied.
A program-event condition cannot be kept pend
ing. When theCPU is disabled for a particular pro
gram event at the time it occurs, either by the mask
in thePSW or by the masks in control register 9, the
interruption condition is lost.
A change to thePER mask in the PSW or to the PER control fields in control registers 9, 10, and 11
affects program-event recording starting with the
execution of the immediately following instruction.
When theCPU is enabled for some program event
and an instruction causes theCPU to be disabled for
that particular event, the event causes an interrup
tion if it occurs during the execution of the instruc
tion.
WhenLOAD PSW or SUPERVISOR CALL
causes aPER condition and at the same time
changesCPU operation from EC mode to BC mode,
thePER interruption is taken with the old PSW specifying BC mode and with the interruption code
stored in the oldPSW. The additional information
gram interruption, with the cause of the interruption
being
Control Register Allocation
The information for controlling program-event re
cording resides in control registers 9,
consists of the following fields:
Control Register 9:
Control Register
Control Register 11:
PER
specify which events are monitored. The bits are
assigned as follows:
Bit
Bit 1: Instruction-Fetching Event
Bit 2: Storage-Alteration Event
Bit 3: General-Register-Alteration Event
Bits
ing events are monitored. When the bit is zero, the
event is not monitored.
PER
register 9 specify which general registers are moni
tored for alteration of their contents. The 16 bits, in
the order of ascending bit numbers, are made to
correspond one for one with the 16 registers, in the
order of ascending addresses. When the bit is one,
the register is included in monitoring for alteration;
if zero, the register is not monitored.
PER
the monitored main-storage area.
PER
11 form :an address that designates the end of the
Programming Note
Most models operate at reduced performance while
monitoring for program events. In order to ensure
that
operation of the program-event-recording facility,
programs that do not utilize program-event record
ing should disable program-event recording by set
ting the
degradation due to program-event recording occurs
in the BC mode or when the
mode
cording in the EC mode by means of the masks and
addresses in control registers 9-11 does not neces
sarily assure avoidance of performance degradation
due to the use of the facility.
Operation
Program-event recording
the EC mode and is under control of
can cause an interruption;
monitored event, as specified by the contents of
control registers 9,
tion. In BC mode the
value of zero, and program-event recording is dis
abled.
An interruption due to a program event is taken
,after the execution of the instruction responsible for
the event. The occurrence of the event does not
affect the execution of the instruction, which may be
either completed, terminated, suppressed, or nulli
fied.
A program-event condition cannot be kept pend
ing. When the
gram event at the time it occurs, either by the mask
in the
interruption condition is lost.
A change to the
affects program-event recording starting with the
execution of the immediately following instruction.
When the
and an instruction causes the
that particular event, the event causes an interrup
tion if it occurs during the execution of the instruc
tion.
When
causes a
changes
the
stored in the old