Oracle® Solaris Studio 12.4: Performance Analyzer

Exit Print View

Updated: January 2015
 
 

Source View

If the source code is available, the Source view shows the file containing the source code of the selected function, annotated with performance metrics in columns to the left of each source line.

High metrics are highlighted in yellow to indicate source lines that are hot areas of resource usage. A yellow navigation marker is also shown in a margin next to the scrollbar on the right for each hot source line. Non-zero metrics that are below the hot threshold are not highlighted, but are flagged with yellow navigation markers.

To quickly navigate to source lines with metrics, click the yellow markers in the right margin to jump to the lines with metrics. To jump to the next line with metrics, right-click the metrics themselves and select an option such as Next Hot Line or Next Non-Zero Metric Line.

You can set the threshold for highlighting metrics in the Settings dialog box, in the Source/Disassembly tab.

The Source view shows the full paths to the source file and the corresponding object file, and the name of the load object in the column heading for the source code. In the rare case where the same source file is used to compile more than one object file, the Source view shows the performance data for the object file containing the selected function.

If Performance Analyzer cannot find a source file, you can click the Resolve button in the Source view to browse to the source file or type the path to the source or browse to it and then the source code is displayed from the new location. When you do this a pathmap is created in the experiment so that the source can be found the next time you open it.

See How the Tools Find Source Code for a description of the process used to find an experiment's source code.

When you double-click a function in the Functions view and the Source view is opened, the source file displayed is the default source context for that function. The default source context of a function is the file containing the function’s first instruction, which for C code is the function’s opening brace. Immediately following the first instruction, the annotated source file adds an index line for the function. The source window displays index lines as text in red italics within angle brackets in the form:

<Function: f_name>

A function might have an alternate source context, which is another file that contains instructions attributed to the function. Such instructions might come from include files or from other functions inlined into the selected function. If there are any alternate source contexts, the beginning of the default source context includes a list of extended index lines that indicate where the alternate source contexts are located.

<Function: f, instructions from source file src.h>

Double-click an index line that refers to another source context opens the file containing that source context at the location associated with the indexed function.

To aid navigation, alternate source contexts also start with a list of index lines that refer back to functions defined in the default source context and other alternate source contexts.

The source code is interleaved with any compiler commentary that has been selected for display. You can set the classes of commentary shown in the Settings dialog box. The default classes can be set in a .er.rc defaults file.

The metrics displayed in the Source view can be changed or reorganized. See the Help menu for details.

For detailed information about the content of the Source view, see Performance Analyzer Source View Layout.