Trace logging
Trace logging is a capability that logs all trace events for an ECB.
When an ECB is being processed, certain events are traced to aid debugging problems. These events include a supervisor call (SVC) macro, an enter to a program, and C function calls and returns depending on the trace options that are currently active.
Each ECB has a predefined number of trace entries that are allocated in each trace buffer. For example, an ECB might have 55 trace entries in a trace buffer. When the number of trace events exceeds the number of trace entries, the first trace entry is reused. If there are 56 trace events, the 56th trace event overlays information for the first trace event in the first trace entry. Therefore, the diagnostic data in the trace buffer is limited. In this example, the trace buffer contains only the last 55 trace events.
To use trace logging, you must start a trace log session for an ECB. After a trace log session is started, all trace entries that are created are logged until the trace log session is stopped or until the ECB exits. After all of the trace log data is collected, a report is created to list every trace event that happened for the ECB.
- Macro trace, which is equivalent to ZSTRC command processing with the ALTER and TRACE parameters specified when trace logging is active for the ECB.
- C function trace, which is equivalent to ZSTRC command processing with the ALTER and FUNCTR parameters specified when trace logging is active for the ECB.
- Extended C function trace, which is equivalent to ZSTRC command processing with the ALTER and FUNCEXT parameters specified when trace logging is active for the ECB.
- Selective skip function trace, which is equivalent to ZSTRC command processing with the ALTER and NOFUNSKIP parameters specified when trace logging is active for the ECB.
- Enter/back trace, which is equivalent to ZSTRC command processing with the ALTER and ENTER parameters specified when trace logging is active for the ECB.
- z/TPFDF enter/back trace, which is equivalent to ZSTRC command processing with the ALTER and DFENTER parameters specified when trace logging is active for the ECB.
When trace logging is stopped for the ECB, this set of traces that are collected for the ECB reverts to the traces that are enabled on the system.
This set of traces is persistently collected only for ECBs that trace logging is started for. For ECBs that trace logging is not started for, only traces that are active on the system are collected. For example, when trace logging is started for an ECB, the extended function trace is collected for the ECB whether or not the trace is active on the system. However, if the extended function trace is not active on the system, the trace is not collected for ECBs that trace logging is not started for.