HP Caliper User Guide Release 5.5 (5900-2351, August 2012)

Table 6 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:
$ cat /path/ls.sh
#!/bin/sh
ls
$ caliper ecount -p "(arg1)*ls.sh" /path/ls.sh
Reports information for: /bin/sh /path/ls.sh, but does not report ls.
To select based on argv0:
$ caliper ecount -p "(arg0)ora*" ./sqlplus
Reports information on processes having ora as a prefix of their argument 0.
To detach from unimportant processes:
$ caliper ecount -p "*" -p (ignore)basename ...
HP Caliper does not track or measure children of the detached process.
Using HP Caliper in Your Build Process
You can integrate HP Caliper into your build process by including the HP Caliper commands in
your makefile.
Using HP Caliper in Testing and Quality Assurance
Use these steps with new makefile targets for testing and quality assurance builds:
Configuring Data Collection 99