[mono][interp] Add missing GC wbarriers for static field stores with hotreload enabled#100775
Merged
BrzVlad merged 2 commits intodotnet:mainfrom May 11, 2024
Merged
[mono][interp] Add missing GC wbarriers for static field stores with hotreload enabled#100775BrzVlad merged 2 commits intodotnet:mainfrom
BrzVlad merged 2 commits intodotnet:mainfrom
Conversation
lambdageek
reviewed
Apr 8, 2024
This was referenced Apr 8, 2024
24be801 to
7c1398e
Compare
Member
Author
|
@srxqds If you could double check that this also fixed the issue, it would be great. |
Contributor
yeah, thank, lgtm |
Contributor
|
but hope you can fix |
Member
Author
|
@lambdageek How would this check look in order to handle also static data from collectible assemblies ? |
Contributor
|
when enable collectiable alc, the static variable will be reference in LoaderAlloc, the ref link will be : ALC -> LoaderAlloc -> Object[] -> static variable. |
lambdageek
approved these changes
Apr 10, 2024
7c1398e to
af0d6eb
Compare
This was referenced Apr 24, 2024
Closed
Closed
Closed
…treload By default, static fields are stored in malloced memory that is registered and always scanned as roots. With hotreload, new static data is allocated inside newly created objects, so storing into it will require write barriers. In order to avoid slowing the normal execution, for fields from metadata updates, we will store into them via ldflda + stobj instead.
…llectible assemblies
af0d6eb to
9f16297
Compare
lambdageek
approved these changes
May 10, 2024
Ruihan-Yin
pushed a commit
to Ruihan-Yin/runtime
that referenced
this pull request
May 30, 2024
…hotreload enabled (dotnet#100775) * [mono][interp] Add missing GC wbarriers for static field stores in hotreload By default, static fields are stored in malloced memory that is registered and always scanned as roots. With hotreload, new static data is allocated inside newly created objects, so storing into it will require write barriers. In order to avoid slowing the normal execution, for fields from metadata updates, we will store into them via ldflda + stobj instead. * [mono][interp] Add missing GC wbarriers for static field stores in collectible assemblies
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
By default, static fields are stored in malloced memory that is registered and always scanned as roots. With hotreload, new static data is allocated inside newly created objects, so storing into it will require write barriers. In order to avoid slowing the normal execution, for fields from metadata updates, we will store into them via ldflda + stobj instead.
Fixes #100065