Profile Feedback Enhancements


  1. Implement a switch to allow picking up profile data from different directories than where object files are
  2. Make profile collection MT-safe by making counters thread local
  3. Implement a switch to tolerate flow inconsistent profile data due to undercounting caused by MT-unsafe instrumentation.
  4. Make profile data valid across trivial source changes
  5. Add indirect function call target profiling
  6. Implement indirect call elimination using indirect call target profile
  7. Add function parameter value profiling (memcpy/strcpy length, etc)


1-4 are to increase the useability of profile feedback based optimization.

5 & 6 will improve the performance in languages that use indirect function calls extensively (C++/Java/etc).

7 will improve the performance when those functions can be specialized depending on the value of the certain parameters. e.g. small memcpy() can be inlined with a branch for size check.


Seongbae Park

Proposed integration:



As of 2006-10-17, 1, 3, 4, 5 are in a working prototype stage passing some nontrivial benchmarks. 6 are in development. 2 and 7 are only in the planning.

All work is pending on the Google's copyright assignment being accepted by FSF. Also, note that PR28441 will provide the atomic increment. I also have the similar change that accomplishes the same, but can not provide the patch due to the lack of copyright assighment.

None: ProfileFeedbackEnhancements (last edited 2008-01-10 19:38:52 by localhost)