Dynamic Runtime Analyzer (DRA)

Introduction

by William van den Heuvel (update 2003-11-19)

DRA is a Profile tool that can be used to analyse the performance of an MVS application program running under IBM's operating system OS/390 or z/OS. The application programs can be written in C, C++, Cobol, PL/1, Assembler or a mixture of these languages, but they are expected to conform to Language Environment conventions.

The application program to be analyzed does not need to be recompiled or relinked, implying you can analyze a program without availability of the source code. During execution of the application program DRA monitors individual functions, procedures, methods, routines or modules. DRA also monitors dynamically loaded modules and functions imported from DLL's that are loaded at runtime.

The report produced by DRA shows the clock time, CPU time, and wait time used by every function that was called during execution. The report also shows how often a particular function was called and by whom it was called. This information should enable the developer of the program to locate performance problems, and identify code that may need special attention. The information may also be useful to auditors to verify that the program does not call unauthorized functions.

DRA consists of two major parts;
data collection
data presentation

The data collection is done by a special program that is implemented as a socalled PROFILE tool. The profile tool DRA is activated by means of the Language Environment runtime option PROFILE. This is an official interface managed by Language Environment who fires PROFILE events at certain strategic moments such as initiation and termination of the application program. Events are also fired during execution of the application program, for instance, when a DLL is being loaded and initialized. In addition, DRA intercepts callable LE services as well as calls to functions that are part of the application program itself. These events enable DRA to monitor the activities of the application program as it is executing. The data collected during these events is written to the LE message file.

The data presentation is done by a separate program that reads the data from the LE message file. This is a cross-platform Java program that presents the data in a socalled "tree table". The Java program runs on the Windows platform as a double-clickable application. The message file needs to be FTP'ed from OS/390 or z/OS to Windows.

The data about each function (if available) is shown in separate columns:
Column NAME shows the name of the function.
Column DLL shows the name of the load module or DLL (if applicable)
Column CALLS shows how often the function was called.
Column TIME shows the total elapsed clock time (microsecs) used by the function.
Column CPU shows the total cpu time (microsecs).
Column WAIT shows the total wait time (microsecs).

The functions names are socalled "nodes" of the Java tree. These nodes represent the calling hierarchy relative to the root node, which is usually the main function. Each node has a handle with which it can be expanded or collapsed, thus enabling the user to inrease or decrease the depth of detail as desired. When a particular function has not called any other functions then it doesn't have a handle either. Such a function is called a "leaf".

 

Example COBOL program

This example shows a COBOL program that was compiled with option DYNAM. The program dynamically loads and calls a number of other COBOL modules. The tree table shows the names of the functions that were called during the execution of the application program.

IGZCFCC is a Cobol function that supports the dynamic call. The first time a particular module is called it will be loaded by IGZCLDL using LE service CEEPLOD2. The times shown for CEEPLOD2 indicates how long it took to load the module. Column DLL shows the name of the module being loaded.