Instrumentation And Profiling - IBM Power7 Optimization And Tuning Manual

Table of Contents

Advertisement

--verbose n (-v n), --print-inlined-funcs (-pif), and --journal file (-j file):
These options generate different analyses of the optimized file. -v
and optimization-specific statistics (.stat extension). The amount of verbosity is set by
Basic statistics are provided by -v 1. Optimization-specific statistics are added in level 2
and instruction mix in level 3. The list of inlining and inlined functions is produced with the
-pif option (.inl_list extension). The -j
optimizations, in an XML formal, with detailed information about each optimization site,
including the corresponding source file and line information. This information can be used
by GUI tools to display optimizations in the context of the source code.
Controlling output to the console
The amount of progress information that is printed to the console can be controlled by two
options. The default progress information is as follows
fdprpro (FDPR) Version vvv for Linux/POWER
fdprpro -a opt -O3 in -o out -f prof
> reading_exe ...
> adjusting_exe ...
> analyzing ...
> building_program_infrastructure ...
> building_profiling_cfg ...
> add_profiling ...
>> reading_profile ...
>> building_control_flow_transfer_profiling ...
> pre_reorder_optimizations ...
>> derat_optimization ...
...
This information might also be interspersed with warning and debugging messages. Use the
-quiet (-q) option to avoid progress information. To limit the warning information, use the
-warning l (-w l) option.

6.3.5 Instrumentation and profiling

FDPR instrumentation is performed by running the following command:
$ fdprpro -a instr in [-o out] [-f prof] [opts...]
If out is not specified, the output file is in in.instr. If the profile is not specified, in.nprof
is used.
Two files are created: the instrumented program and an empty profile. The instrumented
program (or shared library), when run on a representative workload, fills the profile with
execution counts of nodes and edges of the binary control flow graph (CFG). A node in this
CFG is a basic block (piece of code with single entry and exit points). An edge indicates a
control transfer between two basic blocks through a branch (regular branch, call, or
return instruction).
To run the instrumented program, use the same command parameters as with the original
program. As indicated in 6.3.1, "Introduction" on page 114, the workload that is exercised
during the instrumented run should be representative, making the optimization step more
effective. Because of the instrumentation code, the program is slower.
Successive runs of the instrumented program accumulate the counts in the same profile.
Similarly, if the instrumented program is a shared library, each time the shared library
participates in a process, the corresponding profile is updated with added counts.
file
Chapter 6. Compilers and optimization tools for C, C++, and Fortran
n
generates general
produces a journal of the main
n
.
117

Advertisement

Table of Contents
loading

This manual is also suitable for:

Power7+

Table of Contents