See Also
How do I limit the recording of data to a specific part of my
program?
If you do not want to change your program, you can use dbx
collector subcommands to control data collection. If you are willing
to change your program, you can insert calls to the Collector API
functions.
To manually control data collection:
-
Set breakpoints at the points in your code where you want data
collection to start and stop.
-
Pause your program at the point where you want data collection to
begin.
-
Enable and configure the Collector. You can use the collector
enable command to enable the Collector.
-
Continue program execution.
-
At each breakpoint where you want data collection to stop, enter a
collector pause command.
-
At each breakpoint where you want data collection to resume, enter
a collector resume command.
-
When you have finished collecting data, disable the Sampling
Collector. You can use the collector disable command to
disable the Collector.
To automatically control data collection:
-
Set conditions for pausing and resuming data collection using the
Debugger Console tab of the Output window:
when resume-condition { collector resume; cont; }
when pause-condition { collector pause; cont; }
-
Pause your program at the point where you want data collection to
begin.
-
Enable and configure the Collector.
-
Continue program execution.
-
When you have finished collecting data, disable the Collector.
To control data collection from within your program:
-
Insert calls to the API routines collector_pause() and
collector_resume() inside your program.
-
Insert the include file in the functions that have calls to the API
routines. In a C or C++ program, insert the following line:
#include libcollector.h
In a Fortran program, insert the following line:
include "libfcollector.h"
-
Recompile and link your program.
Fortran programs must be linked with the -lfcollector option.
-
Run your program with the Collector enabled, using one out of the
collect command, dbx or the Dbx Debugger in the IDE.
Calls to the Collector API routines are ignored if data collection is
not enabled. Inserting API calls does not enable data collection.
You can also call collector_terminate_expt() from your program
to close the experiment when you have finished recording data.
Can't find what you are looking for?
Submit your comments at http://www.sun.com/hwdocs/feedback.
Legal Notices