The profile event handler is loadable by Language Environment with
the name CEEEVPRF. The profiler event handler is loaded and initialized
if the PROFILE runtime option is in effect and the TEST runtime option
is not specified.
Reminder: If the TEST runtime option is specified, the PROFILE
runtime option is ignored and a profiler tool is not loaded. A load
failure occurs if Language Environment cannot
find the CEEEVPRF routine or if the routine is not available.
The CEEPCBPRFEH field of the PCB contains the address of the profiler
event handler. Language Environment uses
this address to notify the profiler tool of certain events. These
events, which are described in Table 1,
are a subset of the notifications and parameters that Language Environment passes
to the debug tool event handler.
Table 1. Profile tool
— Language Environment event
handler interfaceProfile Tool Event |
Profile Tool Event Code |
Parm 2 |
Parm 3 |
Parm 4 |
Condition raised |
101 |
CIB |
result code |
|
Unhandled condition |
103 |
CIB |
result code |
|
Enclave init |
118 |
creator's EDB |
|
|
Enclave term |
119 |
|
|
|
Thread init |
120 |
creator's CAA |
|
|
Profile tool term |
121 |
|
|
|
Thread term |
122 |
|
|
|
External entry |
123 |
DSA address (see note) |
profiler invocation string |
- Parm 4 = INPL
- Parm 5 = DSA format
|
Condition promote |
127 |
CIB |
result code |
|
Execution Hook invocation |
133 |
- Parm 2 = DSA
- Parm 3 = hook offset
- Parm 4 = DSA format
- Parm 5 = A buffer containing general purpose registers
- Parm 6 = Return address to the routine that was interrupted
- Parm 7 = Entry point to the routine that was interrupted
- Parm 8 = Eight-byte clock value returned by the STORE Clock (STCK)
instruction
- Parm 9 = Eight-byte elapsed CPU time in microseconds returned
by the TIMEUSED assembler service
|
Initial thread create |
160 |
initial thread_id |
nil |
stack_size |
Initial thread exit |
161 |
initial thread_id |
|
|
Pthread create |
162 |
creating thread_id |
created thread_id |
stack_size |
Pthread created |
163 |
created thread_id |
nil |
stack_size |
Pthread exit |
164 |
created thread_id |
|
|
POSIX fork() imminent |
171 |
thread_id |
|
|
In child process |
172 |
|
|
|
POSIX exec() imminent |
173 |
|
|
|
Process clean up imminent |
174 |
|
|
|
Spawn is imminent |
175 |
|
|
|
In parent process |
178 |
|
|
|
After spawn() |
179 |
|
|
|
Multiple event Execute Hook invocation |
189 |
- Parm 2 = DSA
- Parm 3 = hook offset
- Parm 4 = DSA format
- Parm 5 = A buffer containing general purpose registers
- Parm 6 = Return address to the routine that was interrupted
- Parm 7 = Entry point to the routine that was interrupted
- Parm 8 = eight-byte clock value returned by the STORE Clock (STCK)
instruction
- Parm 9 = eight-byte elapsed CPU time in microseconds returned
by the TIMEUSED assembler service
- Parm 10 = Event mask
|
Note: This
is the requestor's DSA, which means an HLL library routine DSA is
likely the requestor of the Language Environment service
or user DSA.
|
- CAA
- A fullword binary integer that contains the address of the CAA.
- CIB
- A fullword binary integer that contains the address of the CIB.
- DSA
- A fullword binary integer that contains the address of the DSA.
- EDB
- A fullword binary integer that contains the address of the EDB.
- Hook offset
- A fullword binary integer that contains the offset of the hook
that was executed within the hook set. (This value is a multiple of
4 ranging from 0 to 52 inclusive.)
- DSA format
- A fullword binary integer set to one of the following:
- 0
- The format of the DSA is a standard OS linkage register save area
(with/without Language Environment® fields including NAB).
- 1
- The format of the DSA is XPLINK style.
- General purpose registers
- A 64-byte buffer containing the general purpose registers stored
in order 0 to 15 at the time the debug hook was executed. If the debugger
changes these register values, the new values will be used when control
is returned to the routine that executed the debug hook.
- return_address
- A fullword pointer containing the address of the instruction where
control will be returned to the routine that executed the debug hook.
If the debugger changes this address, control will be returned to
the new location.
- entry_ptr
- A fullword pointer containing the address of the entry point of
the routine that contains the debug hook.
- result code
- A fixed(31) binary value action for condition manager to take.
The supported values are:
- 110
- Resume at the resume cursor
- 120
- Percolate to next condition handler
- storage length
- A fixed(31) binary value containing the number of bytes of storage.
- profiler invocation string
- A halfword-prefixed string that contains the invocation string
of the profiler tool. This value, which is specified as the string parameter
of the PROFILE runtime option, it is translated to upper case characters.
For more information about the runtime option, see z/OS Language Environment Programming Reference.
- INPL
- The Initialization Parameter List as passed to CEEINT. For the
format of the INPL, see Figure 1.
- thread_id
- An 8-byte thread identifier.
- stack_size
- A stack size attribute (in bytes) of initial or created thread.
- nil
- Unused; null pointer.
- event mask
- a fullword binary value in which each bit represents a different
hook event. When the bit is '1'b, the event occurred. The values of
the bits are:
Bit Event
0-11 Not used
12 Multiple Event Hook
13 Allocate Descriptor Built
14 Block Entry
15 Not used
16 User label
17 Begin of statement
18 Call return
19-20 Not used
21 Start of loop
22 If evaluated TRUE
23 If evaluated FALSE
24 Switch/case/select choice start
25 Switch/case/select default start
26 Multiple flows join
27 Not used
28 Call begin
29 Goto
30 Procedure exit
31 Multiple exit