Request for Comments: 8184734: Rework G1 root scanning to avoid multiple CLD passes
Mikael Gerdin
mikael.gerdin at oracle.com
Thu Jul 20 13:04:11 UTC 2017
Hi all,
Please review this preliminary change to clean up G1 root processing a bit.
I've not run this through a lot of testing but this will give you a
general idea about where I think we should be going.
The basic idea is explained in the bug text but I'll reproduce it here
as well:
> After JDK-8154580 we no longer need the multi-pass CLD scanning in G1.
> The reason for this is that classes which are strongly reachable from interpreter frames are kept alive by marking the mirror in the initial mark pause.
>
> The current solution to this was to first ensure that in an initial step all CLDs which were strongly reachable had to be scanned and claimed before any weakly reachable CLDs could be scanned and claimed. This code can now be simplified and we can walk all the CLDs in one go, only doing strong marking on the ones which are strong as per always_strong_cld_do.
> This cleanup also allows us to remove the claimed marks clearing since CLD scanning is now completely single threaded.
>
> Waiting for strong classes to be discovered is still needed for the case where an nmethod on the stack is the single root to a class.
Webrev: http://cr.openjdk.java.net/~mgerdin/8184734/webrev.0/
Bug: https://bugs.openjdk.java.net/browse/JDK-8184734
Testing: jprt, some local tonga tests, kitchensink and runThese
Suggestions on further testing would be much appreciated!
Thanks
/Mikael
More information about the hotspot-gc-dev
mailing list