HP XC System 3.x Software User Manual
Page 19
greater the number of samples, the closer the statistical correspondence. Therefore, the statistical
event samples provide a reasonably accurate profile of actual event distributions in a program.
Comparison with End-to-End Event Counts
Some profilers monitor the total number of events
that occur during a time interval, such as the duration of a program. These end-to-end event
counts are usually accurate, even for short programs, because they are direct measurements and
not statistical. Such measurements are also much less intrusive because they do not require
periodic sampling interrupts. However, unlike sampled event counts, end-to-end event counts
do not provide any information about event distribution, or where the events occurred in the
program. You can use sampled event counts to deduce end-to-end event counts by summing
the corresponding event counts. However, you cannot deduce the distribution of events from
end-to-end counts; you must use a sampling profiler to determine event distribution.
Sampling Multiple Events and Calculating Metrics
An advantage of HPCPI is that it can sample
more than one event at a time. This enables you to use counts for multiple event types to calculate
metrics that characterize software performance. For example, you can determine the instructions
per cycle (IPC) metric for a procedure by dividing the number of retired instructions for the
procedure by the number of CPU cycles for the procedure. A high IPC is usually desirable; a low
IPC typically indicates inefficiencies and areas where performance can be improved. Analyzing
metrics such as IPC is often more useful than analyzing single event counts such as time-based
CPU cycles to determine where and how code can be optimized.
Sampling More Events than the Number of Hardware PMU Counters
A significant advantage
of HPCPI is that it can sample more events than the number of hardware PMU counters. Users
can configure HPCPI to monitor more events than the number of hardware event counters
available for the processor PMU. HPCPI places the events in duty groups and multiplexes (cycles
through) the duty groups so that only the events in one duty group are monitored at any time,
and adjusts event counts for multiplexing. Users can run an application once while monitoring
a large number of events and use HPCPI options to select the event data displayed.
HPCPI Sampling Characteristics
19