-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Record and Replay Support for Component Model #11284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
arjunr2
wants to merge
62
commits into
bytecodealliance:main
Choose a base branch
from
arjunr2:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,374
−131
Open
Changes from 44 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
cd0a3d3
Initial CLI argument parsing for RR
arjunr2 016f6b4
Validate RR args with clap
arjunr2 bd6859f
Setup `RRConfig` for runtime access
arjunr2 2533f7e
Add rr buffers to `Store`
arjunr2 21c9e98
Determinism config enforcement during RR
arjunr2 1dbaa03
Added RR event buffers
arjunr2 63f96cf
Initial RR serde support
arjunr2 b832a44
Support types for `RREvent`
arjunr2 94364b0
Refactor RR infrastructure
arjunr2 34e78a1
Add compressed validation/no-validation for Record
arjunr2 a0012df
Added event callback closures
arjunr2 aeb3c0b
Add replay injection with function call stubbing on trampoline
arjunr2 89dec1e
Added RR buffer test
arjunr2 0ed8b80
Clarify docs for RR cli
arjunr2 e2591d9
Refactor event interface from enum to typed event structs
arjunr2 b6866f7
Refactor events to indepedent module
arjunr2 c5d6b62
Added component host function entry/exit event recording
arjunr2 586ba3a
Added component host function entry/exit (shallow) replay support
arjunr2 89ea484
fixup! Added component host function entry/exit (shallow) replay support
arjunr2 f21361b
Support dynamic entrypoints and defining linker imports as trap durin…
arjunr2 3f187d7
Ensure replay completion and restructure events directory
arjunr2 73d2a1c
Add recording for lowering, lowering-stores, and reallocations
arjunr2 8226774
Tighten mutability references acquision points for lowering contexts
arjunr2 478d4ce
Support event action and iterator on replayer
arjunr2 8a1347f
fixup! Support event action and iterator on replayer
arjunr2 7169109
Support recording of memory slice bytes with `MemorySliceCell`
arjunr2 3a93791
MVP for RR component model complete
arjunr2 7a1f754
Change interface names for buffers and store
arjunr2 2f6716b
Added macro wrappers for record/replay stubs
arjunr2 836ab80
Add `RecordMetadata` to the trace to support optional replay validation
arjunr2 d2df9f4
Move unsafe for valraw transmute out of rr module
arjunr2 2c803f9
Added enum in host call rr stubs for readability
arjunr2 423b19e
fixup! Added enum in host call rr stubs for readability
arjunr2 0cb5ce1
Switch `rr_event` macro syntax
arjunr2 42101ea
Initial feature gating of RR for type info; fix doc inclusion for com…
arjunr2 7c7a60e
Enum and rr type gating for core wasm; bugfix in component lowering type
arjunr2 0cac3b8
Change all prints to log interface
arjunr2 d0346fb
Remove `ValRawSer` struct abstraction
arjunr2 81f8bae
Add wasmtime version to recorded trace
arjunr2 fdd8b45
Initial support for generic RR readers/writers
arjunr2 65118cf
Move RR buffer sanity checks into `Drop` implementations
arjunr2 ceadca3
Added `InstantiationEvent` for checksumming components; also fix repl…
arjunr2 6cc4147
Added buffered reader/writers for RR
arjunr2 c15be6e
Fix some defaults and docs
arjunr2 d819287
Added internal RR event buffering with configurable window size
arjunr2 4e8e2f8
Prevent memory export during RR for core wasm
arjunr2 9a056c6
Remove dead code attributes
arjunr2 217ddd2
Added `replay` command to CLI; refactor config api
arjunr2 8d3d374
fixup! Added `replay` command to CLI; refactor config api
arjunr2 03421d6
Added `no_std` support for RR
arjunr2 2918403
Added RR feature gating and style nits
arjunr2 8ae8f84
Add notes about `rr` feature configurability
arjunr2 fdc6887
Refactor type validation across the RR stack
arjunr2 b500f07
Transition away from macros in component RR
arjunr2 a468a11
Cleanup core RR funcs and validation flows
arjunr2 f55bbff
Refactor validation API
arjunr2 c852b12
Move to typefunc for host function entry validation
arjunr2 b0dfb0f
Add validation tests and gating across whole project
arjunr2 205f436
Added configuration flag for deserialization buffer
arjunr2 a2beaef
Doc comment style fix
arjunr2 6afb9c1
Added panic stubs for rr in libcalls
arjunr2 0025593
fixup! Added panic stubs for rr in libcalls
arjunr2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
High-level thoughts on command-line options:
wasmtime run
,wasmtime serve
, and maybe others. (Curious: have you tried it on an HTTP server component?)With that in mind, what do you think about turning replay into a command, rather than an option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to what @cfallin said about replay being a command, not an option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replay in practice operates very similar to the
run
command and shares a lot of the top level command line options with it as well.The replay command as a result would be just a minor super-set of the
run
setup. It sort of makes sense to do one of two things:replay
command, that just adds additional replay options, and callsrun
under the hood with itrun
command (as opposed to general options)Leaning towards the former since maybe in the future
replay
could support different modes of operationThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't all the top-level options pretty much be fixed and effectively identical to whatever they were when the trace was recorded? When does it make sense to specify different options than were used when recording? If the answer is "it doesn't make sense" then I don't think we want to force users to manually provide the same options from before in the replay command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's true for most options. I think the ones that might be usable are perhaps just profiling
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah great point, very cool to profile an execution after the fact and ignore I/O and the external world.
I think we can probably add CLI options one at a time as they make sense to the replay command, and have the default1 be "whatever was configured during the recording".
Footnotes
I think this is implicit/automatic in that the trace will reflect whatever configuration settings were in effect during recording? At least that is true for anything that affects execution. ↩