HP Caliper User's Guide

Table 8-4 Name Source Options Used with -p some
DescriptionOption
Default. The name is the executable base name of the process.
file
The name is argument 0 of the process.
arg0 or argv0
The name is argument 1 of the process or "" (empty string) if there is not such an
argument.
arg1 or argv1
The last option specified takes precedence.
Table 8-5 Process Origin Options Used with -p some
DescriptionOption
Denotes the initial root process.
root
Matches any process created by fork of a measured or tracked parent process.fork
Matches any process created by exec of a measured or tracked process.exec
The default is to match any process origin.
If you specify multiple options, HP Caliper looks for matches for any of the options. For example,
(exec,fork)matches any process that was started with exec or fork from a measured or tracked
process.
Examples of the -p Option
To measure only ecom and ld
$ caliper ecount -p ecom:ld cc hw.c
To measure only processes starting with the letter “c”:
$ caliper ecount -p "c*" cc hw.c
Reports information for: cc (root), cc (fork), cc (fork), ctcom.
To measure only processes where the last letter is “m”:
$ caliper ecount -p "(regexp)m$" cc hw.c
Reports only information for: ctcom.
To measure every process except those created by fork:
$ caliper ecount -p "*" -p "(fork,track)*" cc hw.c
Reports information for: cc (root), ecom, ld.
This command causes HP Caliper to track the process created with fork and if
the process calls exec, the new process is measured, not simply tracked. This is
useful when you do not want to measure the period between fork and exec calls.
To select based on argv1:
Configuring Data Collection 131