Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8198505

Remove CollectorPolicy and its subclasses

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 13
    • None
    • hotspot
    • None
    • gc
    • b20

      I'd like to propose that we get rid of the CollectorPolicy classes.

      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/

            stefank Stefan Karlsson
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: