-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8373203: Genshen: Non-strong reference leak in old gen #28810
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
base: master
Are you sure you want to change the base?
8373203: Genshen: Non-strong reference leak in old gen #28810
Conversation
Also, enhance whitebox support for Shenandoah
|
👋 Welcome back wkemper! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@earthling-amzn The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
|
@earthling-amzn this pull request can not be integrated into git checkout fix-old-reference-processing
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
stefank
left a comment
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.
I added a few style proposals to make the Shenandoah sections look more consistent with the surrounding style in the shared code.
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
The generational mode for Shenandoah will collect referents for the generation being collected. For example, if we have a young reference pointing to an old referent, that young reference will be processed after we finish marking the old generation. This presents a problem for discovery.
When the young mark encounters a young reference with an old referent, it cannot discover it because old marking hasn't finished. However, if it does not discover it, the old referent will be strongly marked. This, in turn, will prevent the old generation from clearing the referent (if it even reaches it again during old marking).
To solve this, we let young reference processing discover the old reference by having it use the old generation reference processor to do so. This means the old reference processor can have a discovered list that contains young weak references. If any of these young references reside in a region that is collected, old reference processing will crash when it processes such a reference. Therefore, we add a method
heal_discovered_liststo traverse the discovered lists after young evacuation is complete. The method will replace any forwarded entries in the discovered list with the forwardee.This PR also extends whitebox testing support for Shenandoah, giving us the ability to trigger young/old collections and interrogate some properties of heaps and regions.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28810/head:pull/28810$ git checkout pull/28810Update a local copy of the PR:
$ git checkout pull/28810$ git pull https://git.openjdk.org/jdk.git pull/28810/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28810View PR using the GUI difftool:
$ git pr show -t 28810Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28810.diff
Using Webrev
Link to Webrev Comment