Compares logical stack cost estimation made by wasm-instrument to the real stack frame size.
Do NOT use debug build to run tests, it is incredibly slow. Always build release binary.
USAGE:
pvf-stack-test [OPTIONS]
OPTIONS:
-b, --batch-size <BATCH_SIZE> Batch size [default: 100]
-h, --help Print help information
-n, --num-batches <NUM_BATCHES> Number of batches [default: 160]
-s, --seed <SEED> Reproduce a case for single seed, output
out.<seed>.{wasm|cwasm}
-t, --single-thread Run in a single thread
-v, --save Save every .wasm and .cwasm (slow)
-V, --version Print version information
-w, --wasm <WASM> Run on an externally provided .wasm module
make
: Generatestest.log
anddist.dat
in standard conditions (16000 samples)make disasm
: Produces.wat
and.asm
for output files (generated with--save
or--seed
)make clean
: Removes output files (generated with--save
or--seed
), compiled binaries and disassembly resultsmake plot
: Plots currentdist.dat
withgnuplot
make calc
: Calculates maximum real_stack_size/estimation ratio in the currentdist.dat
as well as average ratio
See here