paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Predicting Compilation Resources for Adaptive Build in an Industrial Setting

在工业环境中预测编译资源以实现自适应构建
ASE 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)2023匹配度 4/10 · 论文用机器学习预测 C++ 编译资源,属于 PL 与 ML 交叉的工业落地,且问题驱动、有实际部署;但未涉及静态分析、形式化验证、LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心方向,仅与广义的“机器学习+程序语言/构建系统”相邻。引用 4 inbox
Junhao Hu, Chaozheng Wang, Hailiang Huang, Huang Luo, Yu Jin, Yuetang Deng, Tao Xie
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 PCRLINEAR,预测 C++ 文件编译所需内存与时间,使分布式构建系统能自适应调度编译资源。

大型企业维护的巨型代码库在单机上构建耗时极长,因此常采用 Bazel、distcc 等工具进行分布式构建。但分布式构建中远程从机常因两类错误崩溃:内存溢出(OOM)与超时(Deadline Exceeded,DE),导致代价高昂的重建,腾讯微信事业群(WXG)即深受其害。为预防这两类错误,论文提出 PCRLINEAR:对给定 C++ 文件预测其编译所需的内存与时间,进而让底层分布式构建系统依据预测结果自适应地调度编译资源。实验表明,PCRLINEAR 将 OOM 与 DE 错误率从 5% 降至 0.2%,同时平均带来约 30% 的构建性能提升。

问题
分布式构建中远程从机因 OOM 与超时错误崩溃,引发耗时重建,亟需在调度前掌握每个编译单元的资源需求。
方法
提出 PCRLINEAR,对给定 C++ 文件的编译内存与时间需求进行预测,并据此驱动分布式构建系统的自适应资源调度。
评估
在工业级代码库上进行实验,对比错误率与构建性能:OOM/DE 错误由 5% 降到 0.2%,平均构建性能提升 30%。
原文摘要(Abstract)

Development teams in large companies often maintain a huge codebase whose build time can be painfully long in a single machine. To reduce the build time, tools such as Bazel and distcc are used to build the code base in a distributed way. However, in the process of distributed build, certain remote slave machines can crash due to two types of errors: Out Of Memory (OOM) and Deadline Exceeded (DE) errors. These crashes lead to time-consuming rebuilds, as suffered by the WeiXin Group (WXG) of Tencent Inc. (the vendor of WeChat, a highly popular mobile app in China). Aiming to prevent these two types of errors, in this paper, we propose a new approach named PCRLINEAR, which predicts the memory and time requirements of the given C++ file, allowing the underlying distributed build system to schedule compilation resources adaptively according to the prediction results. Our experiments show that PCRLINEAR reduces the number of OOM and DE errors from 5% to 0.2% and, at the same time, achieves substantial build-performance improvement of 30% on average.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{HuWHLJDX23,
  title = {Predicting Compilation Resources for Adaptive Build in an Industrial Setting},
  author = {Junhao Hu and Chaozheng Wang and Hailiang Huang and Huang Luo and Yu Jin and Yuetang Deng and Tao Xie},
  booktitle = {ASE},
  year = {2023},
  doi = {10.1109/ase56229.2023.00128}
}