$ caliper overview -o rpt --switch-interval 3

\

--fprof-sampling-spec 1000000

\

--dcache-sampling-spec

20000,5%,DATA_EAR_EVENTS \

--cstack-sampling-spec

250ms my_app

 

In the above example, the overview measurement will run the fprof measurement for 3 seconds, dcachemeasurement for 3 seconds, and cstack measurement for 3 seconds continuously until the program terminates. The fprof measurement will use a sampling interval of 1 million CPU_CYCLES (or CPU_OP_CYCLES on dual-core Itanium 2 and Itanium 9300 quad-core processors). The dcachemeasurement will take one sample for every 20000 DATA_EAR_EVENTs and it will use 5% as the sampling period variation. The cstack measurement will take one sample for every 250 milliseconds.

On HP-UX, the per-process overview measurement requires a 11i v3 system with the kernel patch PHKL_38072 installed.

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 -sor --sampling-specoption 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 -soptions overrides the default fprof sampling period (500,000 CPU cycles).

While reporting, the --sort-by=sample,cpu_eventoption can be used to specify the metric to be used for sorting. The cpu_event can be any of the sampling events specified with -soptions. By default, the report is sorted on the sampling event specified with the first -soption.

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 45