1. Introduction
Medium- to large-scale software products are usually developed in
several stages. All but the last stage are concerned with the
software's correctness. The last stage involves improving the
software's performance once the software appears to be correct. A
typical program spends most of its time in a relatively small part of
its code, but the program's author(s) may have little or no idea where
that small amount of code is. Thus, they run the risk of making
performance improvements in the “wrong” areas of the program, so that
the improvements have little effect on the performance of the program as
a whole.
MAINPM helps focus attention on those parts of the program in which
performance improvements would be most effective.
MAINPM can report to the user several aspects of a MAINSAIL program's
performance:
-
The time (CPU time or wall clock time) spent in each part of
the program.
-
The number of statements executed in each MODULE or PROCEDURE.
-
The number of times each statement in a MODULE is executed,
and the number of times each PROCEDURE was called.
-
The allocation history of dynamic objects
allocated by the program.
Some of the above statistics can be reported in more than one way:
-
The amount of resource usage while a MODULE or PROCEDURE is
active (“deep usage”). Deep usage includes the resources used in
invoked MODULEs or PROCEDUREs.
-
The amount of resource usage spent in each MODULE or
PROCEDURE (“shallow usage”). Shallow usage does not include the
resources used in other MODULEs or PROCEDUREs.
MAINPM can also list the PROCEDUREs or statements that
were not executed when a program was run.
Resources used may be CPU time, wall clock time,
chunk (dynamic object) space usage,
STRING space usage,
static space usage, or a user-defined quantity.
CPU
time information is available only on systems that provide access to
a system clock.
User-defined resource measurement
is described in detail in Chapter 6.
1.1. Version
This version of the MAINPM User's Guide is current as of the proposed
Version 16.30.1 of MAINSAIL (which has not yet been released).
| This document is preliminary.
Its contents have been updated to include information about the
proposed 16.30.1 release, but the document has not been thoroughly
proofread.
Please contact XIDAK if you have any questions concerning this
document or if you find any errors in it. |