-
Notifications
You must be signed in to change notification settings - Fork 5k
Force storing GC state until we see a labeled IG #114475
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
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
As imagined, no diffs because of this being a corner scenario. |
/azp run runtime-coreclr gcstress-extra |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
@dotnet/jit-contrib |
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.
A few suggestions.
format job failures are unrelated. |
This is very odd and corner case scenario. We have a loop after epilog (with stress block layout, we might have something like that). If there are IGs after epilog, the epilog creates additional dummy IG to store GC state in it. We also update the GC vars global variables
emitPrevGCrefVars
andemitInitGCrefVars
to have most up to date information. Whenever their values are different, we mark such IGs withIGF_GC_VARS
stating that the IG contains gc information that the gcinfo should record.The loop that is immediately after the epilog is marked for alignment, and so we create a new label IG for it. At this point, the GC vars information
emitPrevGCrefVars == emitInitGCrefVars
and so we skip marking this IG withIGF_GC_VARS
. As a result, it inherits the GC var liveness information from the previous block (which is the dummy block after the epilog) which is wrong.The fix is to force store the GC state on all IGs until we come across a valid labeled IG.
Attached is the dump from failing test. Here,
IG14
is the epilog andIG15
is the dummy IG for which we add all the GC-vars likeV73
etc. When we createIG16
, we do not add any new GC vars and hence inherit those fromIG15
617.dump.asm.zip
Here is the diff after the fix:
Thanks @BruceForstall for brainstorming this scenario with me.
Fixes: #113553