29.5.2. Using opreport on a Single Executable
To retrieve more detailed profiled information about a specific executable, use
opreport
:
opreport mode executable
~]# opreport mode executableopreport mode executableopreport mode executableopreport mode executable
executable must be the full path to the executable to be analyzed. mode must be one of the following:
-
-l
- List sample data by symbols. For example, the following is part of the output from running the command
opreport -l /lib/tls/libc-version.so
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The first column is the number of samples for the symbol, the second column is the percentage of samples for this symbol relative to the overall samples for the executable, and the third column is the symbol name.To sort the output from the largest number of samples to the smallest (reverse order), use-r
in conjunction with the-l
option. -
-i symbol-name
- List sample data specific to a symbol name. For example, the following output is from the command
opreport -l -i __gconv_transform_utf8_internal /lib/tls/libc-version.so
:samples % symbol name 12 100.000 __gconv_transform_utf8_internal
samples % symbol name 12 100.000 __gconv_transform_utf8_internal
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The first line is a summary for the symbol/executable combination.The first column is the number of samples for the memory symbol. The second column is the percentage of samples for the memory address relative to the total number of samples for the symbol. The third column is the symbol name. -
-d
- List sample data by symbols with more detail than
-l
. For example, the following output is from the commandopreport -l -d __gconv_transform_utf8_internal /lib/tls/libc-version.so
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The data is the same as the-l
option except that for each symbol, each virtual memory address used is shown. For each virtual memory address, the number of samples and percentage of samples relative to the number of samples for the symbol is displayed. -
-x
symbol-name - Exclude the comma-separated list of symbols from the output.
-
session
:name - Specify the full path to the session or a directory relative to the
/var/lib/oprofile/samples/
directory.