针对当前推测多线程优化中使用的离线剖析受到训练输入集限制的问题,提出一种根据在线剖析结果自动变换推测多线程程序的动态优化方法.该方法在程序运行时执行剖析和优化工作,不需要单独的剖析过程以及通用的训练输入集.该方法也适用于那些运行时行为特征呈阶段性变化的程序.实验表明,在指导事务划分和选择并行循环方面.动态优化方法能够达到和静态优化方法相似的效果,完全可以在离线剖析失效时被使用.
Traditionally offline profiling approach provides necessary information for the optimizations used in speculative multithreading. However, the offline profiling can't address the applications without appropriate training input. This paper proposes an online profile guided optimization approach to address this problem, which performs profiling and optimizing at runtime and doesn't need an individual profiling pass as well as good training inputs. Furthermore, our approach is also suitable for the applications with the phase-changed behavior. The evaluation shows that this approach is competent to serve as an individual guide to speculatively parallelize the applications when traditional off-line profiling is unavailable.