Browse Prior Art Database

PL/I Program to Monitor Statement Use in Another Program

IP.com Disclosure Number: IPCOM000081396D
Original Publication Date: 1974-May-01
Included in the Prior Art Database: 2005-Feb-27
Document File: 1 page(s) / 12K

Publishing Venue

IBM

Related People

Seaman, RP: AUTHOR

Abstract

A monitor program is described which provides a statement usage count that can be used to "tune" the monitored program and to provide an aid to debugging. The monitor is written in PL/I.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 75% of the total text.

Page 1 of 1

PL/I Program to Monitor Statement Use in Another Program

A monitor program is described which provides a statement usage count that can be used to "tune" the monitored program and to provide an aid to debugging. The monitor is written in PL/I.

The monitor program first calls the program under test P as a task and waits to get it initialized. At frequent intervals during the execution of P, the current instruction address of P is noted and stored as a count. The code of P is divided into small constant-length sections of 64 bytes and each time P's instruction address is noted, a count is incremented for the appropriate section of P. At the end of execution of P a diagram is plotted showing these counts. The diagram shows which parts of P have been frequently used and which parts have been rarely used or not at all.

To use the monitor program the following statements are inserted at the beginning of P: DCL LABEL LABEL EXT, WIZARD EVENT EXT; LL: LABEL = LL;, COMPLETION(WIZARD) = '1'B.

The purpose of these statements is to allow the monitor program to access the monitored programs Dynamic Storage Area (DSA) (the second word of the label variable) and to inform the monitor program when execution has started.

The monitored program's main procedure statement is changed to the following: PROGRAM: PROC OPTIONS(TASK);.

The monitored program P may consist of several external procedures. P is link-edited with the monitor program using the tasking library.

The monitor program...