Sun Studio 12: Performance Analyzer

Starting the Performance Analyzer

To start the Performance Analyzer, type the following on the command line:

% analyzer [control-options] [experiment-list]

Alternatively, use the Explorer in the IDE to navigate to an experiment and open it. The experiment-list command argument is a blank-separated list of experiment names, experiment group names, or both.

You can specify multiple experiments or experiment groups on the command line. If you specify an experiment that has descendant experiments inside it, all descendant experiments are automatically loaded, but the display of data for the descendant experiments is disabled. To load individual descendant experiments you must specify each experiment explicitly or create an experiment group.

To create an experiment group, you can use the -g argument to the collect utility. To manually create an experiment group, create a plain text file whose first line is as follows:

#analyzer experiment group

Then add the names of the experiments on subsequent lines. The file extension must be erg.

You can also use the File menu in the Analyzer window to add experiments or experiment groups. To open experiments recorded on descendant processes, you must type the file name in the Open Experiment dialog box (or Add Experiment dialog box) because the file chooser does not permit you to open an experiment as a directory.

When the Analyzer displays multiple experiments, however they were loaded, data from all the experiments is aggregated.

You can preview an experiment or experiment group for loading by single-clicking on its name in either the Open Experiment dialog or the Add Experiment dialog.

You can also start the Performance Analyzer from the command line to record an experiment as follows:

% analyzer [Java-options] [control-options] target [target-arguments]

The Analyzer starts up with the Performance Tools Collect window showing the named target and its arguments, and settings for collecting an experiment. See Recording Experiments for details.

Analyzer Options

These options control the behavior of the Analyzer and are divided into three groups:

Java Options

-j | --jdkhome jvm-path

Specify the path to the JVM software for running the Analyzer. When the -j option is not specified, the default path is taken first by examining environment variables for a path to the JVM, in the order JDK_HOME and then JAVA_PATH. If neither environment variable is set, the default path is where the JavaTM 2 Software Development Kit was installed by the Sun Studio installer. If the SDK was not installed, the JVM found on the user’s PATH is used. Use the -j option to override all the default paths.

-J jvm-options

Specify the JVM options.

Control Options

-f | --fontsize size

Specify the font size to be used in the Analyzer GUI.

-v | --verbose

Print version information and Java runtime arguments before starting.

Information Options

These options do not invoke the Performance Analyzer GUI, but print information about analyzer to standard output. The individual options below are stand-alone options; they cannot be combined with other analyzer options nor combined with target or experiment-list arguments.

-V | --version

Print version information and exit.

-? | --h | --help

Print usage information and exit.

Analyzer Default Settings

The Analyzer uses resource files named .er.rc to determine default values for various settings upon startup. The system wide er.rc defaults file is read first, then an .er.rc file in the user’s home directory, if present, then an .er.rc file in the current directory. Defaults from the .er.rc file in your home directory override the system defaults, and defaults from the .er.rc file in the current directory override both home and system defaults. The .er.rc files are used by the Analyzer and the er_print utility. Any settings in .er.rc that apply to source and disassembly compiler commentary are also used by the er_src utility.

See the sections Default Settings for Analyzer for more information about the .er.rc files. See Commands That Set Defaults and Commands That Set Defaults Only For the Performance Analyzer for information about setting defaults with er_print commands.