Controlling Granularity of Data Collection and Reports

You can control the granularity of data collection and reports. If you want finer granularity (that is, more samples), use the -soption to lower the number of events between samples. For example, you can change the rate from the default 500,000 cycles to 250,000 cycles to get more samples. However, the increased sampling might have a negative effect on your application's performance.

If your program is likely to have repeating patterns, such as loops, those patterns might coincide with the fixed sampling rate, affecting the results. For example, some functions might not be sampled because the IP is never in the function on the measurement cycle. A solution for this is to vary the sampling rate by some number of cycles.

For more information, see “-s or --sampling-spec” (p. 53).

Specifying Processes to Measure

The -poption allows you to measure only the parent (that is, the root) process, selected processes in a process tree, or all processes that are spawned. In addition, HP Caliper provides several ways to treat processes. You can:

Measure the selected processes

Track the processes without measuring them in order to identify interesting child processes

Ignore specific processes

By default, HP Caliper measures and reports on the parent process and all child processes, including native Integrity servers-based processes started by PA-RISC-based binaries running in emulation mode. HP Caliper, however, does not measure the PA-RISC binaries themselves.

To measure the parent process alone, use the -p root option.

By default, HP Caliper produces separate reports for each process and concatenates them to stdout or the output file specified in the -o(or --output-file) option.

If you want a separate file for each report, use the -ooption with its per-processmodifier. (See “-o or --output-file” (p. 51).) This option produces files that use this naming convention:

basename.executablename

For example, the following command on HP-UX:

$ caliper fprof -o COUT,per cc foo.c

produces these files:

COUT

contains an overview of the entire collection run

COUT.cc contains report data for all cc processes

COUT.ecom contains report data for the ccom process

COUT.ld contains report data for the ld process

HP Caliper can measure shell script files. By default, HP Caliper measures the shell program and the programs that the script invokes.

For Fortran MPI programs, by default, HP Caliper measures the mpirun controlling process and the real application.

Process Tree Report

With multiprocess reports, HP Caliper creates a summary report of the process tree to help you navigate the reports. The summary includes:

The process name indented to show lineage.

The argv0 argument.

The process ID (PID) and parent process ID (PPID).

Configuring Data Collection 97