IBM®
Skip to main content
    United States change      Terms of use
 
 
Select a scope:    
     Home      Products      Services & industry solutions      Support & downloads      My account     
alphaWorks  >  Systems management  >  

Post-Link Optimization for Linux on POWER

A post-link optimization utility for the POWER architecture that optimizes an executable program or a shared library, based on its run-time profile.


Date Posted: June 30, 2004
Overview Requirements DownloadFAQsForum Reviews

1. What is the difference between FDPR and FDPR-Pro?
2. After installation, I run FDPR (or FDPR-Pro) but the program is not found. What should I do?
3. FDPR-Pro is not found when running FDPR script. What happened?
4. I received a message that libfdprinst32.so (or libfdprinst64.so) is not found. What should I do?
5. FDPR-Pro fails because the input program is "stripped." What does this mean?
6. How do I teach FDPR-Pro to optimize the program for a specific workload?
7. FDPR fails in the training phase. Why?
8. Can an optimized program be used as input to the Post-Link Optimization tool?
9. Can an optimized program be debugged by GDB (or another user-level debugger)?


1. What is the difference between FDPR and FDPR-Pro?

Post-Link Optimization for Linux® on POWER™ is also called FDPR-Pro (Feedback Directed Program Restructuring). FDPR-Pro is the main optimization tool. It can either instrument a program or, if given the program's profile, optimize it. FDPR is the wrapper script that runs FDPR-Pro through the instrumentation phase, then collects the profile (the training phase), and, finally, runs the optimization phase.
Back to top Back to top

2. After installation, I run FDPR (or FDPR-Pro) but the program is not found. What should I do?

Follow the instructions in README.txt (see A2) and make sure the <installdir>/bin is in your command path.
Back to top Back to top

3. FDPR-Pro is not found when running FDPR script. What happened?

The FDPR wrapper script runs the actual FDPR-Pro optimizer. Make sure the FDPR-Pro is in the command path.
Back to top Back to top

4. I received a message that libfdprinst32.so (or libfdprinst64.so) is not found. What should I do?

These are the instrumentation shared libraries, provided in the installation. As the README.txt indicates, you must set the environment variable LD_LIBRARY_PATH to the directory containing them (or move them to the default shared library path).
Back to top Back to top

5. FDPR-Pro fails because the input program is "stripped." What does this mean?

FDPR-Pro requires that the input contain relocation information. This is achieved by specifying --emit-reloc (or -q) in in the link ("ld") command. If the link command is implicit in the compile command, add -Wl,-q to the (gcc) compile command. This passes the -q option to the linker.
Back to top Back to top

6. How do I teach FDPR-Pro to optimize the program for a specific workload?

First the program should be instrumented and its initial profile generated, as follows:
    $ fdprpro -a instr myprog
The output will be generated (by default) in myprog.instr and its profile in myprog.nprof.

Next, run myprog.instr on some typical workload. This will fill the profile file with information that characterizes the workload.

Finally, re-run FDPR-Pro with the profile file provided, as follows:

    $ fdprpro -a opt -f myprog.nprof [optimization options] myprog

Note that, given a script test, which runs the myprog.instr on a typical workload, all the above can be done in one command:

    $ fdpr --instr --train test --opt [optimization options] myprog
Back to top Back to top

7. FDPR fails in the training phase. Why?

Running of the instrumented program may fail for several reasons:
  • It cannot find the instrumentation library libfdprinst*.so. Check that the environment variable LD_LIBRARY_PATH includes the directory where these libraries are located.
  • It cannot find the profile file. It might be deleted or might not be not in its assumed location. Note that the location of the profile file is set in the instrumentation phase. By default, it is in the directory of the output file. In order to make sure that the instrumented program will find the profile file, you may set the environment variable FDPR_PROF_DIR to the directory containing the profile file.
  • FDPR runs a script, the parameter of the --train option. If the script exits with a non-zero exit status, FDPR detects this as a failure. Make sure that if the training script terminates correctly, it exits with a zero status.
Back to top Back to top

8. Can an optimized program be used as input to the Post-Link Optimization tool?

Currently this feature is not supported.

Back to top Back to top

9. Can an optimized program be debugged by GDB (or another user-level debugger)?

Yes. The optimized program is in a regular executable format and can be run by a Linux debugger. Symbolic information allows access to functions and data. However, currently the detailed debug information (that is, DWARF) is not updated, so, for example, mapping from program addresses to source lines is not possible.


Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
POWER is a trademark of IBM Corporation in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.

Back to top Back to top
Download now Download now

Related technologies

For platform(s):
Linux

For topics:
analysis, linux, optimization, performance, Power Architecture, Systems management


Related resources

Press Articles

 

    About IBM Privacy Contact