To generate a function order list, the profmerge and proforder utilities are used.
You will need to use the profmerge utility to merge the .dyn files.
This tool merges the dynamic profile information files (.dyn). The compiler executes this tool automatically during the feedback compilation phase when you specify -prof_use. The command-line usage for profmerge is as follows:
IA-32 applications:
prompt>profmerge [-nologo] [-prof_dirdirname]
Itanium(TM)-based applications:
prompt>profmerge -em -p64 [-nologo] [-prof_dirdirname]
where -prof_dirdirname is a profmerge utility option.
This merges all .dyn files in the current directory or the directory specified by -prof_dir, and produces the summary file pgopti.dpi.
The -prof_filefilename option enables you to specify the name of the .dpi file.
The command-line usage for profmerge with -prof_filefilename is as follows:
IA-32 compiler:
prompt>profmerge [-nologo] [-prof_filefilename]
Itanium™ compiler:
prompt>profmerge -em -p64 [-nologo] [-prof_filefilename]
where /prof_filefilename is a profmerge utility option.
Use proforder to generate a function order list for use with the -ORDER linker option. The syntax for this tool is as follows:
prompt>proforder [-prof_dirdir_name] [-oorder_file]
where /prof_dirdirname is a proforder utility option.
dir_name |
is the directory containing the profile files (.dpi, .dyn, and .spi) |
order_file |
is the optional name of the function order list file. The default name is proford.txt |
The proforder utility is used as part of the feedback compilation phase, to improve program performance.
To specify the filename of the .dpi file, use -prof_filefilename option. The syntax for proforder with its -prof_filefilename option is:
prompt>proforder [-prof_filefilename] [-oorderfile]
The Intel® Fortran Compiler provides two methods of optimizing the layout of functions in the executable:
use of a function order list
use of -ipo
Each method has its advantages. A function order list, created with proforder, enables you to optimize the layout of non-static functions; that is, external and library functions whose names are exposed to the linker.
The compiler cannot affect the layout order for functions it does not compile, such as library functions. The function layout optimization is performed automatically when IPO is active.
Effects of the Function Order List |
||
Function Type |
Code Layout with |
Function Ordering with proforder |
Extern |
X |
X |
Library |
No effect |
X |
As part of the instrumented execution phase of profile-guided optimization,
the instrumented program writes profile data to the dynamic information
file (.dyn file). The file is written after the
instrumented program returns normally from main()
or calls the standard exit function. Programs that do not terminate normally,
can use the _PGOPTI_Prof_Dump function. During
the instrumentation compilation
(-prof_gen) you can add a call to this function
to your program. Here is an example:
INTERFACE |
Note
You must remove the call or comment it out prior to the feedback compilation
with -prof_use.