Debugging WebAssembly? Put Some Whamm on It!
Elizabeth Gilbert, Matthew Schneider, Zixi An, Suhas Thalanki, Wavid Bowman, Alexander Y. Bai, Ben L. Titzer, Heather Miller
Abstract
Debugging and monitoring programs are integral to engineering and deploying software. Dynamic analyses monitor applications through source code or IR injection, machine code or bytecode rewriting, and virtual machine or direct hardware support. While these techniques are viable within their respective domains, common tooling across techniques is rare, leading to fragmentation of skills, duplicated efforts, and inconsistent feature support. We address this problem in the WebAssembly ecosystem with Whamm, a declarative instrumentation DSL for WebAssembly that abstracts above the instrumentation strategy, leveraging bytecode rewriting and engine support as available. Whamm solves three problems: 1) tooling fragmentation, 2) prohibitive instrumentation overhead of general-purpose frameworks, and 3) tedium of tailoring low-level high-performance mechanisms. Whamm provides fully-programmable instrumentation with declarative match rules, static and dynamic predication, automatic state reporting, and user library support, while achieving high performance through compiler and engine optimizations. At the back end, Whamm provides instrumentation to a Wasm engine as Wasm code, reusing existing engine optimizations and unlocking new ones, most notably intrinsification, to minimize overhead. In particular, explicitly requesting program state in match rules, rather than reflection, enables the engine to efficiently bundle arguments and even inline compiled probe logic. Whamm streamlines the tooling effort, as its bytecode-rewriting target can run instrumented programs everywhere, lowering fragmentation and advancing the state of the art for engine support. We evaluate Whamm with case studies of non-trivial monitors and show it is expressive, powerful, and efficient.
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 b43828c2-c5b9-445a-904c-1a44b19fc9f5Builds on2
Related papers
- Finding and Understanding Missed Optimizations in WebAssembly Optimizer (Experience Paper)Ruiyang Xu, Zetao Fan, Shan Huang, Ting SuISSTA 2026
- Wasm-R3: Record-Reduce-Replay for Realistic and Standalone WebAssembly BenchmarksDoehyun Baek, Jakob Getz, Yusung Sim, Daniel Lehmann et al.OOPSLA 2024 · 6 citations
- WEST: Specification-Based Test Generation for WebAssemblyDongjun Youn, Wonho Shin, Sukyoung RyuASE 2025
- Execution-Aware Program Reduction for WebAssembly via Record and ReplayDoehyun Baek, Daniel Lehmann, Ben L. Titzer, Sukyoung Ryu et al.ASE 2025
- E2WR: An Effective and Efficient Reduction Framework for WebAssembly BinariesShiyao Zhou, Ningyu He, David Lo, Xiapu LuoISSTA 2026
