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

Remove _last_ditch_collection GC-cause and avoid expanding heap on Metaspace OOM

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • None
    • gc
    • b115

      Currently the GC-cause _last_ditch_collection is used for 2 types of full-collections clearing all soft refereces:
      1. Last resort when out of metaspace memory
      2. WhiteBox initiated full GC

      These have not much in common and the GC-cause is strangely named when looking at it meaning. This cause also comes with an unwanted side-effect, it will expand the heap if possible and this is strange since it is not cause by a failed heap-allocation. My proposal is to remove the _last_ditch_collection cause and instead create _wb_full_gc for the WhiteBox-case and _metadata_GC_clear_soft_refs for the out of metaspace case. The idea is that thet will work similar to _last_ditch_collection in every way except for growing the heap.

            sjohanss Stefan Johansson
            sjohanss Stefan Johansson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: