This repository was archived by the owner on Jan 23, 2023. It is now read-only.
[Local GC] Move knowledge of the free object method table outside of the GC#10755
Merged
swgillespie merged 4 commits intodotnet:masterfrom Apr 9, 2017
Merged
[Local GC] Move knowledge of the free object method table outside of the GC#10755swgillespie merged 4 commits intodotnet:masterfrom
swgillespie merged 4 commits intodotnet:masterfrom
Conversation
jkotas
reviewed
Apr 6, 2017
src/gc/env/gcenv.ee.h
Outdated
| static void HandleFatalError(unsigned int exitCode); | ||
| static bool ShouldFinalizeObjectForUnload(AppDomain* pDomain, Object* obj); | ||
| static MethodTable* GetFreeObjectMethodTable(); | ||
| static size_t GetSizeOfArrayBase(); |
Member
There was a problem hiding this comment.
These constants are used on very perf sensitive paths. I do not think it is ok to virtualize them. They have to be part of the fixed binary contract between VM and GC.
Author
There was a problem hiding this comment.
These methods are called once on GC startup and cached on the GC side - is that still a problem?
Author
adityamandaleeka
approved these changes
Apr 6, 2017
Member
|
Need to resolve conflicts ... LGTM otherwise. |
…side of the GC" This reverts commit 02979e5.
…part of the binary contract between the EE and the GC
18367c4 to
09857ff
Compare
Author
|
thanks! |
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.
The EE provides a method table for a specific type of object, the "free object", which is used by the GC to keep the heap crawlable. A free object is conceptually similar to a managed array in that it consists of an object header and a field indicating how many array elements the object has (i.e. how large the free region is), followed by a region of space known to be free to the GC.
This PR ensures that the GC's knowledge of the free method table is acquired through
GCToEEInterfaceupon startup. This PR also has the GC acquire two additional details on startup: 1) the size ofArrayBase, and the 2) offset of theNumComponentsfield ofArrayBase. These are used to locate the offset of the field into which the size of the free object is stored and to locate the first byte of the free object's free region.