paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Profile inference revisited

再探 Profile 推断
POPL 6(POPL)2022匹配度 3/10 · 该论文研究编译器 PGO 中的 Profile 推断与修正,属于程序分析与编译优化方向,具备理论算法和工业落地评估;但与用户当前核心方向(LLM/Agentic 程序静态分析、LLM 改进静态分析、浮点程序分析、贝叶斯程序分析)没有直接关联。引用 16 inbox
Wenlei He, Julián Mestre, Sergey Pupyrev, Lei Wang, Hongtao Yu
crossref: 2026-09-10

AI 速览

一句话:提出有理论保证的高效 Profile 推断算法,修正采样 Profile 并提升 PGO 生成代码性能。

采样式性能剖析(Profile)在数据中心环境广泛用于 PGO,但优化后二进制上的采样精度下降会削弱 PGO 收益。论文研究 Profile 推断/校正问题,沿用控制流图上的最小费用最大流建模,并扩展模型以刻画真实 Profile 所需性质;同时分析其算法与复杂度,给出理论依据。作者提出新的高效算法并实现于开源编译器。在 Facebook 生产负载和 SPEC CPU 基准上的评测表明,该方法相比现有 Profile 推断技术显著提高 Profile 数据精度,并改善生成二进制性能。

问题
采样得到的执行 Profile 往往存在不准确或不一致,如何在校正后恢复真实执行频次以提升 PGO 效果。
方法
将 Profile 推断建模为控制流图上的最小费用最大流,扩展模型并设计高效算法,在开源编译器中实现。
评估
在 Facebook 生产负载与 SPEC CPU 基准上,与已有 Profile 推断技术比较 Profile 精度和生成二进制性能。
原文摘要(Abstract)

Profile-guided optimization (PGO) is an important component in modern compilers. By allowing the compiler to leverage the program’s dynamic behavior, it can often generate substantially faster binaries. Sampling-based profiling is the state-of-the-art technique for collecting execution profiles in data-center environments. However, the lowered profile accuracy caused by sampling fully optimized binary often hurts the benefits of PGO; thus, an important problem is to overcome the inaccuracy in a profile after it is collected. In this paper we tackle the problem, which is also known as profile inference and profile rectification . We investigate the classical approach for profile inference, based on computing minimum-cost maximum flows in a control-flow graph, and develop an extended model capturing the desired properties of real-world profiles. Next we provide a solid theoretical foundation of the corresponding optimization problem by studying its algorithmic aspects. We then describe a new efficient algorithm for the problem along with its implementation in an open-source compiler. An extensive evaluation of the algorithm and existing profile inference techniques on a variety of applications, including Facebook production workloads and SPEC CPU benchmarks, indicates that the new method outperforms its competitors by significantly improving the accuracy of profile data and the performance of generated binaries.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot1548,
  title = {Profile inference revisited},
  author = {Wenlei He and Julián Mestre and Sergey Pupyrev and Lei Wang and Hongtao Yu},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {POPL},
  year = {2022},
  doi = {10.1145/3498714}
}