HP Fortran Programmer's Guide (March 2010)

Performance and optimization
Using profilers
Chapter 6 147
4. Run HP Caliper on your +O3 executable with a configuration file such as total_cpu to
measure performance.
5. Recompile your program with +O3 optimization and +Oprofile=use to use the profile
data collected in Step 2 as input.
6. Run HP Caliper on your fully optimized executable from Step 5 with the same
configuration file from Step 4 and compare the report results with the report from Step 4.
Using Options to Control Data Collection
You can use various options to specify how to collect profile information about your program.
Some examples of the options you can use include:
Collecting information on specific load modules.
Improving HP Caliper performance by excluding load modules you don’t want to profile.
Collecting information on specific processes.
You can specify HP Caliper data collection options by using the CALIPER_OPTS environment
variable. In your Makefile or build scripts you can set CALIPER_OPTS to the options you want
to use. HP Caliper uses those options when it is started by the compiler.
Here are some examples of ways you can control how HP Caliper collects optimization
information.
Excluding Specific Load Modules from Measurement You can reduce the resource
requirements and time it takes to measure your program by reducing the number of load
modules that HP Caliper examines.
For example, if you use certain system libraries that you cannot change, you can explicitly
exclude them.
To exclude a list of modules, specify the names separated by colons. For example:
--module-exclude=libc:libcurses:liboci
You can exclude entire directories as well:
--module-exclude=/usr/lib/
Restricting Measurements to Specific Load Modules On a large and complex program,
you might be interested in measuring only specific programs or shared libraries.
HP Caliper allows you identify the specific file or files to measure.
If you specify --module-default=none, then HP Caliper uses only files specified in the
--module-include list.