ChorusOS 5.0 Application Developer's Guide

Running a Performance Profiling Session

Running a performace profiling session includes, starting and stopping the session, and generating the required performance profiling reports. These processes are described in the following sections.

Starting a Performance Profiling Session

Performance profiling is initiated by running the profctl utility on the target system, with the -start option. This utility considers the components to be profiled as arguments.

If the_process was part of the system image, use the following command to initiate the performance profiling session:


% rsh trumpet arun profctl -start -b the_process

If the_process was loaded dynamically, use the following command:


% rsh trumpet arun profctl -start -a the_process pid

Where pid is the numeric identifier of the process (as returned by the aps command).

Run the application.


Note -

Several components can be specified as arguments to the profctl utility.


Stopping a Performance Profiling Session

Performance profiling is stopped by running the profctl utility on the target system, with the -stop option:


% rsh trumpet arun profctl -stop

When performance profiling is stopped, a raw data file is generated for each profiled component within the /tmp directory of the target file system. The name of the file consists of the component name, to which the suffix .prof is added. For example, if only the_process was profiled, the file $CHORUSUS_ROOT/tmp/the_process.prof would be created.

Generating Performance Profiling Reports

Performance profiling reports are generated by the profrpg host utility.

Use the report generator to produce a report for each profiled component as follows:


% cd $CHORUSUS_ROOT/tmp  


% profrpg the_process > the_process.rpg 

Reports should be archived to track the benefits of optimization.