Using the profiler

Before using the Profiler, you must do the following:

  1. From the Builder window, choose Project > Options for Selected Files... .
  2. Before you compile your program, choose the desired profiler options.
  3. Before you run your program, open the debugger and start profiling. You can do this one of two ways: either open the profiler window or in the command pane, enter: profilemode start.
  4. Let your program run at least once (or halt it and use the profdump command) before generating reports in the profiler. See "The profdump command".

Note: Some targets require additional preparation to collect profiling data.

To open the profiler window, do one of the following:

Let your program run at least once before generating profiler reports. This allows MULTI to generate profile information files from the program's directory that the profiler can use.

The following are the menus in the profiler window.
File menu
Item Description
Save Report...
Save the report currently in the profiling window to a file.
Append Report...
Append the report currently in the profiling window to a pre-existing file.
Print Report...
Print the report currently in the profiling window.

The following shows the "Config > New Data" and the "Config > Data Processing" sub-menu items and their command line equivalents:
Config menu
Item Description of Configuration Command
New Data > Added to old
When a new set of profile data is processed, such as data from a new run of the program, this new data will be added to the old data. This is the default.
profilemode add
New Data > Replaces old
When a new set of profile data is processed, such as data from a new run of the program, this new data will replace the old data.
profilemode replace
Data Processing > Automatic
After a run completes, the new profile data is automatically processed and stored in the profile database. This is the default.
profilemode automatic
Data Processing > Manual
After a run completes, the data must be manually processed. Helpful if a program is to be run multiple times prior to analyzing profiling results.
profilemode manual

The following are the buttons in the profiler window and their command-line equivalents, if any:
Profiler window buttons
Button Description of action Command

Begin collecting profiling information. Bringing up the profiling window automatically executes this command.
profilemode start

Stop collecting profiling information.
profilemode stop

Delete any existing profiling data.
profilemode clear

Displays in the debugger the percentage of time spent in each source line, to the left of each source code line. In assembly mode, it is the percentage of time spent on each instruction. This is the default. (Note that "~0%" means that line/instruction took very close to 0% of the total execution time.)
profilemode percent

Highlights "dead code", lines which were never executed during the profiling run. This is only available if the program was compiled with the Coverage option.
profilemode coverage

If the program was compiled with the Coverage option, then this displays in the Debugger the total number of times each line (or instruction) is executed.
If the program was not compiled with the Coverage option, but was compiled with either the Functions or Graph options, then this displays in the Debugger (at the beginning of each function) the number of times each function was called.
If the program was not compiled with any of the Coverage, Functions, or Graph options, then this view is not available.
profilemode count

Displays in the profiler the Status Report. See "Status report".
n/a

Displays in the profiler the Standard Calls Report. See "Standard calls report".
n/a

Displays in the profiler the Call Graph Report. See "Call graph report".
n/a

Displays in the profiler the Summary of Coverage Information Report. See "Block coverage summary".
n/a

Displays in the profiler the Detailed Coverage Information Report. See "Detailed block coverage".
n/a

Displays in the profiler the Source Lines Report. See "Source lines report".
n/a

Manually processes the profiling information. See "Processing data".
profilemode process

Opens Range Analysis window. See "Range analysis".
profilemode range addr1 addr2

Opens Dynamic Call Graph centered on the present function being examined in the debugger. See "Browsing dynamic calls, by function".
browse dcalls

Dump the currently available profiling information from the target. See "The profdump command".
profdump

Close the profiler window. Note that this does not deactivate or in any other way affect the state of profiling. You can configure whether or not to have this button.
n/a

Related topics:


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.