-
Notifications
You must be signed in to change notification settings - Fork 5k
JIT: capture all write barrier helper addresses for SPMI #97535
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
JIT: capture all write barrier helper addresses for SPMI #97535
Conversation
When varying CSEs we can sometimes alter the write barrier that is needed. In particular if we CSE a heap address computation we may lose track of the fact that an indir is writing to the heap, and so change which write barrier needs to be used. See dotnet#97534. Even if that's fixed it seems like we still might change our minds for various reasons, so when running under SPMI, just collect all the possible write barrier helper addresses.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsWhen varying CSEs we can sometimes alter the write barrier that is needed. In particular if we CSE a heap address computation we may lose track of the fact that an indir is writing to the heap, and so change which write barrier needs to be used. See #97534. Even if that's fixed it seems like we still might change our minds for various reasons, so when running under SPMI, just collect all the possible write barrier helper addresses.
|
@jakobbotsch PTAL |
src/coreclr/jit/codegeninterface.h
Outdated
@@ -173,6 +173,11 @@ class CodeGenInterface | |||
bool genUseOptimizedWriteBarriers(GenTreeStoreInd* store); | |||
CorInfoHelpFunc genWriteBarrierHelperForWriteBarrierForm(GCInfo::WriteBarrierForm wbf); | |||
|
|||
#ifdef DEBUG | |||
bool genWriteBarrierUsed; | |||
void WriteBarrierExtraSuperPmiQueries(); |
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.
Looks like you were going to use a function, but then you didn't?
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.
Yep. Removed.
Fixes an issue introduced by dotnet#97535. AOT hosts don't support all the possible write barriers and blow things up if the JIT asks for ones they don't support.
Fixes an issue introduced by #97535. AOT hosts don't support all the possible write barriers and blow things up if the JIT asks for ones they don't support. Also add back the initial semicolon to the metrics line
When varying CSEs we can sometimes alter the write barrier that is needed. In particular if we CSE a heap address computation we may lose track of the fact that an indir is writing to the heap, and so change which write barrier needs to be used.
See #97534.
Even if that's fixed it seems like we still might change our minds for various reasons, so when running under SPMI, just collect all the possible write barrier helper addresses.