The CollectorPolicy classes contains a mix of features to support the CollectedHeaps. A few of them are:
* Have virtual functions that either CMS or Serial can override. This was important when CMS didn't have it's own CollectedHeap. But CMSHeap was recently added, so this isn't needed anymore.
* Has common allocation code for CMS and Serial. Can be moved to GenCollectedHeap.
* Deal with parts of the heap sizing and corresponding flags. A lot of the flag handling has been moved to the GCArguments classes. We should move the CollectorPolicy flag handling functions there as well.
* Keeps the state for the SoftRefPolicy. Separate this out to it's own class.
* Has the satisfy_failed_metadata_allocation function. No need to be located in CollectorPolicy.
I'm working on a prototype to show what this would look like. This is a full webrev of the code, to see what the end goal could look like. However, I think this should be fixed incrementally and not as a big gigantic patch, if possible:
http://cr.openjdk.java.net/~stefank/prototype/removeCollectorPolicy/webrev.01/
- is blocked by
-
JDK-8198373 Remove CollectorPolicy::is/as functions
-
- Resolved
-
-
JDK-8198507 Remove CollectorPolicy::create_rem_set
-
- Resolved
-
-
JDK-8198509 Move satisfy_failed_metadata_allocation out from CollectorPolicy
-
- Resolved
-
-
JDK-8198511 Move allocation functions from GenCollectorPolicy to GenCollectedHeap
-
- Resolved
-
-
JDK-8198515 Extract SoftReferencePolicy code out of CollectorPolicy
-
- Resolved
-
-
JDK-8198525 Move _size_policy out of GenCollectorPolicy into GenCollectedHeap
-
- Resolved
-
-
JDK-8198528 Move GenerationSpecs from GenCollectorPolicy to GenCollectedHeap
-
- Resolved
-
-
JDK-8198530 Move _gc_policy_counters from GenCollectorPolicy to GenCollectedHeap
-
- Resolved
-
- relates to
-
JDK-8226797 serviceability/tmtools/jstat/GcCapacityTest.java fails with Exception: java.lang.RuntimeException: OGCMN > OGCMX (min generation capacity > max generation capacity)
-
- Resolved
-