Previous Next Contents Index Doc Set Home


Collecting Data

11


This chapter is organized into the following sections:

Basic Concepts

page 151

Using the Collector

page 152

Profiling

page 152

Collecting Data for Multithreaded Applications

page 152

Command Reference

page 153


Basic Concepts

During the execution of an application, the Collector gathers behavior data and writes it to a file, called an experiment.

When collecting behavior data, you can define the following:

For best results, you should compile your application using the -g option, which allows the compiler to provide more detailed information for the Collector to gather.

For more information, see Collecting Performance Data in the WorkShop online help.


Using the Collector

Before you can collect data, runtime checking must be turned off.

There are a series of collector commands that you can use to collect performance data.

To start collecting data, use one of the following:

collector sample mode continuous
collector sample mode manual


Profiling

For non-multithreaded applications, you can get profiling for a selected region of the code by turing on profiling in the middle of the run and then turning it off at a convenient location. Given the restriction that you cannot turn on profiling in the middle of the run, you can get profiling for a selected region of code with the following:

You can't set this once the program starts running

Don't want profiling for the whole application

This is OK now because it was setup before the program run.

collector sample mode [ manual | continuous ]
collector profile mode [ pc_only | stack ]
stop in main
run
collector profile mode off 
....

#When you reach the beginning of the interesting point:

collector profile mode [ pc_only | stack ] 
....
#When you reach the end of the interesting point:

collector profile mode off


Collecting Data for Multithreaded Applications

Data collection for multithreaded applications is supported. There are some restrictions and limitation about multithreaded collection:

For multithreaded collecting:

collectormt


Command Reference

The syntax of the command is:

collector collector_commands

To stop collecting data, use one of these commands:

collector sample mode off
quit



collector show options

To show settings of one or more categories:

no option

List setting options

all

Show all settings

profile

Show profile settings

sample

Show sample settings

store

Show store settings

working_set

Show working_set settings

To specify profile options:

collector profile options



mode stack|pc_only|off
Specifies profile data collection mode
timer milliseconds
Stops collecting performance data

To specify one or more sample options:

collector sample options



mode continuous|manual|off
Specifies data collection mode
timer milliseconds
Specifies data collecting period

To inquire status about current experiment:

collector status

To find the directory or file name of the stored experiment:

collector store options



directory string
Specifies directory where experiment is stored
filename string
Specifies experiment file name

To specify working_set options:

collector working_set <options>



mode on|off
Specifies data collection mode




Previous Next Contents Index Doc Set Home