HP Caliper User's Guide

Simultaneous fprof Sampling on Multiple PMU Counters
Up until Caliper 5.1, the fprof measurement sampled the instruction pointer (IP) on
only one counter (every 500,000 CPU cycles by default). As of Caliper 5.2, the fprof
measurement is enhanced to support simultaneous IP sampling on mutiple PMU events.
The -s or --sampling-spec option can be used multiple times to specify the list of
sampling events, based on which IP samples are to be collected and reported.
The following example performs simultaneous fprof sampling on an application:
$ caliper fprof -s 500000,25000,CPU_CYCLES -s 600000,25000,IA64_INST_RETIRED -o fprof.out ./a.out
In this example, the HP Caliper fprof measurement run will collect IP samples on
two different PMU events (for every 500000 CPU cycles and for every 600000 retired
instructions). In the generated fprof report, the IP sample hits are reported in
individual columns—one for each PMU counter being sampled.
A user can specify upto 4 sampling events on Itanium2 systems and up to 8 sampling
events on dual-core Itanium 2 and Itanium 9300 quad-core processor systems. Specifying
-s options overrides the default fprof sampling period (500,000 CPU cycles).
While reporting, the --sort-by=sample,cpu_event option can be used to specify
the metric to be used for sorting. The cpu_event can be any of the sampling events
specified with -s options. By default, the report is sorted on the sampling event specified
with the first -s option.
Location of Measurement Configuration Files
A measurement is actually the name of a measurement configuration file that contains
parameter settings for the measurement to be made.
When you run HP Caliper, you can simply specify the measurement you want to run.
Or, if you want to use a particular measurement configuration file, you can use a fully
qualified path name.
If you specify a path name, either relative or absolute, HP Caliper runs only if it can
find the measurement configuration file in the specified directory. For example:
$ caliper /home/perf/config/ecount myprog
In this example, HP Caliper reports a “file not found” error if the file ecount is not in
the /home/perf/config/ directory.
If you specify a measurement without a path, HP Caliper looks for the named
measurement configuration file in these locations, in this order:
1. Your working directory
2. HP Caliper home directory in the config subdirectory
You can copy the measurement configuration files provided with HP Caliper and then
modify them to make your own customized set of measurement configuration files.
You can also set up site-wide measurement configuration files in addition to the files
provided with HP Caliper.
Simultaneous fprof Sampling on Multiple PMU Counters 61