RFR: 8198509: Move satisfy_failed_metadata_allocation out from CollectorPolicy

Stefan Karlsson stefan.karlsson at oracle.com
Wed Feb 21 13:34:52 UTC 2018


Hi all,

Please review this patch to move satisfy_failed_metadata_allocation out 
from CollectorPolicy.

  http://cr.openjdk.java.net/~stefank/8198509/webrev.01/
  https://bugs.openjdk.java.net/browse/JDK-8198509

This is done in preparation for the work to remove CollectorPolicy:
  https://bugs.openjdk.java.net/browse/JDK-8198505

The function and the code moves to MetaspaceGC, and CollectedHeap gets a 
virtual function that calls 
MetaspaceGC::satisfy_failed_metadata_allocation. MetaspaceGC seems like 
a good place to put this function, but I'm open for suggestions.

The current allocation code would then be:
  Metaspace::allocte
   virtual CollectedHeap::satisfy_failed_metadata_allocation
    MetaspaceGC::satisfy_failed_metadata_allocation

And GCs that want to provide alternative implementations to 
CollectedHeap::satisfy_failed_metadata_allocation (ZGC for example), 
could still easily do so.

Thanks,
StefanK



More information about the hotspot-gc-dev mailing list