-
Notifications
You must be signed in to change notification settings - Fork 5k
[mono][sgen] Add separate card mark function to be used with debug #109698
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: @BrzVlad |
thank you for your great work. can it merge to release/9.0 ? |
@@ -165,6 +165,31 @@ sgen_card_table_wbarrier_range_copy (gpointer _dest, gconstpointer _src, int siz | |||
} | |||
} | |||
|
|||
// Marks more cards so that it works with remset consistency debug checks |
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.
so is this only enabled in debug builds ?
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.
Sort of, only if certain debug flags are passed at runtime via env vars this is used to mark cards when copying objects. It is a conservative approach. It might be useful to backport since there are active crashes there that are not actionable and this PR should at least fix the use of some GC debugging features that might help investigate.
When marking cards for a non-array object or a an element vt in an object, it is enough to mark a card for any address within that object/vt because they are always fully scanned. Cardtable consistency checks are not accounting for this detail and it is difficult to have it implemented. Instead, when having such debug flags enabled, we use an explicit approach where every single card is being marked.
3ac732f
to
f4d607f
Compare
/backport to release/9.0 |
Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/12081645709 |
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/12081650337 |
thank you @BrzVlad |
/backport to release/9.0-staging |
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/12084256458 |
/backport to release/8.0-staging |
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/12084270546 |
…otnet#109698) When marking cards for a non-array object or a an element vt in an object, it is enough to mark a card for any address within that object/vt because they are always fully scanned. Cardtable consistency checks are not accounting for this detail and it is difficult to have it implemented. Instead, when having such debug flags enabled, we use an explicit approach where every single card is being marked.
When marking cards for a non-array object or a an element vt in an object, it is enough to mark a card for any address within that object/vt because they are always fully scanned. Cardtable consistency checks are not accounting for this detail and it is difficult to have it implemented. Instead, when having such debug flags enabled, we use an explicit approach where every single card is being marked.