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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext e7b34b0a-a5c0-4c39-93ff-7c1f1a224cf6Cited 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
- 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
- An Empirical Study of WebAssembly Usage in Node.jsMichelle Thalakottur, Maxwell Bernstein, Daniel Lehmann, Michael Pradel et al.ICSE 2026
- Two Mechanisations of WebAssembly 1.0Conrad Watt, Xiaojia Rao, Jean Pichon-Pharabod, Martin Bodin et al.FM 2021 · 32 citations
- Exploring and Exploiting the Resource Isolation Attack Surface of WebAssembly ContainersZhaofeng Yu, Dongyang Zhan, Lin Ye, Haining Yu et al.USENIX Security 2025
