RFR(S) 8154467: Cleanup initialization of GCPolicyCounters
mikael.gerdin at oracle.com
Wed Apr 20 13:09:59 UTC 2016
On 2016-04-20 13:48, Erik Helin wrote:
> On 2016-04-20, Mikael Gerdin wrote:
>> Hi all,
>> Please review this small cleanup to how GCPolicyCounters are initialized and
>> 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
> Nice cleanup. Could you make
> GenCollectorPolicy::initialize_gc_policy_counters pure virtual and let
> the implementors of GenCollectorPolicy decide if they want to call
> ShouldNotReachHere in their implementation?
Sure, I can do that.
More information about the hotspot-gc-dev