Flexible Non-intrusive Dynamic Instrumentation for WebAssembly
Ben L. Titzer, Elizabeth Gilbert, Bradley Wei Jie Teo, Yash Anand, Kazuyuki Takayama, Heather Miller
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Execution-Aware Program Reduction for WebAssembly via Record and Replay cites A fast in-place interpreter for WebAssembly
- Execution-Aware Program Reduction for WebAssembly via Record and Replay cites Wasm-R3: Record-Reduce-Replay for Realistic and Standalone WebAssembly Benchmarks
- Wasm-R3: Record-Reduce-Replay for Realistic and Standalone WebAssembly Benchmarks cites A fast in-place interpreter for WebAssembly
Cited by top-tier papers3
- Wasm-R3: Record-Reduce-Replay for Realistic and Standalone WebAssembly BenchmarksDoehyun Baek, Jakob Getz, Yusung Sim, Daniel Lehmann et al.OOPSLA 2024 · 6 citations
- Debugging WebAssembly? Put Some Whamm on It!Elizabeth Gilbert, Matthew Schneider, Zixi An, Suhas Thalanki et al.OOPSLA 2025 · 2 citations
- Execution-Aware Program Reduction for WebAssembly via Record and ReplayDoehyun Baek, Daniel Lehmann, Ben L. Titzer, Sukyoung Ryu et al.ASE 2025
Builds on4
- A fast in-place interpreter for WebAssemblyBen L. TitzerOOPSLA 2022 · 44 citations
- APT-GET: profile-guided timely software prefetchingSaba Jamilan, Tanvir Ahmed Khan, Grant Ayers, Baris Kasikci et al.EuroSys 2022 · 25 citations
- JPortal: precise and efficient control-flow tracing for JVM programs with Intel processor traceZhiqiang Zuo, Kai Ji, Yifei Wang, Wei Tao et al.PLDI 2021 · 15 citations
- Provably-Safe Multilingual Software Sandboxing using WebAssemblyJay Bosamiya, Wen Shih Lim, Bryan ParnoUSENIX Security 2022
Related papers
- WBSan: WebAssembly Bug Detection for Sanitization and Binary-Only FuzzingXiao Wu, Junzhou He, Liyan Huang, Cai Fu et al.WWW 2025 · 5 citations
- Wemby's Web: Hunting for Memory Corruption in WebAssemblyOussama Draissi, Tobias Cloosters, David Klein, Michael Rodler et al.ISSTA 2025 · 1 citation
- WEST: Specification-Based Test Generation for WebAssemblyDongjun Youn, Wonho Shin, Sukyoung RyuASE 2025
- Finding and Understanding Missed Optimizations in WebAssembly Optimizer (Experience Paper)Ruiyang Xu, Zetao Fan, Shan Huang, Ting SuISSTA 2026
- That's a Tough Call: Studying the Challenges of Call Graph Construction for WebAssemblyDaniel Lehmann, Michelle Thalakottur, Frank Tip, Michael PradelISSTA 2023 · 11 citations
