🤖 AI Summary
This work addresses the challenge of diagnosing performance issues in WebAssembly runtimes caused by poorly compiled input programs, a task for which existing application-level debugging techniques often lack precision. To this end, the paper introduces WarpL, the first approach to apply mutation-based reasoning to WebAssembly performance debugging. WarpL generates functionally equivalent mutant programs that eliminate suspected performance defects and then compares the machine code and execution behavior of the original and mutated programs to pinpoint inefficient instruction sequences responsible for performance degradation. Experimental evaluation demonstrates that WarpL successfully reproduces and localizes 10 out of 12 known performance issues across three major WebAssembly runtimes and uncovers six previously unknown problems, achieving fine-grained and highly accurate performance diagnosis.
📝 Abstract
Performance debugging in WebAssembly (Wasm) runtimes is essential for ensuring the robustness of Wasm, especially since performance issues have frequently occurred in Wasm runtimes, which can significantly degrade the capabilities of hosted services. Many performance issues in Wasm runtimes result from suboptimal compilation of input Wasm programs, for which existing performance debugging methods primarily designed for application-level inefficiencies are not well-suited. In this paper, we present WarpL, a novel mutation-based approach that aims to identify the exact suboptimal instruction sequences responsible for the performance issues in Wasm runtimes, thereby narrowing down the root causes. Specifically, WarpL obtains a functionally similar mutant in which the performance issue does not manifest, and isolates the exact suboptimal instructions by comparing the machine code of the original and mutated programs. We implement WarpL as an open-source tool and evaluate it on 12 real-world performance issues across three widely used Wasm runtimes. WarpL identified the exact causes in 10 out of 12 issues. Notably, we have used WarpL to successfully diagnose six previously unknown performance issues in Wasmtime.