Browse Prior Art Database

Subroutine Footprinting Mechanism

IP.com Disclosure Number: IPCOM000100034D
Original Publication Date: 1990-Mar-01
Included in the Prior Art Database: 2005-Mar-15
Document File: 4 page(s) / 106K

Publishing Venue

IBM

Related People

Mundy, P: AUTHOR

Abstract

Program debugging is a lengthy process due to the dif- ficulty in determining the program flow immediately prior to the error point. An efficient mechanism is disclosed for footprinting internal subroutines to facilitate analysis of the program flow backward from the failure point. For a low overhead in extra macro-generated code, a storage area is updated as the program runs to record: a. entry to the internal subroutine, b. exit from the internal subroutine, and c. return address for the internal subroutine.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 43% of the total text.

Subroutine Footprinting Mechanism

       Program debugging is a lengthy process due to the dif-
ficulty in determining the program flow immediately prior to the
error point.  An efficient mechanism is disclosed for footprinting
internal subroutines to facilitate analysis of the program flow
backward from the failure point.  For a low overhead in extra
macro-generated code, a storage area is updated as the program runs
to record:
a.   entry to the internal subroutine,
b.   exit from the internal subroutine, and
c.   return address for the internal subroutine.

      A dump analysis program can be tailored to generate an
appropriate error report of conditions prior to failure from the
logged data.  The mechanism which has been implemented and tested is
a lower cost method than using trace points.
      Given the following PLAS program:
           MAIN:PROC;
            if x = 0 then
             call sub1;
            if y = 0 then
             call sub2;
           sub1 : proc;
            pgmcheck --;
             end;
           sub2 : proc;
                  if z = 0 then
                   call sub1;
                  end;
           END;

      If, for example, a program check occurs at 'pgmcheck', it would
be very useful to know:
a)   which procedures were active at the time and their calling
sequence and
b)   which procedures had been executed at least once.

      The mechanism here described keeps track of this information
with a low overhead of two instructions per subroutine.  In addition,
in formation is kept in a form which lends itself to automated
analysis by, for example, an off-line dump analysis program. The
mechanism is illustrated here using an assembler language example:
      MAIN      CSECT
                XC    IFLAGS,IFLAGS
                =
                BAL   14,SUB1
                =
      SUB1      DS    0H
                ST    14,SUB1_SV
                OI    IFLAGS,SUB1_A+SUB1_E
                =
                =
                NI    IFLAGS,X'FF'-SUB1_A
                L     14,SUB1_SV
                BR    14
      SUB2      DS    0H
                =     = (similar to SUB1)
      IPROC_TAB DS    0F
                DC    A(2)               number of subroutines
                DC    A(IFLAGS)          address of flags
                DC    A(ISAVE)           address of save slots
                DC    A(IOFFS)           address of offset table
      ...