PREP

The PREP program runs twice during a normal profiling operation. In Phase I, it reads an .EXE file and then creates .PBI and .PBT files. In Phase II, it reads .PBT and .PBO files and then writes a new .PBT file for PLIST. An 'X' in the following Options table indicates that a PREP command-line option applies to a particular phase.

The syntax for PREP is:

PREP [options] [programname1] [programname2...programname8]

PREP reads the command line from left to right, so the rightmost options override contradictory options to the left. None of the options are case sensitive. You must prefix options with a forward slash ( / ) or a dash ( - ), and options must be separated by spaces.

Parameter Description
options Control the kind of profiling, the inclusion and exclusion of code to be profiled, whether to merge profiles, and other profiling features. See the PREP Options table.
programname1 Filename of primary program to profile (.DBG, .EXE, or .DLL). PROFILE adds the .EXE extension if no extension is given. This parameter must be specified in the first call to PREP and not the second call.
programname2
...
programname8
Additional programs to profile. These parameters can be specified for the first call to PREP only.

PREP Options

Phase
Option I II Description
/AT X   Collects attribution data for function timing and function counting. Function attribution reports which function called another function. See the /STACK switch later in this list.
/CB X   Used with function timing, allows you to set the calibrated overhead of profiler calls in the event that your function timing calls have varied because of varied calibrated overhead values. The calibrated overhead is displayed in default (non-tab-delimited) PLIST output.
/EXC X   Excludes a specified module from the profile (See the Remarks section).
/EXCALL X   Excludes all modules from the profile (See the Remarks section).
/FC X   Selects function count profiling.
/FT X   Selects function timing profiling. This option causes the profiler to generate count information as well.
/FV X   Selects function coverage profiling.
/INC X   Includes in profile (See the Remarks section).
/H[ELP] X X Provides a short summary of PREP options.
/IO filename   X Merges an existing .PBO file (the file generated by PROFILER to be passed in the second call to PREP). Up to eight .PBO files can be merged at a time. The default extension is .PBO.
/IT filename   X Merges an existing .PBT file (the file generated by the second call to PREP to be passed to PLIST). Up to eight .PBT files can be merged at a time. You cannot merge .PBT files from different profiling methods. The default extension is .PBT.
/LC X   Selects line count profiling.
/LV X   Selects line coverage profiling.
/M filename   X Substitutes for /IT, /IO, and /OT options.
/NOLOGO X X Suppresses the PREP copyright message.
/OI filename X   Creates a .PBI file (the file generated by the first call to PREP). The default extension is .PBI. If /OI is not specified, the output .PBI file is programname1.PBI.
/OM X   Creates a self-profiling file with _XE or _LL extension for function timing, function counting, and function coverage. Without this option, the executable code is stored in the .PBI file. This option speeds up profiling.
/OT filename X X Specifies the output .PBT file. The default extension is .PBT. If /OT is not specified, the output .PBT file is programname1.PBT.
/SF function X   Starts profiling with function. The function name must correspond to an entry in the .MAP file.
/STACK dpt X   When using the /AT switch, you can also set the stack depth (dpt) to which functions will have their attribution data recorded.
/? X X Provides a short summary of PREP options.

Environment Variable

The PREP environment variable specifies the default PREP command-line options. If a value for the PREP environment variable is not specified, the default options for PREP are:

  /FT /OI filename /OT filename

where filename is set to the programname1 parameter value.

Remarks

The /INC and /EXC options specify individual .LIB, .OBJ, .FOR and .F90 files. For line counting and line coverage, you can specify line numbers with source files as in:

  /EXCALL /INC TEST.F90(3-41,50-67)

In this example, the /EXCALL option excludes all modules from the profile, and the /INC option supercedes that to include only lines 3 - 41 and lines 50 - 67 from the source file TEST.F90. Note the absence of spaces in the source specification.

To specify all source lines in a particular module, specify the .OBJ file like this:

  /EXCALL /INC TEST.OBJ

or by using the source filename with zero line numbers like this:

  /EXCALL /INC TEST.F90(0-0)

The following statement profiles from line 50 to the end of the file:

  /EXCALL /INC TEST.F90(50-0)