User Tools

Site Tools


ibm:vm370-lib:cmshelp:svctrace.helpcmd

SVCTRACE

CMS Commands

svctrace.helpcmd.txt
SVCTRACE                                                  CMS Transient command

Use the SVCTRACE command to trace and record information about supervisor calls
occurring in your virtual machine.  The format of the SVCTRACE command is:
+----------+------------------------------------------------------------------+
| SVCTrace | ON|OFF                                                           |
+----------+------------------------------------------------------------------+
where:

ON | OFF starts or stops tracing all SVC instructions issued within CMS.


Usage notes:

1.  The trace information recorded on the printer includes:
    o   The virtual storage location of the calling SVC instruction and the
        name of the called program or routine
    o   The normal and error return addresses
    o   The contents of the general registers both before the SVC-called
        program is given control and after a return from that program
    o   The contents of the general registers when the SVC handling routine is
        finished processing
    o   The contents of the floating-point registers before the SVC-called
        program is given control and after a return from that program
    o   The contents of the floating-point registers when the SVC handling
        routine is finished processing
    o   The parameter list passed to the SVC

2.  To terminate tracing previously established by the SVCTRACE command, issue
    the HO or SVCTRACE OFF commands.  SVCTRACE OFF and HO cause all trace
    information recorded, up to the point they are issued, to be printed on the
    virtual spooled printer.  On typewriter terminals SVCTRACE OFF can be
    issued only when the keyboard is unlocked to accept input to the CMS
    command environment.  To terminate tracing at any other point in system
    processing, HO must be issued.  To suspend tracing temporarily during a
    session, interrupt processing and enter the Immediate command SO (Suspend
    Tracing).  To resume tracing that was suspended with the SO command, enter
    the Immediate command RO (Resume Tracing).

    If you issue the CMS Immediate command HX or you log off the VM/370 system
    before termination of tracing previously set by the SVCTRACE command, the
    switches are cleared automatically and all recorded trace information is
    printed on the virtual spooled printer.

3.  If a user timer exit is activated while SVCTRACE is active, SVCTRACE is
    disabled for the duration of the timer exit.  Any SVCs issued during the
    timer exit are not reflected in the SVCTRACE listing.

4.  If your program must remain disabled for interrupts (in an interrupt
    handler, for example), it must not issue any SVC's while SVCTRACE is
    active.  SVCTRACE enables the system for interrupts. Use the CP PER command
    instead.

Responses:

A variety of information is printed whenever the SVCTRACE ON command is issued.

The first line of trace output starts with a dash or plus sign or an asterisk
(- or + or *).  The format of the first line of trace output is:
   -ยฆ+ยฆ*  N/D = xxx/dd name FROM loc OLDPSW = psw1 GOPSW = psw2  (RC=rc)

where:

-     indicates information recorded before processing the SVC.

+     indicates information recorded after processing the SVC, unless the
      asterisk (*) applies.

*     indicates information recorded after processing a CMS SVC that had an
      error return.

N/D   is an abbreviation for SVC number and depth (or level).

xxx   is the number of the SVC call (they are numbered sequentially).

dd    is the nesting level of the SVC call.

name  is the macro or routine being called.

loc   is the program location from which the SVC was issued.

psw1  is the PSW at the time the SVC was called.

psw2  is the PSW with which the routine being called is invoked, if the first
      character of this line is a dash (-).  If the first character of this
      line is a plus sign or asterisk (+ or *), PSW2 represents the PSW that
      returns control to the user.

rc    is the return code from the SVC handling routine in general register 15.
      This field is omitted if the first character of this line is a dash (-),
      or if this is an OS SVC call.  For a CMS SVC, this field is 0 if the line
      begins with a plus sign (+), and nonzero for an asterisk (*).  Also, this
      field equals the contents of R15 in the "GPRS AFTER" line.

The next two lines of output are the contents of the general registers when
control is passed to the SVC handling routine.  This output is identified at
the left by ".GPRSB."  The format of the output is:
   .GPRSB = h h h h h h h h *dddddddd*
          = h h h h h h h h *dddddddd*
where h represents the contents of a general register in hexadecimal format and
d represents the EBCDIC translation of the contents of a general register.  The
contents of general registers 0 through 7 are printed on the first line, with
the contents of registers 8 through F on the second line.  The hexadecimal
contents of the registers are printed first, followed by the EBCDIC
translation.  The EBCDIC translation is preceded and followed by an
asterisk(*).

The next line of output is the contents of general registers 0, 1, and 15 when
control is returned to your program.  The output is identified at the left by
".GPRS AFTER :."  The format of the output is:
   .GPRS AFTER : R0-R1 = h h *dd* R15 = h *d*
where h represents the hexadecimal contents of a general register and d is the
EBCDIC translation of the contents of a general register.  The only general
registers that CMS routines alter are registers 0, 1, and 15 so only those
registers are printed when control returns to your program.  The EBCDIC
translation is preceded and followed by an asterisk (*).

The next two lines of output are the contents of the general registers when the
SVC handling routine is finished processing.  This output is identified at the
left by ".GPRSS." The format of the output is:
   .GPRSS = h h h h h h h h *dddddddd*
          = h h h h h h h h *dddddddd*
where h represents the hexadecimal contents of a general register and d
represents the EBCDIC translation of the contents of a general register.
General registers 0 through 7 are printed on the first line with registers 8
through F on the second line.  The EBCDIC translation is preceded and followed
by an asterisk (*).

The next line of output is the contents of the calling routine's floating-point
registers.  The output is identified at the left by ".FPRS."  The format of the
output is:
   .FPRS = f  f  f  f  *gggg*
where f represents the hexadecimal contents of a floating-point register and g
is the EBCDIC translation of a floating-point register.  Each floating point
register is a doubleword; each f and g represents a doubleword of data.  The
EBCDIC translation is preceded and followed by an asterisk (*).

The next line of output is the contents of floating-point registers when the
SVC handling routine is finished processing.  The output is identified by
".FPRSS" at the left.  The format of the output is:
   .FPRSS = f  f  f  f  *gggg*
where f represents the hexadecimal contents of a floating-point register and g
is the EBCDIC translation.  Each floating-point register is a doubleword and
each f and g represents a doubleword of data.  The EBCDIC translation is
preceded and followed by an asterisk (*).

The last two lines of output are printed only if the address in register 1 is a
valid address for the virtual machine.  If printed, the output is the parameter
list passed to the SVC.  The output is identified by ".PARM" at the left.  The
output format is:
   .PARM = h h h h h h h h *dddddddd*
         = h h h h h h h h *dddddddd*
where h represents a word of hexadecimal data and d is the EBCDIC translation.
The parameter list is found at the address contained in register 1 before
control is passed to the SVC handling program.  The EBCDIC translation is
preceded and followed by an asterisk (*).

Below is a summary of the types of SVC trace output.

  +ยฆ-ยฆ* N/D         The SVC and the routine that issued the SVC.
  .GPRSB            Contents of general registers when control is passed to the
                    SVC handling routine.
  .GPRS AFTER       Contents of general registers 0, 1, and 15 when control is
                    returned to your program.
  .GPRSS            Contents of the general registers when the SVC handling
                    routine is finished processing.
  .FPRS             Contents of floating-point registers before the SVC-called
                    program is given control and after returning from that
                    program.
  .FPRSS            Contents of the floating-point registers when the SVC
                    handling routine is finished processing.
  .PARM             The parameter list, when one is passed to the SVC.
ibm/vm370-lib/cmshelp/svctrace.helpcmd.txt ยท Last modified: 2023/08/06 13:36 by Site Administrator