Profile Feedback Enhancements
Items
- Implement a switch to allow picking up profile data from different directories than where object files are
- Make profile collection MT-safe by making counters thread local
- Implement a switch to tolerate flow inconsistent profile data due to undercounting caused by MT-unsafe instrumentation.
- Make profile data valid across trivial source changes
- Add indirect function call target profiling
- Implement indirect call elimination using indirect call target profile
- Add function parameter value profiling (memcpy/strcpy length, etc)
Benefits
1-4 are to increase the useability of profile feedback based optimization.
- #1 will make the existing profile feedback infrastructure more useable when you do not have access to your object file directories in your execution environment.
- #2 will allow accurate profile data in the multithreaded code with less overhead than using atomic increment
- #3 will allow inaccurate undercounted profile data to be useable for optimization.
- #4 will allow profile data to be reuseable across source changes. i.e. you don't need to redo the profile collection everytime you make a trivial source code changes.
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.
Personel:
Seongbae Park
Proposed integration:
4.3
Status:
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.