Saved in:
Bibliographic Details
Main Authors: Baek, Doehyun, Getz, Jakob, Sim, Yusung, Lehmann, Daniel, Titzer, Ben L., Ryu, Sukyoung, Pradel, Michael
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2409.00708
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913488321904640
author Baek, Doehyun
Getz, Jakob
Sim, Yusung
Lehmann, Daniel
Titzer, Ben L.
Ryu, Sukyoung
Pradel, Michael
author_facet Baek, Doehyun
Getz, Jakob
Sim, Yusung
Lehmann, Daniel
Titzer, Ben L.
Ryu, Sukyoung
Pradel, Michael
contents WebAssembly (Wasm for short) brings a new, powerful capability to the web as well as Edge, IoT, and embedded systems. Wasm is a portable, compact binary code format with high performance and robust sandboxing properties. As Wasm applications grow in size and importance, the complex performance characteristics of diverse Wasm engines demand robust, representative benchmarks for proper tuning. Stopgap benchmark suites, such as PolyBenchC and libsodium, continue to be used in the literature, though they are known to be unrepresentative. Porting of more complex suites remains difficult because Wasm lacks many system APIs and extracting real-world Wasm benchmarks from the web is difficult due to complex host interactions. To address this challenge, we introduce Wasm-R3, the first record and replay technique for Wasm. Wasm-R3 transparently injects instrumentation into Wasm modules to record an execution trace from inside the module, then reduces the execution trace via several optimizations, and finally produces a replay module that is executable sandalone without any host environment - on any engine. The benchmarks created by our approach are (i) realistic, because the approach records real-world web applications, (ii) faithful to the original execution, because the replay benchmark includes the unmodified original code, only adding emulation of host interactions, and (iii) standalone, because the replay benchmarks run on any engine. Applying Wasm-R3 to web-based Wasm applications in the wild demonstrates the correctness of our approach as well as the effectiveness of our optimizations, which reduce the recorded traces by 99.53 percent and the size of the replay benchmark by 9.98 percent. We release the resulting benchmark suite of 27 applications, called Wasm-R3-Bench, to the community, to inspire a new generation of realistic and standalone Wasm benchmarks.
format Preprint
id arxiv_https___arxiv_org_abs_2409_00708
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Wasm-R3: Record-Reduce-Replay for Realistic and Standalone WebAssembly Benchmarks
Baek, Doehyun
Getz, Jakob
Sim, Yusung
Lehmann, Daniel
Titzer, Ben L.
Ryu, Sukyoung
Pradel, Michael
Programming Languages
WebAssembly (Wasm for short) brings a new, powerful capability to the web as well as Edge, IoT, and embedded systems. Wasm is a portable, compact binary code format with high performance and robust sandboxing properties. As Wasm applications grow in size and importance, the complex performance characteristics of diverse Wasm engines demand robust, representative benchmarks for proper tuning. Stopgap benchmark suites, such as PolyBenchC and libsodium, continue to be used in the literature, though they are known to be unrepresentative. Porting of more complex suites remains difficult because Wasm lacks many system APIs and extracting real-world Wasm benchmarks from the web is difficult due to complex host interactions. To address this challenge, we introduce Wasm-R3, the first record and replay technique for Wasm. Wasm-R3 transparently injects instrumentation into Wasm modules to record an execution trace from inside the module, then reduces the execution trace via several optimizations, and finally produces a replay module that is executable sandalone without any host environment - on any engine. The benchmarks created by our approach are (i) realistic, because the approach records real-world web applications, (ii) faithful to the original execution, because the replay benchmark includes the unmodified original code, only adding emulation of host interactions, and (iii) standalone, because the replay benchmarks run on any engine. Applying Wasm-R3 to web-based Wasm applications in the wild demonstrates the correctness of our approach as well as the effectiveness of our optimizations, which reduce the recorded traces by 99.53 percent and the size of the replay benchmark by 9.98 percent. We release the resulting benchmark suite of 27 applications, called Wasm-R3-Bench, to the community, to inspire a new generation of realistic and standalone Wasm benchmarks.
title Wasm-R3: Record-Reduce-Replay for Realistic and Standalone WebAssembly Benchmarks
topic Programming Languages
url https://arxiv.org/abs/2409.00708