-
Notifications
You must be signed in to change notification settings - Fork 5.3k
SPMI: Tolerate missing getContinuationType calls #123536
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
SPMI: Tolerate missing getContinuationType calls #123536
Conversation
The continuation type returned to the JIT by getContinuationType is more or less opaque. The only thing we need to do with that handle is embed it in the code stream. Teach SPMI to fake up a class handle instead of missing contexts when the continuation layout is not found. This is going to be a common scenario for async changes because any change resulting in new live state around an async call ends up requiring a different continuation type.
|
Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib |
|
PTAL @dotnet/jit-contrib I was surprised to see no diffs in #123500, but on a closer look it made perfect sense since the change causes us to require much smaller continuations, which ended up missing in |
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.
Pull request overview
Updates SuperPMI replay to tolerate getContinuationType mismatches by returning a synthetic continuation type handle when the recorded continuation layout can’t be found, avoiding unnecessary “missing context” failures during async-related diffs.
Changes:
- Introduces a pseudo continuation
CORINFO_CLASS_HANDLEvalue for replay-time misses. - Adds special handling in
repEmbedClassHandlefor the pseudo handle to keep embedding behavior consistent. - Changes
repGetContinuationTypeto fall back to the pseudo handle when the recorded key is not present.
The continuation type returned to the JIT by getContinuationType is more or less opaque. The only thing we need to do with that handle is embed it in the code stream.
Teach SPMI to fake up a class handle instead of missing contexts when the continuation layout is not found. This is going to be a common scenario for async changes because any change resulting in new live state around an async call ends up requiring a different continuation type.