Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Studio 12.3: Performance Analyzer Oracle Solaris Studio 12.3 Information Library |
1. Overview of the Performance Analyzer
3. Collecting Performance Data
Compiling and Linking Your Program
Preparing Your Program for Data Collection and Analysis
Using Dynamically Allocated Memory
Program Control of Data Collection
The C, C++, Fortran, and Java API Functions
Limitations on Data Collection
Limitations on Clock-Based Profiling
Runtime Distortion and Dilation with Clock-profiling
Limitations on Collection of Tracing Data
Runtime Distortion and Dilation with Tracing
Limitations on Hardware Counter Overflow Profiling
Runtime Distortion and Dilation With Hardware Counter Overflow Profiling
Limitations on Data Collection for Descendant Processes
Limitations on OpenMP Profiling
Experiments for Descendant Processes
Experiments on the Kernel and User Processes
Estimating Storage Requirements
Collecting Data Using the collect Command
-h counter_definition_1...[,counter_definition_n]
Collecting Data From a Running Process Using the collect Utility
To Collect Data From a Running Process Using the collect Utility
Collecting Data Using the dbx collector Subcommands
To Run the Collector From dbx:
Collecting Data From a Running Process With dbx on Oracle Solaris Platforms
To Collect Data From a Running Process That is Not Under the Control of dbx
Collecting Tracing Data From a Running Program
Collecting Data From MPI Programs
Running the collect Command for MPI
4. The Performance Analyzer Tool
5. The er_print Command Line Performance Analysis Tool
6. Understanding the Performance Analyzer and Its Data
This section shows how to run the Collector from dbx, and then explains each of the subcommands that you can use with the collector command within dbx.
% dbx program
(dbx) collector subcommand
To get a listing of available collector subcommands, type:
(dbx) help collector
You must use one collector command for each subcommand.
If a subcommand is incorrectly given, a warning message is printed and the subcommand is ignored. A complete listing of the collector subcommands follows.
The following subcommands can be used with the collector command within dbx to control the types of data that are collected by the Collector. They are ignored with a warning if an experiment is active.
Controls the collection of clock-based profiling data. The allowed values for option are:
on – Enables clock-based profiling with the default profiling interval of 10 ms.
off – Disables clock-based profiling.
timer interval - Sets the profiling interval. The allowed values of interval are
on – Use the default profiling interval of approximately 10 milliseconds.
lo[w] – Use the low-resolution profiling interval of approximately 100 milliseconds.
hi[gh] – Use the high-resolution profiling interval of approximately 1 millisecond. See Limitations on Clock-Based Profiling for information on enabling high-resolution profiling.
value - Set the profiling interval to value. The default units for value are milliseconds. You can specify value as an integer or a floating-point number. The numeric value can optionally be followed by the suffix m to select millisecond units or u to select microsecond units. The value should be a multiple of the clock resolution. If the value is larger than the clock resolution but not a multiple it is rounded down. If the value is smaller than the clock resolution it is set to the clock resolution. In both cases a warning message is printed.
The default setting is approximately 10 milliseconds.
The Collector collects clock-based profiling data by default, unless the collection of hardware-counter overflow profiling data is turned on using the hwprofile subcommand.
Controls the collection of hardware counter overflow profiling data. If you attempt to enable hardware counter overflow profiling on systems that do not support it, dbx returns a warning message and the command is ignored. The allowed values for option are:
on – Turns on hardware counter overflow profiling. The default action is to collect data for the cycles counter at the normal overflow value.
off – Turns off hardware counter overflow profiling.
list – Returns a list of available counters. See Hardware Counter Lists for a description of the list. If your system does not support hardware counter overflow profiling, dbx returns a warning message.
counter counter_definition... [, counter_definition ] – A counter definition takes the following form.
[+]counter_name[~ attribute_1=value_1]...[~attribute_n =value_n][/ register_number][,interval ]
Selects the hardware counter name, and sets its overflow value to interval; optionally selects additional hardware counter names and sets their overflow values to the specified intervals. The overflow value can be one of the following.
on, or a null string – The default overflow value, which you can determine by typing collect -h with no additional arguments.
hi[gh] – The high-resolution value for the chosen counter, which is approximately ten times shorter than the default overflow value. The abbreviation h is also supported for compatibility with previous software releases.
lo[w] – The low-resolution value for the chosen counter, which is approximately ten times longer than the default overflow value.
interval – A specific overflow value, which must be a positive integer and can be in decimal or hexadecimal format.
If you specify more than one counter, they must use different registers. If they do not, a warning message is printed and the command is ignored.
If the hardware counter counts events that relate to memory access, you can prefix the counter name with a + sign to turn on searching for the true PC of the instruction that caused the counter overflow. If the search is successful, the PC and the effective address that was referenced are stored in the event data packet.
The Collector does not collect hardware counter overflow profiling data by default. If hardware-counter overflow profiling is enabled and a profile command has not been given, clock-based profiling is turned off.
See also Limitations on Hardware Counter Overflow Profiling.
Controls the collection of synchronization wait tracing data. The allowed values for option are
on – Enable synchronization wait tracing with the default threshold.
off – Disable synchronization wait tracing.
threshold value - Sets the threshold for the minimum synchronization delay. The allowed values for value are:
all – Use a zero threshold. This option forces all synchronization events to be recorded.
calibrate – Set the threshold value by calibration at runtime. (Equivalent to on.)
off – Turn off synchronization wait tracing.
on – Use the default threshold, which is to set the value by calibration at runtime. (Equivalent to calibrate.)
number - Set the threshold to number, given as a positive integer in microseconds. If value is 0, all events are traced.
By default, the Collector does not collect synchronization wait tracing data.
Controls the collection of heap tracing data. The allowed values for option are
on – Enables heap tracing.
off – Disables heap tracing.
By default, the Collector does not collect heap tracing data.
Collect data for data race detection or deadlock detection for the Thread Analyzer. The allowed values are:
off – Turn off thread analyzer data collection
all – Collect all thread analyzer data
race - Collect data-race-detection data
deadlock – Collect deadlock and potential-deadlock data
For more information about the Thread Analyzer, see the Oracle Solaris Studio 12.3: Thread Analyzer User’s Guide and the tha.1 man page.
Controls the sampling mode. The allowed values for option are:
periodic – Enables periodic sampling.
manual – Disables periodic sampling. Manual sampling remains enabled.
period value – Sets the sampling interval to value, given in seconds.
By default, periodic sampling is enabled, with a sampling interval value of 1 second.
Controls the recording of samples when dbx stops the target process. The meanings of the keywords are as follows:
on – A sample is recorded each time dbx stops the target process.
off – Samples are not recorded when dbx stops the target process.
By default, samples are recorded when dbx stops the target process.
The following subcommands can be used with the collector command within dbx to control the collection of experiment data by the Collector. The subcommands are ignored with a warning if an experiment is active.
Disables data collection. If a process is running and collecting data, it terminates the experiment and disables data collection. If a process is running and data collection is disabled, it is ignored with a warning. If no process is running, it disables data collection for subsequent runs.
Enables data collection. If a process is running but data collection is disabled, it enables data collection and starts a new experiment. If a process is running and data collection is enabled, it is ignored with a warning. If no process is running, it enables data collection for subsequent runs.
You can enable and disable data collection as many times as you like during the execution of any process. Each time you enable data collection, a new experiment is created.
Suspends the collection of data, but leaves the experiment open. Sample points are not recorded while the Collector is paused. A sample is generated prior to a pause, and another sample is generated immediately following a resume. This subcommand is ignored if data collection is already paused.
Resumes data collection after a pause has been issued. This subcommand is ignored if data is being collected.
Record a sample packet with the label name. The label is displayed in the Timeline Details tab of the Performance Analyzer.
The following subcommands can be used with the collector command within dbx to define storage options for the experiment. The subcommands are ignored with a warning if an experiment is active.
Set the mode for archiving the experiment. The allowed values for mode are
on – normal archiving of load objects
off – no archiving of load objects
copy – copy load objects into experiment in addition to normal archiving
If you intend to move the experiment to a different machine, or read it from another machine, you should enable the copying of load objects. If an experiment is active, the command is ignored with a warning. This command does not copy source files or object files into the experiment.
Limit the amount of profiling data recorded to value megabytes. The limit applies to the sum of the amounts of clock-based profiling data, hardware counter overflow profiling data, and synchronization wait tracing data, but not to sample points. The limit is only approximate, and can be exceeded.
When the limit is reached, no more profiling data is recorded but the experiment remains open and sample points continue to be recorded.
By default, the amount of data recorded is unlimited.
Governs where the experiment is stored. This command is ignored with a warning if an experiment is active. The allowed values for option are:
directory directory-name – Sets the directory where the experiment and any experiment group is stored. This subcommand is ignored with a warning if the directory does not exist.
experiment experiment-name – Sets the name of the experiment. If the experiment name does not end in .er, the subcommand is ignored with a warning. See Where the Data Is Stored for more information on experiment names and how the Collector handles them.
group group-name – Sets the name of the experiment group. If the group name does not end in .erg, the subcommand is ignored with a warning. If the group already exists, the experiment is added to the group. If the directory name has been set using the store directory subcommand and the group name is not an absolute path, the group name is prefixed with the directory name.
The following subcommands can be used with the collector command within dbx to get reports about Collector settings and experiment status.
Shows the current setting of every Collector control.