gtpp1m1kProgram Development Support Reference

C Function Trace Use of the SETOC Macro

ISO-C programs that were compiled using the TEST compiler option of one of the IBM C/370 family of compilers supported by the TPF 4.1 system, and that are traced using the C function trace facility, may time out because of multiple trace hooks in the code.

In the TPF 4.1 system, you can compile trace hooks into C or C++ code to perform statement tracing, path tracing, and other types of tracing. Compiling many modules using C function trace and then tracing all of these hooks may cause a CTL-10 because the application may spend a large amount of time tracing.

Using the SETOC macro, the TPF 4.1 system allows an entry control block (ECB) to increase the amount of time it takes to time-out between loss of control. Using the ZCTKA command and the SETOC macro together, an ECB can avoid application time-out a number of times before finally timing out.

The following is an example of avoiding time-out when using C function trace.

  1. Enter ZCTKA ALTER AVOIDT-n where n is a value of 0 through 32766. It is important to specify the minimum value you need because a large value can degrade system performance and cause lockout problems.
  2. IPL the TPF 4.1 system to update keypoint A (CTKA).
  3. Enter ZSTRC ALTER CDEBUG XHOOKS to activate C function trace of all trace hooks.

    C function trace receives control the first time an execute (EX) trace hook instruction is issued.

    C function trace obtains the amount of times to avoid time-out and changes this ECB value using the SETOC macro.

Additional Information: