fork-instrument: replay pure scalar fork inputs#714
Open
brandonpayton wants to merge 1 commit into
Open
Conversation
Phase B-1 matrix build status —
|
| Package | Arch | Status | Sha |
|---|---|---|---|
| bc | wasm32 | built | ed7ce7b8 |
| bzip2 | wasm32 | built | 892df627 |
| coreutils | wasm32 | built | 6c6b2f4d |
| curl | wasm32 | built | ead181eb |
| dash | wasm32 | built | c629e5d8 |
| diffutils | wasm32 | built | 456f5322 |
| dinit | wasm32 | built | b39f70a8 |
| fbdoom | wasm32 | built | d7ae7642 |
| file | wasm32 | built | 02660c1a |
| findutils | wasm32 | built | a6979448 |
| gawk | wasm32 | built | 77f47cb4 |
| git | wasm32 | built | dff0aff7 |
| grep | wasm32 | built | d89c4145 |
| gzip | wasm32 | built | d3e9efc9 |
| kandelo-sdk | wasm32 | built | d9cb395c |
| kernel | wasm32 | built | 71628a17 |
| less | wasm32 | built | bf2ac5a0 |
| lsof | wasm32 | built | 0712dd67 |
| m4 | wasm32 | built | 9846d848 |
| make | wasm32 | built | 4b7f856d |
| mariadb | wasm32 | built | 99eb4106 |
| mariadb | wasm64 | built | 6011c9d9 |
| modeset | wasm32 | built | 2fa4678e |
| msmtpd | wasm32 | built | 0f5d3cd7 |
| nano | wasm32 | built | 699fea5c |
| ncurses | wasm32 | built | 3b90d7f5 |
| netcat | wasm32 | built | 3041ca64 |
| nginx | wasm32 | built | 8d390dca |
| php | wasm32 | built | 7cdc999c |
| posix-utils-lite | wasm32 | built | f108b0ac |
| sed | wasm32 | built | 371b7e6e |
| tar | wasm32 | built | 6858b329 |
| tcl | wasm32 | built | 5b7a648e |
| unzip | wasm32 | built | 78615f88 |
| userspace | wasm32 | built | 1cdedce6 |
| vim | wasm32 | built | e032afe9 |
| wget | wasm32 | built | fd11dcb9 |
| xz | wasm32 | built | 013788d1 |
| zip | wasm32 | built | b9c1bdc7 |
| zstd | wasm32 | built | 5218e086 |
| bash | wasm32 | built | 693899e0 |
| mariadb-test | wasm32 | built | c027b38a |
| mariadb-vfs | wasm32 | built | 956f0ad1 |
| mariadb-vfs | wasm64 | built | e8842c11 |
| nethack | wasm32 | built | 44186439 |
| vim-browser-bundle | wasm32 | built | 526382ba |
| nethack-browser-bundle | wasm32 | built | 80fb1ada |
| rootfs | wasm32 | built | 23a0788f |
| shell | wasm32 | built | d47bb129 |
| lamp | wasm32 | built | a399cb6c |
| node-vfs | wasm32 | built | 794aab2f |
| wordpress | wasm32 | built | becde562 |
Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds conservative pure scalar materialization to
wasm-fork-instrumentso replay-safe call arguments and condition-only nested carryovers are recomputed at the post-call/post-landing point instead of spilled through frame locals.The whitelist is intentionally small: scalar constants, scalar
local.get, and non-trapping scalar integer unary/binary ops. Calls, memory/table ops, globals, refs, div/rem, float ops,local.set/local.tee, and any stack-dependent suffix still fall back to the existing spill-local path.PR #701 MRE Evidence
Measured with
/tmp/kandelo-pr701-mre, Nodev24.15.0,node --experimental-wasm-exnref, max cap 20000. Depth ties on this host, but declared locals show the frame-pressure reduction.benchmark_walklocalschain.before.wasm)chain.pr713-packed.wasm)chain.kd-pme.wasm)Local-by-local: the PR #713 packed base had
benchmark_walklocals(i32 i32 i32 i32 i32 i64). This branch has(i32 i32 i32 i64), matching the uninstrumented baseline. The two removed synthetici32locals are the recursivewalk(depth - 1)argument spill and theeqz(depth)IfElse condition/carryover spill. Both are now replayed from pure scalar tails.Verification
cargo test -p fork-instrument --target aarch64-apple-darwin --test instrument call_with_ -- --nocapture— 3 passed, 0 failedcargo test -p fork-instrument --target aarch64-apple-darwin --test instrument call_indirect_replays_pure_table_index_arg -- --nocapture— 1 passed, 0 failedcargo test -p fork-instrument --target aarch64-apple-darwin --test switch_dispatch omits_frame_header_state_locals -- --nocapture— 4 passed, 0 failedcargo test -p fork-instrument --target aarch64-apple-darwin --test switch_dispatch pr701_shape_replays_pure_condition_and_recursive_arg -- --nocapture— 1 passed, 0 failedscripts/dev-shell.sh cargo test -p fork-instrument --target aarch64-apple-darwin— 171 passed, 0 failedscripts/dev-shell.sh bash scripts/check-abi-version.sh— ABI snapshot/header/TS bindings up to date; ABI_VERSION and snapshot consistentgit diff --check— cleanNot run: full kernel/host/libc/posix gates. This change is isolated to the fork-instrument rewrite tool and documentation; no kernel ABI, host runtime, libc, syscall, package, or browser path changed.