None.
Tunes optimizations through profile-directed feedback (PDF), where results from sample program execution are used to improve optimization near conditional branches and in frequently executed code sections.
Optimizes an application for a typical usage scenario based on an analysis of how often branches are taken and blocks of code are run.
.-nopdf2-----------------------------. +-nopdf1-----------------------------+ >>- -q--+-pdf1--+--------------------------+-+----------------->< | +-=--pdfname--=--file_path-+ | | +-=--unique----------------+ | | +-=--nounique--------------+ | | +-=--exename---------------+ | | +-=--defname---------------+ | | '-=--level--=--+-0-+-------' | | +-1-+ | | '-2-' | '-pdf2--+--------------------------+-' +-=--pdfname--=--file_path-+ +-=--exename---------------+ '-=--defname---------------'
-qnopdf1, -qnopdf2
Profiling type | Level | ||
---|---|---|---|
0 | 1 | 2 | |
Block-counter profiling | + | + | + |
Call-counter profiling | + | + | + |
Single-pass profiling | + | + | |
Value profiling | + | + | |
Multiple-pass profiling | + | ||
Cache-miss profiling | + |
-qpdf1=level=0 is the basic level that results in smaller file size and faster compilation than -qpdf1=level=1.
-qpdf1=level=1 is the default level. It is equivalent to -qpdf1 in releases earlier than IBM® XL Fortran for AIX®, V13.1.
-qpdf1=level=2 is more aggressive than -qpdf1=level=0 and -qpdf1=level=1. It is supported at all optimization levels where the PDF feature is enabled.
The compiler issues an information message with a number in the range of 0 - 100 during the -qpdf2 phase. If you have not changed your program between the -qpdf1 and -qpdf2 phases, the number is 100, which means that all the profiling information can be used to optimize the program. If the number is 0, it means that the profiling information is completely outdated, and the compiler cannot take advantage of any information. When the number is less than 100, you can choose to recompile your program with the -qpdf1 option and regenerate the profiling information.
Single-pass profiling
Single-pass profiling is supported on level 0 and 1 of the -qpdf1 phase. If you recompile your program and use either of the -qpdf1=level=0 or -qpdf1=level=1 option, the compiler removes the existing PDF file and the possible existing PDF map file before generating a new application.
Multiple-pass profiling
Other relative options
For recommended procedures of using PDF, see Profile-directed feedback.
>>-cleanpdf--+--------+--+-----+--+--------------+------------->< '-pdfdir-' '- -u-' '- -f--pdfname-'
Removes all PDF files or the specified PDF files, including PDF files with process ID suffixes. Removing profiling information reduces runtime overhead if you change the program and then go through the PDF process again.
If -f pdfname is not specified, ._pdf and files with the naming convention ._pdf.<multiple_pass_profiling_times>, if applicable, are removed.
If -f pdfname is not specified, removes ._pdf and files with the following naming convention when applicable:
Run cleanpdf only when you finish the PDF process for a particular application. Otherwise, if you want to resume by using PDF process with that application, you must compile all of the files again with -qpdf1.
.-------------------------. V | >>-mergepdf----+--------------+--input-+-- -o--output--+-----+--+-----+->< '- -r--scaling-' '- -n-' '- -v-'
Merges two or more PDF files into a single PDF file.
>>-resetpdf--+--------+--+-----+--+--------------+------------->< '-pdfdir-' '- -u-' '- -f--pdfname-'
Same as cleanpdf.
Displays part of the profiling information written to PDF and PDF map files. To use this command, you must first compile your program and use the -qpdf1 option. See Viewing profiling information with showpdf for more information.
None.
#Compile all the files with -qpdf1=level=0
xlf -qpdf1=level=0 -O3 file1.f file2.f file3.f
#Run with one set of input data
./a.out < sample.data
#Recompile all the files with -qpdf2
xlf -qpdf2 -O3 file1.f file2.f file3.f
#If the sample data is typical, the program
#can now run faster than without the PDF process
#Compile all the files with -qpdf1
xlf -qpdf1 -O3 file1.f file2.f file3.f
#Run with one set of input data
./a.out < sample.data
#Recompile all the files with -qpdf2
xlf -qpdf2 -O3 file1.f file2.f file3.f
#If the sample data is typical, the program
#can now run faster than without the PDF process
#Compile all the files with -qpdf1=level=2
xlf -qpdf1=level=2 -O3 file1.f file2.f file3.f
#Set PM_EVENT=L2MISS to gather L2 cache-miss profiling
#information
export PDF_PM_EVENT=L2MISS
#Run with one set of input data
./a.out < sample.data
#Recompile all the files with -qpdf2
xlf -qpdf2 -O3 file1.f file2.f file3.f
#If the sample data is typical, the program
#can now run faster than without the PDF process
#Compile all the files with -qpdf1=level=2
xlf -qpdf1=level=2 -O3 file1.f file2.f file3.f
#Set PM_EVENT=L1MISS to gather L1 cache-miss profiling
#information
export PDF_PM_EVENT=L1MISS
#Run with one set of input data
./a.out < sample.data
#Set PM_EVENT=L2MISS to gather L2 cache-miss profiling
#information
export PDF_PM_EVENT=L2MISS
#Run with one set of input data
./a.out < sample.data
#Recompile all the files with -qpdf2
xlf -qpdf2 -O3 file1.f file2.f file3.f
#If the sample data is typical, the program
#can now run faster than without the PDF process
#Compile all the files with -qpdf1=level=2. The static profiling
#information is recorded in a file named ._pdf_map by default
xlf -qpdf1=level=2 -O3 file1.f file2.f file3.
#Run with one set of input data, the profiling information
#is recorded in a file named ._pdf by default
./a.out < sample.data
#Recompile all the files with -qpdf1=level=2 again
#The compiler reads the previous profiling information, refines
#instrumentation, and generates a new instrumented
#executable. The static profiling information
#is recorded in ._pdf.1_map
xlf -qpdf1=level=2 -O3 file1.f file2.f file3.f
#Run it again, the profiling information is recorded in
#._pdf.1
./a.out < sample.data
#Recompile all the files with -qpdf2
xlf -qpdf2 -O3 file1.f file2.f file3.f
#If the sample data is typical, the program
#can now run faster than without the PDF process
#Compile all the files with -qpdf1=level=1
xlf -qpdf1=level=1 -O3 file1.f file2.f file3.
#Set PDF_BIND_PROCESSOR environment variable so that
#all processes for this executable are run on Processor 1
export PDF_BIND_PROCESSOR=1
#Run executable with sample input data
./a.out < sample.data
#Recompile all the files with -qpdf2
xlf -qpdf2 -O3 file1.f file2.f file3.f
#If the sample data is typical, the program
#can now run faster than without the PDF process
#Compile all the files with -qpdf1=exename
xlf -qpdf1=exename -O3 -o final file1.f file2.f file3.f
#Run executable with sample input data
./final < typical.data
#List the content of the directory
>ls -lrta
-rw-r--r-- 1 user staff 50 Dec 05 13:18 file1.f
-rw-r--r-- 1 user staff 50 Dec 05 13:18 file2.f
-rw-r--r-- 1 user staff 50 Dec 05 13:18 file3.f
-rwxr-xr-x 1 user staff 12243 Dec 05 17:00 final
-rwxr-Sr-- 1 user staff 762 Dec 05 17:03 .final_pdf
#Recompile all the files with -qpdf2=exename
xlf -qpdf2=exename –O3 -o final file1.f file2.f file3.f
#The program is now optimized using PDF information
#Compile all the files with -qpdf1=pdfname.The static profiling
#information is recorded in a file named final_map
xlf -qpdf1=pdfname=final -O3 file1.f file2.f file3.f
#Run executable with sample input data.The profiling
#information is recorded in a file named final
./a.out < typical.data
#List the content of the directory
>ls -lrta
-rw-r--r-- 1 user staff 50 Dec 05 13:18 file1.f
-rw-r--r-- 1 user staff 50 Dec 05 13:18 file2.f
-rw-r--r-- 1 user staff 50 Dec 05 13:18 file3.f
-rwxr-xr-x 1 user staff 12243 Dec 05 18:30 a.out
-rwxr-Sr-- 1 user staff 762 Dec 05 18:32 final
#Recompile all the files with -qpdf2=pdfname
xlf -qpdf2=pdfname=final -O3 file1.f file2.f file3.f
#The program is now optimized using PDF information