Figure 21 .caliperinit File

********************************************************************

#Options applied to all report types.

application

='myapp'

arguments

= '-myarg 2'

context_lines

= 0,3

summary_cutoff

= 1

detail_cutoff

=5

source_path_map

= '/proj/src,/net/dogbert/proj/src:/home/wilson/work'

#Report-specific options.

if caliper_config_file == 'branch': sort_by = 'taken'

elif caliper_config_file == 'fprof': sort_by = 'fcount' report_details = 'statement' context_lines = 'all'

#Apply an option to a subset of reports. if caliper_config_file in ("fcount"):

module_exclude = '/usr/lib/'

********************************************************************

To apply an option to only one type of report, use an if clause specifying the measurement configuration file name followed by the options for that measurement configuration file. For example, to specify the program to profile and the arguments to use and sort the results by the fcount value, you would write this in your .caliperinit file:

if caliper_config_file == 'fcount': application="/opt/mpi/bin/mpirun"

arguments = "-np 2 /proj/dynopt/test_fe/mpi_hello_world" sort_by = "fcount"

Setting Constants in the .caliperinit File

There are several constants that you can set in the .caliperinit file or in a measurement configuration file to give you additional control over reports. These constants, which are not available from the HP Caliper command line, are:

disasm_target_name_limit = limit

Specifies the maximum number of characters to print for branch target symbols in the disassembly listing. (Default: 30.)

suppress_init_warnings = TrueFalse

If True, no warnings will be issued if unrecognized variables are detected in the measurement configuration files or the .caliperinit file. Default: False.)

suppress_statement_data = TrueFalse

If True, no statement-level data will be reported. (Default: False.)

use_parens_for_statement_data = TrueFalse

If True, statement-level data in reports is placed in parentheses. (Default: True.)

Specifying Option Values with a .caliperinit Initialization File 93

Page 93
Image 93
HP UX IPFilter Software manual Setting Constants in the .caliperinit File, Disasmtargetnamelimit = limit