Kenwood HP 9000 Personal Computer User Manual


 
Chapter 8 275
Ways to Improve Performance
Profile-Based Optimization
When to Use PBO
PBO should be the last level of optimization you use when building an
application. As with other optimizations, it should be performed after an
application has been completely debugged.
Most applications will benefit from PBO. The two types of applications
that will benefit the most from PBO are:
Applications that exhibit poor instruction memory locality. These are
usually large applications in which the most common paths of
execution are spread across multiple compilation units. The loops in
these applications typically contain large numbers of statements,
procedure calls, or both.
Applications that are branch-intensive. The operations performed in
such applications are highly dependent on the input data. User
interface managers, database managers, editors, and compilers are
examples of such applications.
Of course, the best way to determine whether PBO will improve an
application's performance is to try it.
NOTE Under some conditions, PBO is incompatible with programs that
explicitly load shared libraries. Specifically, PBO will not function
properly if the shl_load routine has either the BIND_FIRST or the
BIND_NOSTART flags set. For more information about explicit loading of
shared libraries, see “The shl_load and cxxshl_load Routines” on page
215.
How to Use PBO
Profile-based optimization involves these steps:
1. Instrument the application — prepare the application so that it will
generate profile data.
2. Profile the application — create profile data that can be used to
optimize the application.
3. Optimize the application — generate optimized code based on the
profile data.