caliper_options Parameters used to customize the performance analysis.

For more information, see “HP Caliper Options” (p. 47).

program

The name of the executable program you want HP Caliper to measure.

program_arguments Any number of arguments expected by your executable.

You can use an options file to specify command-line information, including the measurement, options, program, and program arguments. See “-f or --options-file” (p. 49) for details.

For more information, see “Configuring HP Caliper ” (p. 91).

Basic Tasks: A Quick Reference

Here is a list of basic tasks and the HP Caliper commands you can use to perform them.

Starting HP Caliper

Once installed, the easiest way to access HP Caliper is to type caliper. For example:

$ caliper myprog

This runs the default measurement, scgprof, on your program in your current directory and produces a text report to stdout. To run another measurement, just type it:

$ caliper fcount myprog

Stopping HP Caliper

To stop HP Caliper before it finishes measuring your program, enter Ctrl-C, or from another process use this command:

$ kill -s INT caliper_process_ID

Either of these methods stops the measurement run. HP Caliper then processes the data collected up to the point where it was stopped and generates a report. There could be a significant delay before the HP Caliper process terminates.

To stop HP Caliper immediately, without generating data, use this command:

$ kill -s TERM caliper_process_ID

CAUTION: If HP Caliper is measuring processes using instrumentation on HP-UX (that is, generating a precise measurement), stopping HP Caliper will cause it to forcibly terminate all processes that are being measured. Any resources used by the processes, such as shared memory segments, temporary files, and so forth, will not be cleaned up.

For PMU-only measurements, HP Caliper will simply detach from the processes and stop. The processes will continue normally.

Showing HP Caliper Options

For HP Caliper short help, including a list of the most commonly used options and measurements, use:

$ caliper -h

For HP Caliper long help, use:

$ caliper -H

Creating a Call Graph Profile with HP Caliper

To create a call graph profile with HP Caliper, use either of these commands:

$ caliper scgprof [caliper_options] program [program_arguments]

or

$ caliper cgprof [caliper_options] program [program_arguments]

28 Getting Started with the HP Caliper Command-Line Interface