• 従来は言語や環境によってパフォーマンス・観測可能なイベント・ポータビリティに制約 • Wasmを使うことでポータブルで多言語対応なインストルメンテーションを実現 • DSLで記述しコンパイラで 改変済バイトコードを生成 • 特定ランタイム用fast-pathも実装 • 成果は言語系の トップカンファレンスにも掲載* https://static.sched.com/hosted_files/colocatedeventsna2025/3e/whamm.pdf?_gl=1*3erz 0x*_gcl_au*MjExNzI3MzYxMC4xNzY5NjYwOTYz*FPAU*MjExNzI3MzYxMC4xNzY5NjYwOTYz * Elizabeth Gilbert, Matthew Schneider, Zixi An, Suhas Thalanki, Wavid Bowman, Alexander Y. Bai, Ben L. Titzer, and Heather Miller. 2025. Debugging WebAssembly? Put Some Whamm on It! Proc. ACM Program. Lang. 9, OOPSLA2, Article 346 (October 2025), 29 pages. https://doi.org/10.1145/3763124
characteristics* • Execution model (Interpreter, JIT or AOT) • Target platforms and workloads *Yixuan Zhang, Mugeng Liu, Haoyu Wang, Yun Ma, Gang Huang, and Xuanzhe Liu. 2025. Research on WebAssembly Runtimes: A Survey. ACM Trans. Softw. Eng. Methodol. Just Accepted (January 2025). https://doi.org/10.1145/3714465 Wasmtime High performance with JIT compilation WasmEdge Rich extensions for AI/LLM workloads
and features impose limitations on usable runtimes How can we use or implement them runtime-neutrally? WasmEdge-specific Statistics and Resource Limitation Capabilities Different Status of Wasm Feature Support
save and resume the application’s state • Needs to modify optimizations (e,g.,JIT and AOT) and runtime implementation • Self−hosted runtime−based C/R • Save states in the self-hosted runtime • No need to consider runtime differences Implemented in Chiwawa Self-hosted Runtime (JIT Compiled) Wasmtime Wasm Bytecode WasmEdge Self-hosted Runtime (Interpreted) Wasm Bytecode Checkpoint and restore
status of running Wasm bytecode • For bug detection, visualization of processing flows, and profiling • Self-hosted Runtime-based instrumentation • Detailed tracing including the state of its VM • Can use any runtime without modification Implemented in Chiwawa Self-hosted Runtime (JIT Compiled) Wasmtime Wasm Bytecode in Self-hosted Runtime WasmEdge Self-hosted Runtime (Interpreted) The self-hosted runtime's VM is not changed by the host’s optimization
self-hosted runtime as a compatibility layer • Implement interfaces for unsupported features • Compile the self-hosted runtime into Wasm executable for the host runtime • Can execute it within the scope supported by the host runtime Self-hosted Runtime (Support WASIp2 Interface) Host Runtime (Support WASI p1) z Wasm Bytecode (WASIp2) Using WASIp2 Feature Executing WASIp2 features as a WASIp1 bytecode Under consideration in Chiwawa
executed on host runtime • An instruction in an application is transformed into multiple instructions 2. Duplicated computationally expensive processing • Sandbox mechanism and WASI implementations local.get … fn handle_local_get(ctx: Context){ … let val = ctx.frame.locals[i].clone(); ctx.value_stack.push(val); … }
Parser identifies dependencies between instructions • Convert stack instructions to Immediate Value 2. Pass-through WASI implementation (without WASI interface conversion) • Redirect to the WASI implementation of a host runtime … i32.const 10 local.get 0 I32.add local.set 1 … … i32.add{10, local@0} => local@1 … Merged into a single instruction
to wasmtime) Performance Evaluation Wizard on Wizard VS. Chiwawa on Wizard (Self-Hostable Runtimes ) 1.3~1.4x performance by optimization techniques Benchmarks Wizard on Wizard Chiwawa on Wizard pi-Leibniz 26.791 19.620 N-body 14.554 9.932 Execution time (Sec.)
) Benchmarks Wizard on Wizard Chiwawa on Wizard pi-Leibniz 26.791 19.620 N-body 14.554 9.932 Performance Evaluation Chiwawa on Wasmtime VS. Wasmtime 13-426x performance degradation by increased processing Relative execution time (normalized to wasmtime) Execution time (Sec.)
features and runtime capabilities • Can run on any runtime • Significant performance overhead • Performance optimization techniques are essential • My future goal is to achieve performance equivalent to execution in interpreter runtimes Chiwawa: https://github.com/oss-fun/chiwawa