RFR(S) 8154752: Cleanup initialization of G1Policy

Mikael Gerdin mikael.gerdin at oracle.com
Thu Apr 21 07:53:04 UTC 2016

Hi all,

Please review this small cleanup partially suggested in the review of 
The change modifies G1Policy to initialize its members in the 
initialization list instead of in the constructor body and clarifies the 
dependencies that the G1Policy::init method has on G1CollectedHeap by 
forcing a caller to pass a heap and collection set pointer.
The reasoning behind forcing the caller to pass a G1CollectionSet* is 
that I want to move towards only exposing "const G1CollectionSet*" in 
G1CollectedHeap. G1Policy is one of the places where it's clearly 
necessary to have a mutable G1CollectionSet.

Testing: RBT GC Testing
Bug: https://bugs.openjdk.java.net/browse/JDK-8154752
Webrev: http://cr.openjdk.java.net/~mgerdin/8154752/webrev.0


More information about the hotspot-gc-dev mailing list