HP Caliper User's Guide

Sampled Measurements
A sampled measurement measures your program's performance at regular intervals,
based on CPU events, recording the current program location and selected performance
metrics.
A sampled measurement is best used for:
Identifying where your program is spending time
Identifying approximately where events such as cache misses occur
Determining the performance effect and location of branch mispredictions
You can use sampled measurements to focus your analysis on specific parts of your
program.
The advantage of sampled measurements is that they can help you localize performance
issues in your program.
The disadvantage is that they might miss very fast, seldom-called code. You might
need to adjust HP Caliper settings, such as the sampling frequency, to help locate events
in your code.
Sampled measurements also require more resources, such as system memory, which
might affect the run-time performance of your program or limit the amount of
information you can collect.
You can control the tradeoff between resource usage and accuracy of the results by
changing the sample interval.
Precise Measurements
A precise measurement gives you exact information about what is happening and
where events are happening in your program. When you use a precise measurement,
HP Caliper dynamically instruments your binary program while it is running to enable
the collection of information.
Precise measurements are best used for:
Identifying the most and least used functions in your program
Identifying all the branch paths executed in the program
Collecting precise measurements requires more system resources than sampled
measurements. Collecting precise measurements also affects the performance of the
program being measured. The performance effects may vary from a few percent to 300
percent, depending on how much measurement you request. These performance effects
mean that programs making assumptions about the running time of their code might
behave differently when run under HP Caliper.
36 Getting Started with the HP Caliper Command-Line Interface