arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1411.6361cs.PL
收藏

硬件计数配置文件引导优化

Hardware Counted Profile-Guided Optimization

Baptiste Wicht, Roberto A. Vitillo, Dehao Chen, David Levinthal

摘要:

Profile-Guided Optimization(PGO)是一种提高编译程序性能的优秀方法。实际上,它提供的执行路径数据有助于编译器生成更好的代码和更好的缓存行打包。在撰写本文时,编译器仅支持基于插装的PGO。这对优化程序是有效的。然而,很少有项目使用它,因为它复杂的双重编译模型和高开销。我们的解决方案采样硬件性能计数器克服了这些缺点。在本文中,我们提出了一个PGO解决方案的GCC采样最后分支记录(LBR)事件,并使用调试符号来重新创建源位置的二进制指令。通过使用LBR采样,生成的配置文件非常准确。该解决方案的平均增益为基于插装的PGO的83%,仅在C++基准测试中为93%。分析开销平均仅为1.06%,而插装开销平均为16%。

英文摘要:

Profile-Guided Optimization (PGO) is an excellent means to improve the performance of a compiled program. Indeed, the execution path data it provides helps the compiler to generate better code and better cacheline packing. At the time of this writing, compilers only support instrumentation-based PGO. This proved effective for optimizing programs. However, few projects use it, due to its complicated dual-compilation model and its high overhead. Our solution of sampling Hardware Performance Counters overcome these drawbacks. In this paper, we propose a PGO solution for GCC by sampling Last Branch Record (LBR) events and using debug symbols to recreate source locations of binary instructions. By using LBR-Sampling, the generated profiles are very accurate. This solution achieved an average of 83% of the gains obtained with instrumentation-based PGO and 93% on C++ benchmarks only. The profiling overhead is only 1.06% on average whereas instrumentation incurs a 16% overhead on average.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑