PROFILE

PROFILE profiles an application and generates a .PBO file of the results. Use PROFILE after creating a .PBI file with PREP.

The syntax for PROFILE is:

PROFILE [options] programname [programargs]

PROFILE 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.

If you do not specify a .PBO filename on the command line, PROFILE uses the base name of the .PBI file with a .PBO extension. If you do not specify a .PBI or a .PBO file, PROFILE uses the base name of programname with the .PBI and .PBO extensions.

Parameter Description
options Control .PBI input, .PBO output, error printing, and other profiler features. (See the PROFILE Options table).
programname Filename of program to profile. PROFILE adds the .EXE extension if no extension is given. (See the Remarks section.)
programargs Optional command-line arguments for programname. (See the Remarks section.)

PROFILE Options

Option Description
/A Appends any redirected error messages to an existing file. If the /E command-line option is used without the /A option, the file is overwritten. This option is valid only with the /E option.
/E filename Sends profiler-generated error messages to filename.
/H[ELP] Provides a short summary of PROFILE options.
/ I filename Specifies a .PBI file to be read. This file is generated by PREP.
/NOLOGO Suppresses the PROFILE copyright message.
/O filename Specifies a .PBO file to be generated. Use the PREP utility to merge with other .PBO files or to create a .PBT file for use with PLIST.
/X Returns the exit code of the program being profiled.
/? Provides a short summary of PROFILE options.

Environment Variable

The PROFILE environment variable specifies the default command-line options for PROFILE. If the PROFILE environment variable is not specified, there are no defaults.

Remarks

You must specify the filename of the program to profile on the PROFILE command line. PROFILE assumes the .EXE extension, if no extension is given.

You can follow the program name with command-line arguments; these arguments are passed to the profiled program unchanged.

If you are profiling code in a .DLL file, give the name of an executable file that calls it. For example, if you want to profile SAMPLE.DLL, which is called by CALLER.EXE, you can type:

  PROFILE CALLER.EXE

assuming that CALLER.PBI has SAMPLE.DLL selected for profiling.