Sampling [ HP SPT/XL User's Manual: Analysis Software ] MPE/iX 5.0 Documentation
HP SPT/XL User's Manual: Analysis Software
Sampling
The first data collection technique provides information about where,
within application code, most of the time is being spent. This
collection technique is often referred to as "sampling." To accomplish
this requires frequent logging (sampling) of the location of the
instruction the application is currently executing. By sampling the
application often enough, a statistical representation of where the
application is executing can be obtained. For example, if an application
is sampled every few milliseconds for a few minutes, the data can be
combined to determine exactly what procedures were executing most often
and therefore where most of the time was spent.
Since it is common for an application to spend most of its time in system
code, the profile produced from this sampling data often highlights the
internal operating system routines that are executed when system
intrinsics are called. HP SPT/XL resolves this problem by disabling
sampling while intrinsics execute and re-enabling sampling upon returning
to user code. This allows HP SPT/XL to provide a more representative
profile of where user code actually executes. The system intrinsics are
profiled using a tracing data collection technique described below.
The actual technique HP SPT/XL uses to sample the user application is
different depending on the version of HP SPT/XL being used. Versions
that execute on pre-MPE XL 3.0 releases use a sampling technique based on
a time interval. That is, the location of the instruction the
application is executing is sampled every few milliseconds.
The sampling interval that HP SPT/XL uses depends on the model of HP3000
on which the data collection is done. The sampling interval varies
between models because different models of HP3000 execute different
numbers of instructions in a given time. The sampling rate will include
approximately the same number of executed instructions on all models of
the HP3000.
On versions of HP SPT/XL running on MPE XL 3.0 and later releases, the
sampling interval is based directly on the number of instructions
executed. That is, the location where the application is executing is
sampled after so many instructions have been executed. The sampling rate
is approximately the same as with the time-based sampling technique.
No matter what sampling technique is used, after data collection has
ended HP SPT/XL logs the names and addresses of the procedures in the
program file and in the executable libraries used by the application. HP
SPT/XL uses these names and addresses to cluster the samples into the
various procedures used, and present a profile--based on procedure
name--of where time was spent in the application.
By default, HP SPT/XL does NOT log the procedure names for the two system
libraries (XL.PUB.SYS and NL.PUB.SYS), and a sampling profile by
procedure name is not available for these libraries. At the time of
collection, an option is available to inform HP SPT/XL to log this data.
This collection option is called the SYSPROCNAMES option. If this option
is enabled, about 1-3 megabytes of procedure name data will be placed in
the logfile after data collection has ended. See the HP SPT/XL User's
Manual:Collection Software for more details on the SYSPROCNAMES option.
MPE/iX 5.0 Documentation