paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Optimizer-Friendly Instrumentation for Event Quantification with PRUE Algorithm

基于 PRUE 算法的优化器友好型事件量化插桩
ASPLOS Proceedings of the 31st ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 22026匹配度 2/10 · 论文属于传统程序分析与编译优化领域,研究插桩与静态分析(PRUE)以降低事件量化开销,但未涉及用户核心关注的LLM/Agent与静态分析交叉、浮点程序分析或贝叶斯程序分析,因此匹配度很低。引用 0 inbox
Hao Ling, Yiyuan Guo, Charles Zhang
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 Zircon:首个优化器友好的事件量化插桩,用局部计数器与 PRUE 算法消除冗余更新,大幅降低开销。

事件量化通过插桩为运行时事件提供频率信息,广泛用于构建快速、安全、可靠的软件系统,但插桩引入的新指令会带来显著运行时开销。核心挑战在于:插桩指令的副作用会干扰现代编译器优化,使其难以从中获益。已有工作尝试用具有透明生命周期和作用域的局部计数器替代全局计数器,从而让优化更容易成功,但局部计数器对外部不可观测,仍需全局计数器,而何时依据局部计数器更新全局计数器本身又会引入副作用。本文提出部分冗余更新消除(PRUE)算法来解决更新决策问题,并实现 Zircon——首个优化器友好的事件量化插桩系统。Zircon 借助局部计数器将事件发生与量化分离,把带副作用的指令移出优化器作用域,再通过静态分析变换程序并剪除冗余更新路径。在 SPEC CPU 2017 上,Zircon 相比 SanCov 和 Nisse 等最先进工作最高快 149%,且不牺牲精度,充分借助编译器优化自动获得性能收益。

问题
事件量化插桩引入额外指令导致显著运行时开销,且这些指令的副作用阻碍编译器优化;使用局部计数器虽利于优化,但其对外不可观测,仍需全局计数器,而全局更新同样引入副作用。
方法
提出 PRUE 算法解决更新决策问题,并实现 Zircon:利用透明生命周期的局部计数器分离事件发生与量化,将带副作用的指令移出优化器作用域,再通过静态分析变换程序、剪除冗余更新路径。
评估
在 SPEC CPU 2017 基准上与 SanCov、Nisse 等最先进工作对比,Zircon 最高快 149%,同时保持量化精度不受影响。
原文摘要(Abstract)

Event quantification provides frequency information for runtime events and is widely used to build fast, secure, and reliable software and systems. It is usually achieved through instrumentation that introduces new instructions into programs but has significant runtime overhead. A key challenge in developing efficient instrumentation is that the instrumentation can barely benefit from modern compiler optimizations because the additional instructions introduce side effects that complicate the optimization process. One intuitive idea to mitigate the side effect issue is to use local counters with transparent lifetimes and scopes instead of relying on global counters. Optimizations are more likely to succeed on instructions that manipulate local variables rather than global ones. However, this idea is not fully adequate, as local counters are unobservable to external users of the quantification data. Therefore, global counters are still necessary, and it is essential to determine when to update them based on the local counters. The challenge is that these updates also introduce side effects that hinder optimizations. We address this update decision problem with the Partially Redundant Update Elimination (PRUE). We present Zircon, the first optimizer-friendly instrumentation to quantify runtime events. With the help of local counters, Zircon separates the event occurrence and the quantification by moving the instructions with side effects outside the scope where the optimizers apply. However, this separation introduces redundant instructions; the additional instructions would still be executed even without event occurrence. In other words, the lifetime control of the local counters challenges the efficiency of instrumentation. PRUE transforms the program and prunes away paths with redundant updates based on static analysis. The evaluation on the SPEC CPU 2017 shows that Zircon is up to 149% faster than state-of-the-art work, including SanCov and Nisse. Unlike existing efforts, Zircon does not compromise accuracy for efficiency; instead, it fully harnesses the power of compilation optimizers and delivers automatic performance gains.

链接与引用

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

BibTeX
@inproceedings{LingG026,
  title = {Optimizer-Friendly Instrumentation for Event Quantification with PRUE Algorithm},
  author = {Hao Ling and Yiyuan Guo and Charles Zhang},
  booktitle = {ASPLOS},
  year = {2026},
  doi = {10.1145/3779212.3790196}
}