Module call, module return, and DSPSTACK trace entries

With few exceptions, DBRC modules call module DSPSTGET to obtain initial work space and additional temporary work space (with the DSPGFSTK macro). Upon exit, DSPSTFRE releases the space obtained for the module. This centralized temporary storage management allows DBRC to track the flow of modules, starting with the first call out of DSPCRTR0 (entry point to DBRC).

Three trace entries accomplish this:

  • Words 1 and 2 show the following items:
    • An arrow indicating whether the module is being called or is returning.
    • The nesting level of the module being called or returned to. Nesting levels are shown in one or two decimal digits, up to 99. (Nesting level 0 is DSPUIN00)
    • The last five characters of the module name being called or returning.
  • DSPSTACK–additional work space trace entry (the result of the currently active module issuing the DSPGFSTK macro that calls DSPSTGET).

The following figure illustrates this processing flow:

  1. Module A calls module B, which in turn calls DSPSTGET to obtain initial work space.
  2. Module B issues macro DSPGFSTK to obtain additional work space.
  3. Module B calls DSPSTFRE to release all temporary storage.
  4. Module B returns control to module A.
Figure 1. DBRC trace processing flow
Graphic shows DBRC trace processing flow.

DBRC internal trace illustrates the format of the trace entries associated with this module flow. Each entry occupies one line (8 words) in the DBRC internal trace table. References to specific addresses and locations in modules A and B refer to the diagram above.

One-line trace entry produced when module A calls module B

The following figure shows a one-line trace entry that is produced when module A calls module B. A one-line trace entry that is produced when module B calls DSPSTGET to obtain initial work space storage after being called by module A.

       
       words 0-1 — Identifier which consists of:
                           - An arrow (”)indicating that the module is 
                     being called.
                           - The nesting level of module B.  Nesting 
                     levels are shown in one or two decimal digits
                     up to 99 (nesting level 0 is DSPUIN00).
                   - The last five characters of the module name
                     being called. 

       word 2 — Address in module A of call to module B
       
       word 3 — Entry point address of module B

       word 4 — Save area address of the calling module (A)

       word 5 — Beginning address of the temporary storage
                obtained for module B (B's save area address)

       words 6-7 - Trace time stamp

One-line trace entry produced when module B returns to module A

The following figure shows a one-line trace entry that is produced when module B calls DSPSTFRE to release all of its temporary storage before returning to module A.

       
       words 0-1 — Identifier which consists of:
                           - The nesting level of module A.  Nesting levels
                     are shown in one or two decimal digits up to
                           - A left arrow (“)indicating that the module is 
                     returning.
                     99 (nesting level 0 is DSPUIN00).
                   - The last five characters of the module name
                     returning. 

       word 2 — Address in module A to which module B returns
       
       word 3 — Offest in module B where it returns to module A

       word 4 — Save area address of module A that called module B

       word 5 — Beginning address of the temporary storage being
                released for module B by module DSPSTFRE

       words 6-7 - Trace time stamp

DSPSTACK trace entry

The following figure shows a one-line trace entry that is produced when module B issues macro DSPGFSTK, which calls DSPSTGET to obtain additional temporary storage.

       
       words 0-1 — Identifier DSPSTACK 

       word 2 — Return point address in the module B to which 
                DSPSTGET returns after acquiring additional 
                temporary storage for the module.
       
       word 3 — Entry point address of module B

       word 4 — Save area address of the module (B)

       word 5 — Beginning address of the additional temporary
                storage obtained for module B

       words 6-7 - Trace time stamp