How HP SPT/XL Collects Data [ HP SPT/XL User's Manual: Collection Software ] MPE/iX 5.0 Documentation
HP SPT/XL User's Manual: Collection Software
How HP SPT/XL Collects Data
HP SPT/XL separates the use of application resources into two categories.
The first category is time spent in application code. The second is time
spent in system code on behalf of the application requesting a system
service by calling an intrinsic. System code includes subsystems such as
TurboIMAGE and VPLUS. Two different data collection techniques are used
to profile these categories of execution.
Figure 1-1. Program Structure
Application code can consist of any program files and executable
libraries generated by the native language compilers available for
MPE-XL--for example, COBOL II/XL, Pascal/XL, FORTRAN 77/XL, and C/XL. For
programs written in interpretive languages (such as HP Transact or COGNOS
Powerhouse) the language interpreter program itself is the application
layer.
System code is made up of both the callable and internal procedures of
the MPE-XL operating system and its subsystems-- for example, TurboIMAGE,
VPLUS, and Network Services. This code is contained in the executable
libraries XL.PUB.SYS and NL.PUB.SYS.
System Code Dominant Programs
These programs spend most of their processing time--up to 99% --in system
code. Services make up the bulk of system code used in these programs.
Interactive programs use lots of code associated with terminal I/O. Much
of the code used by both interactive and batch programs is associated
with information storage and retrieval.
Most MPE-based programs are in this category, because of the predominance
of commercial applications in MPE environments and the common reliance on
KSAM and TurboIMAGE for information management.
Programs in this category can use any of the native MPE/XL
languages--mostly COBOL and Pascal--or interpretive fourth generation
(4GL) languages.
A tracing technique is used to profile time spent in system code on
behalf of intrinsics invoked by the application. Trace data is generated
at almost every intrinsic call (See appendix D for a list of the
intrinsics). This trace data consists of such metrics as frequency of
execution, time consumed etc.. This trace data provides an informative
view of how an application utilizes system services.
To tune programs in this category, the method and frequency with which
they invoke system code must be optimized. Data file structure and
loading characteristics must also be tuned in these programs.
Application Code Dominant Programs
These programs spend most of their time doing numeric computations in
application code. Little time is spent in system code.
This category includes statistical analysis or formula-intensive
programs, typically written in FORTRAN, Pascal, or C. They are the
exceptions in MPE environments.
To profile time spent in application code, HP SPT/XL monitors a program
at frequent intervals and through sampling identifies the instruction
address being processed. This instruction address is stored in the HP
SPT/XL logfile. During analysis, HP SPT/XL converts these instruction
addresses to procedure names and offsets. A graph is presented
identifying the procedure(s) where the most samples were encountered and
therefore where most of the time was being spent.
Since the typical application spends 80% or more of its time in system
code on behalf of intrinsics called by the application, the number of
samples in system code would dominate those in application code and make
data interpretation difficult. Therefore, HP SPT/XL does not collect
samples while intrinsics are executing. A clearer picture of where time
was spent in the application code results.
To tune these programs, you must identify the program procedures that
consume the most processor resource and refine coding algorithms. Using
more efficient language syntax within program procedures must also be
considered, although this tends to be host-specific and impractical if
source code portability is needed.
NOTE See appendix C for a more detailed discussion of HP SPT/XL's data
collection function.
MPE/iX 5.0 Documentation