-
Notifications
You must be signed in to change notification settings - Fork 69
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
Ensure reference objects are either traced or cleared #1126
Conversation
I marked this PR as ready for review. This fixes some obvious problems described in #1125, but there are still crashes when running mmtk-openjdk with the reference processor in mmtk-core. For example, running lusearch with StickyImmix with DaCapo Chopin with reference processing enabled will still crash due to SIGSEGV, regardless whether this PR is applied to the master branch or not. As we discussed yesterday, we should enable binding-side reference processing for the OpenJDK binding ASAP. |
Only conditionally add the rescan packet. Add it to the right bucket.
The Ruby test failed due to a known problem mmtk/ruby#67 I'll re-run the Ruby test. |
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.
LGTM
After retaining soft references, we postpone the scanning of soft references until the transitive closure from retained soft references is fully expanded. While tracing and scanning new objects reached from the referents of soft references, new soft references may be discovered, and they will be added to the reference processor. By postponing the scanning, we ensure the newly discovered soft references are scanned, too.
To ensure we do not accidentally enqueue more objects than we should, we no longer call
trace_object
when scanning soft, weak and phantom references. Instead, we callObjectReference::get_forwarded_object
to get the forwarded references and referents. We still calltrace_object
when retaining soft references, and when forwarding references in MarkCompact during the second transitive closure.Fixes: #1125