Example of Function Order List Generation

Assume you have a Fortran program that consists of files file1.f and file2.f and that you have created a directory for the profile data files in /usr/profdata. Do the following to generate and use a function order list.

1. Compile your program by specifying -prof_genx and -prof_dir:

IA-32 compiler:

prompt>ifc -oMYPROG -prof_genx -prof_dir/usr/profdata file1.f file2.f

Itanium(TM) compiler:

prompt>efc -oMYPROG -prof_genx -prof_dir/usr/profdata file1.f file2.f

2.  Run the instrumented program on one or more sets of input data.

  prompt>MYPROG

     The program produces a .dyn file each time it is executed.

3.  Merge the data from one or more runs of the instrumented program using the profmerge tool to produce the pgopti.dpi file.

prompt>profmerge -prof_dir/usr/profdata

4.  Generate the function order list using the proforder tool. By default, the function order list is produced in the file proford.txt.

prompt>proforder -prof_dir/usr/profdata -oMYPROG.txt

5.  Compile your application with profile feedback by specifying the -prof_use and the -ORDER option to the linker. Again, use the -prof_dir option to specify the location of the profile files.

IA-32 compiler:

prompt>ifc -oMYPROG -prof_use -prof_dir/usr/profdata file1.f file2.f -link -ORDER:@MYPROG.txt

Itanium compiler:

prompt>efc -oMYPROG -prof_use -prof_dir/usr/profdata file1.f file2.f -link -ORDER:@MYPROG.txt