wasmtime-bench-api: Randomize the locations of heap objects

This helps us avoid measurement bias due to accidental locality of unrelated
heap objects. See *Stabilizer: Statistically Sound Performance Evaluation* by
Curtsinger and Berger for details (although Stabilizer deals with much more than
just the location of heap allocations):
https://people.cs.umass.edu/~emery/pubs/stabilizer-asplos13.pdf
This commit is contained in:
Nick Fitzgerald
2021-01-12 14:02:44 -08:00
parent 47ff726c61
commit bc6dc083f0
3 changed files with 25 additions and 1 deletions

13
Cargo.lock generated
View File

@@ -1964,6 +1964,18 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2"
[[package]]
name = "shuffling-allocator"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "848c0a454373d16ebfaa740c99d4faebe25ea752a35e0c6e341168fe67f987f8"
dependencies = [
"cfg-if 1.0.0",
"libc",
"rand",
"winapi",
]
[[package]]
name = "smallvec"
version = "1.6.1"
@@ -2430,6 +2442,7 @@ name = "wasmtime-bench-api"
version = "0.19.0"
dependencies = [
"anyhow",
"shuffling-allocator",
"wasi-common",
"wasmtime",
"wasmtime-wasi",