wamrc --opt-level=3 --threshold-bits=16 --disable-aux-stack-check --enable-counter-loop-checkpoint -o bc.aot bench/bc.aot
./MVVM_checkpoint -t bench/bc.aot -a -g20,-n1000
./MVVM_restore -t bench/bc.aot
Policy for wamrc
- counter loop checkpoint
--enable-counter-loop-checkpoint
- loop threshold for 1 << x per checkpoint
- loop checkpoint
--enable-loop-checkpoint
, meaning without the counter to checkpoint - loop dirty checkpoint
--enable-loop-dirty-checkpoint
, meaning use the dirty bit to checkpoint --enable-checkpoint
, enable function level checkpoint
First comment out the following in checkpoint.cpp
wamr->get_int3_addr();
wamr->replace_int3_with_nop();
wamr->replace_mfence_with_nop();
Then
python3 ../artifact/common_util.py # return $recv is 193
SPDLOG_LEVEL=debug ./MVVM_checkpoint -t test/tcp_client.aot -f 193 -c 0 -x 10 -a "10" -e OMP_NUM_THREADS=1 -i
SPDLOG_LEVEL=debug ./MVVM_restore -t test/tcp_client.aot # All the wasi env will be restored
- -t Target: The path to the WASM interpreter or AOT executable
- -i Debug Mode: Switch on for debugging
- -f Function: The function to stop and checkpoint
- -x Function Counter: The WASM function counter to stop and checkpoint
- -c Counter: The WASM instruction counter to stop and checkpoint(Conflict with -f and -x)
- -a Arguments: The arguments to the function
- -e Environment: The environment variables to the function
- All the pointers will be stored as offset to the linear memory.
- Go forward and never go back, all the calling into WASI land will row back to the call on recovery.
- Use AOT compiler convention with a stable point to achieve cross-platform.
- Cloud Edge integration
- Optimistic Computing
- FAASM Warm start