paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Flexible Non-intrusive Dynamic Instrumentation for WebAssembly

面向 WebAssembly 的灵活非侵入式动态插桩
ASPLOS Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 32024匹配度 2/10 · 该论文属于编程语言与运行时系统方向,研究 WebAssembly 非侵入式动态插桩,但未涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心关注的交叉方向,仅与 PL 领域有非常宽泛的关联。引用 12 inbox
Ben L. Titzer, Elizabeth Gilbert, Bradley Wei Jie Teo, Yash Anand, Kazuyuki Takayama, Heather Miller
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:首个 WebAssembly 非侵入式动态插桩系统,提供分层可编程探针并复用 JIT、解释器与去优化机制。

托管运行时相较硬件的一大优势是能通过插桩洞察程序的动态执行,代码覆盖率、执行频次、追踪与调试等分析在虚拟环境中都更易实现。WebAssembly 作为可移植的低层字节码,提供了廉价且高性能的进程内沙箱,但现有 Wasm 引擎对执行中程序的可见性很有限,至多支持字节码级单步与基本源映射,缺乏插桩能力。本文在开源 Wizard Research Engine 中提出了首个面向 WebAssembly 的非侵入式动态插桩系统。其设计给出了一套灵活而完整的插桩原语层次结构,使高层复杂分析可基于低层可编程探针构建。与仿真或机器码插桩不同,在字节码层注入探针提升了表达能力,并通过复用引擎已有的 JIT 编译器、解释器与去优化机制大幅简化实现。Wizard 支持插桩的动态插入与移除,并提供一致性保证,从而避免多个分析相互干扰。文中详述了在高性能多层级 Wasm 引擎中的完整实现,给出了为降低插桩开销而设计的若干新优化,并在多种分析负载下评估了性能特征;当探针未被使用时可不影响生产性能,因而适合被产品级引擎采纳。

问题
现有 WebAssembly 引擎对执行中程序几乎不提供可见性,最多支持字节码级单步与基本源映射,缺少可用的动态插桩能力,使得覆盖率、频次统计、追踪与调试等分析难以开展。
方法
在开源 Wizard Research Engine 的字节码层注入可编程探针,复用引擎已有的 JIT 编译器、解释器与去优化机制而非另建基础设施,并提供分层的插桩原语体系,支持插桩的动态插入与移除及一致性保证,同时设计了专门的优化以降低插桩开销。
评估
在高性能多层级 Wasm 引擎中实现完整系统,并在多种分析负载下测量插桩的性能特征,同时说明探针在不使用时对生产性能无影响。
原文摘要(Abstract)

A key strength of managed runtimes over hardware is the ability to gain detailed insight into the dynamic execution of programs with instrumentation. Analyses such as code coverage, execution frequency, tracing, and debugging, are all made easier in a virtual setting. As a portable, low-level byte-code, WebAssembly offers inexpensive in-process sandboxing with high performance. Yet to date, Wasm engines have not offered much insight into executing programs, supporting at best bytecode-level stepping and basic source maps, but no instrumentation capabilities. In this paper, we show the first non-intrusive dynamic instrumentation system for WebAssembly in the open-source Wizard Research Engine. Our innovative design offers a flexible, complete hierarchy of instrumentation primitives that support building high-level, complex analyses in terms of low-level, programmable probes. In contrast to emulation or machine code instrumentation, injecting probes at the bytecode level increases expressiveness and vastly simplifies the implementation by reusing the engine's JIT compiler, interpreter, and deoptimization mechanism rather than building new ones. Wizard supports both dynamic instrumentation insertion and removal while providing consistency guarantees, which is key to composing multiple analyses without interference. We detail a fully-featured implementation in a high-performance multi-tier Wasm engine, show novel optimizations specifically designed to minimize instrumentation overhead, and evaluate performance characteristics under load from various analyses. This design is well-suited for production engine adoption as probes can be implemented to have no impact on production performance when not in use.

链接与引用

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

BibTeX
@inproceedings{abs-2403-07973,
  title = {Flexible Non-intrusive Dynamic Instrumentation for WebAssembly},
  author = {Ben L. Titzer and Elizabeth Gilbert and Bradley Wei Jie Teo and Yash Anand and Kazuyuki Takayama and Heather Miller},
  booktitle = {ASPLOS},
  year = {2024},
  doi = {10.1145/3620666.3651338}
}