-
Notifications
You must be signed in to change notification settings - Fork 161
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
kernel: use more accurate marking #2408
Merged
Merged
Commits on Apr 26, 2018
-
kernel: add code to debug subbag marking in GASMAN
If DEBUG_GASMAN_MARKING is #defined, then we increment a counter whenever `MarkBag` is called on something that isn't either zero, or a valid bag ref, or an immediate integer or FFE. By setting a break point on the line incrementing BadMarksCounter, one can quickly find out which bags are affected.
Configuration menu - View commit details
-
Copy full SHA for 3b2fffa - Browse repository at this point
Copy the full SHA 3b2fffaView commit details -
kernel: use custom GC marking for T_FUNCTION
Not all slots of a T_FUNCTION bag are filled with bag refs, yet when marking the slots of such a bag during garbage collection, we still used MarkAllSubBags. This is usually no problem with GASMAN, as it detects if a pointer isn't a master pointer, and can then simply ignore it. But other garbage collections can't as easily verify master pointers. So let's try to be accurate about what we mark as a bag and what not: skip the first eight slots of every T_FUNCTION bag for marking (they contain pointers to C functions), and also ensure that the rest of any T_FUNCTION bag only contains bag refs. Also fix a bug in saving/restoring operations, where the 'enabled' field was stored as an UInt, even though it now is an Obj (though we currently only store immediate ints in it, hence there was no functional problem).
Configuration menu - View commit details
-
Copy full SHA for 7fe50d0 - Browse repository at this point
Copy the full SHA 7fe50d0View commit details -
kernel: unify implementation of MarkNNNSubBags
They now all call MarkArrayOfBags, but thanks to inlining, this produces identical machine code.
Configuration menu - View commit details
-
Copy full SHA for 9888677 - Browse repository at this point
Copy the full SHA 9888677View commit details -
Configuration menu - View commit details
-
Copy full SHA for be15779 - Browse repository at this point
Copy the full SHA be15779View commit details -
kernel: use T_DATOBJ for StackStat and StackExpr
... instead of a T_BODY, as we don't really create a T_BODY here. (and this can lead to confusion in GC marking)
Configuration menu - View commit details
-
Copy full SHA for b3a2362 - Browse repository at this point
Copy the full SHA b3a2362View commit details -
Configuration menu - View commit details
-
Copy full SHA for f6993c2 - Browse repository at this point
Copy the full SHA f6993c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for e87de2c - Browse repository at this point
Copy the full SHA e87de2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for cf2c8c1 - Browse repository at this point
Copy the full SHA cf2c8c1View commit details
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.