RFR(S) 8154467: Cleanup initialization of GCPolicyCounters

Stefan Johansson stefan.johansson at oracle.com
Wed Apr 20 12:26:35 UTC 2016

Hi Mikael,

On 2016-04-20 13:17, Mikael Gerdin wrote:
> Hi all,
> Please review this small cleanup to how GCPolicyCounters are 
> initialized and managed.
> GCPolicyCounters* counters() is part of the CollectorPolicy API but in 
> fact it is not necessary to expose it at such a general level.
> G1 has only used the object internally in the policy code and managing 
> the policy counters object can be safely moved inside the G1Policy.
> ParalellGC has ignored initializing the field in the CollectorPolicy at
> all, since it does not really use the CollectorPolicy API.
> The Gen collectors can be adapted to access the counters() accessor 
> through the GenCollectorPolicy class instead.
> Testing: RBT GC Testing
> Webrev: http://cr.openjdk.java.net/~mgerdin/8154467/webrev.0/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8154467
Looks good,

> /Mikael

More information about the hotspot-gc-dev mailing list