Go to main content
Oracle® Developer Studio 12.5: Performance Analyzer

Exit Print View

Updated: June 2016
 
 

Commands That Control the Source and Disassembly Listings

The following commands control how annotated source and disassembly code is displayed.

source|src { filename | function-name } [ N]

Write out annotated source code for either the specified file or the file containing the specified function. The file in either case must be in a directory in your path. If the source was compiled with the GNU Fortran compiler, you must add two underscore characters after the function name as it appears in the source.

Use the optional parameter N (a positive integer) only in those cases where the file or function name is ambiguous; in this case, the Nth possible choice is used. If you provide an ambiguous name without the numeric specifier, the er_print utility prints a list of possible object-file names. If the name you gave was a function, the name of the function is appended to the object-file name, and the number that represents the value of N for that object file is also printed.

The function name can also be specified as function”file” , where file is used to specify an alternate source context for the function. Immediately following the first instruction, an index line is added for the function. Index lines are displayed as text within angle brackets in the following form:

<Function: f_name>

The default source context for any function is defined as the source file to which the first instruction in that function is attributed. It is normally the source file compiled to produce the object module containing the function. Alternate source contexts consist of other files that contain instructions attributed to the function. Such contexts include instructions coming from include files and instructions from functions inlined into the named function. If there are any alternate source contexts, include a list of extended index lines at the beginning of the default source context to indicate where the alternate source contexts are located in the following form:

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


Note -  If you use the -source argument when invoking the er_print utility on the command line, the backslash escape character must prepend the file quotes. In other words, the function name is of the form function\”file\”. The backslash is not required, and should not be used, when the er_print utility is in interactive mode.

Normally, when the default source context is used, metrics are shown for all functions from that file. Referring to the file explicitly shows metrics only for the named function.

disasm|dis { filename | function-name } [ N]

Write out annotated disassembly code for either the specified file, or the file containing the specified function. The file must be in a directory in your path.

The optional parameter N is used in the same way as for the source command.

scc com-spec

Specify the classes of compiler commentary that are shown in the annotated source listing. The class list is a colon-separated list of classes containing zero or more of the following message classes.

Table 11  Compiler Commentary Message Classes
Class
Meaning
b[asic]
Show the basic level messages.
v[ersion]
Show version messages, including source file name and last modified date, versions of the compiler components, compilation date and options.
pa[rallel]
Show messages about parallelization.
q[uery]
Show questions about the code that affect its optimization.
l[oop]
Show messages about loop optimizations and transformations.
pi[pe]
Show messages about pipelining of loops.
i[nline]
Show messages about inlining of functions.
m[emops]
Show messages about memory operations, such as load, store, and prefetch.
f[e]
Show front-end messages.
co[degen]
Show code generator messages.
cf
Show compiler flags at the bottom of the source.
all
Show all messages.
none
Do not show any messages.

The classes all and none cannot be used with other classes.

If no scc command is given, the default class shown is basic. If the scc command is given with an empty class-list, compiler commentary is turned off. The scc command is normally used only in an .er.rc file.

sthresh value

Specify the threshold percentage for highlighting metrics in the annotated source code. If the value of any metric is equal to or greater than value % of the maximum value of that metric for any source line in the file, the line on which the metrics occur has ## inserted at the beginning of the line.

dcc com-spec

Specify the classes of compiler commentary that are shown in the annotated disassembly listing. The class list is a colon-separated list of classes. The list of available classes is the same as the list of classes for annotated source code listing shown in Table 11. You can add the options in the following table to the class list.

Table 12  Additional Options for the dcc Command
Option
Meaning
h[ex]
Show the hexadecimal value of the instructions.
noh[ex]
Do not show the hexadecimal value of the instructions.
s[rc]
Interleave the source listing in the annotated disassembly listing.
nos[rc]
Do not interleave the source listing in the annotated disassembly listing.
as[rc]
Interleave the annotated source code in the annotated disassembly listing.

dthresh value

Specify the threshold percentage for highlighting metrics in the annotated disassembly code. If the value of any metric is equal to or greater than value % of the maximum value of that metric for any instruction line in the file, the line on which the metrics occur has ## inserted at the beginning of the line.

cc com-spec

Specify the classes of compiler commentary that are shown in the annotated source and disassembly listing. The class list is a colon-separated list of classes. The list of available classes is the same as the list of classes for annotated source code listing shown in Table 11.