Hpcpi sampling characteristics – HP XC System 3.x Software User Manual
Page 18
hpcpiprof
The hpcpiprof utility displays performance profiles for systems (per image) or images
(per procedure). The following excerpt from hpcpiprof output shows the number of
CPU cycles used per image on system:
—
CPU_CYCLES % cum% image
---------- ----- ------ ----------------------------
283629e6 96.9% 96.9% vmlinux-2.6.9-34.7hp.XCsmp
3824e6 1.3% 98.2% libm-2.3.4.so
2117e6 0.7% 98.9% sum
:
:
The following excerpt from hpcpiprof output shows CPU utilization statistics for
procedures in the image myApp:
CPU_CYCLES % cum% procedure image
---------- ----- ------ ----------- -----
191201e7 99.3% 99.3% routine1 myApp
1309e7 0.7% 100.0% unknown_rou myApp
— hpcpilist
The hpcpilist utility lists per-line performance statistics for a procedure. The following
is an excerpt from an hpcpilist output:
CPU_CYCLES PC B ASM
---------- --------------- - --------------------------------
:
:
2333e6 routine1+0x0030 : ldfs f7=[r34]
0 routine1+0x0031 nop.f 0
0 routine1+0x0032 addl r14=152,gp;;
2716e6 routine1+0x0040 ldfs f6=[r14];;
:
:
— hpcpitopcounts
The hpcpitopcounts utility lists the instructions with the most counts for performance
events.
— hpcpicat
The hpcpicat utility displays the contents of a performance data file with minimal
formatting. This utility is primarily a debugging tool for advanced users who want to
create applications that parse and format performance data; it is not intended for general
performance profiling.
HPCPI Sampling Characteristics
HPCPI is a statistical sampling profiler that uses the PMU. When n events (such as CPU cycles
or cache misses) occur, the PMU triggers a performance monitoring interrupt. The interrupt
handler records the instruction pointer of the interrupted code and creates a sample based on
the instruction pointer and the triggering event. The interrupt handler then reprograms the PMU
for another sampling interrupt and returns. The following sections describe HPCPI sampling
characteristics:
Inherent Limitations of Statistical Sampling
Performance profilers based on statistical sampling
have some inherent limitations because each sample represents many events, but not all of the
events occur at the recorded instruction pointer. However, many samples accumulate for
frequently-executed code regions, and the probability of taking a sample at a location is
proportional to the number of actual event occurrences at that location. Over time, the statistical
histogram of samples approaches the corresponding proportion of actual event occurrences; the
18
Introduction