Print this page
JDK-8236073 G1: Use SoftMaxHeapSize to guide GC heuristics

Split Close
Expand all
Collapse all
          --- old/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
          +++ new/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
↓ open down ↓ 1201 lines elided ↑ open up ↑
1202 1202        GCTraceTime(Debug, gc, phases) debug("Reclaim Empty Regions", _gc_timer_cm);
1203 1203        reclaim_empty_regions();
1204 1204      }
1205 1205  
1206 1206      // Clean out dead classes
1207 1207      if (ClassUnloadingWithConcurrentMark) {
1208 1208        GCTraceTime(Debug, gc, phases) debug("Purge Metaspace", _gc_timer_cm);
1209 1209        ClassLoaderDataGraph::purge();
1210 1210      }
1211 1211  
1212      -    _g1h->resize_heap_if_necessary();
     1212 +    _g1h->shrink_heap_after_concurrent_mark();
1213 1213  
1214 1214      compute_new_sizes();
1215 1215  
1216 1216      verify_during_pause(G1HeapVerifier::G1VerifyRemark, VerifyOption_G1UsePrevMarking, "Remark after");
1217 1217  
1218 1218      assert(!restart_for_overflow(), "sanity");
1219 1219      // Completely reset the marking state since marking completed
1220 1220      reset_at_marking_complete();
1221 1221    } else {
1222 1222      // We overflowed.  Restart concurrent marking.
↓ open down ↓ 1854 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX