Print this page
8236073: G1: Use SoftMaxHeapSize to guide GC heuristics
*** 28,37 ****
--- 28,39 ----
#include "gc/g1/g1BarrierSet.hpp"
#include "gc/g1/g1CollectedHeap.inline.hpp"
#include "gc/g1/g1CollectorState.hpp"
#include "gc/g1/g1ConcurrentMark.inline.hpp"
#include "gc/g1/g1ConcurrentMarkThread.inline.hpp"
+ #include "gc/g1/g1ConcurrentHeapResize.hpp"
+ #include "gc/g1/g1ConcurrentHeapResizeThread.hpp"
#include "gc/g1/g1DirtyCardQueue.hpp"
#include "gc/g1/g1HeapVerifier.hpp"
#include "gc/g1/g1OopClosures.inline.hpp"
#include "gc/g1/g1Policy.hpp"
#include "gc/g1/g1RegionMarkStatsCache.inline.hpp"
*** 1207,1217 ****
if (ClassUnloadingWithConcurrentMark) {
GCTraceTime(Debug, gc, phases) debug("Purge Metaspace", _gc_timer_cm);
ClassLoaderDataGraph::purge();
}
! _g1h->resize_heap_if_necessary();
compute_new_sizes();
verify_during_pause(G1HeapVerifier::G1VerifyRemark, VerifyOption_G1UsePrevMarking, "Remark after");
--- 1209,1222 ----
if (ClassUnloadingWithConcurrentMark) {
GCTraceTime(Debug, gc, phases) debug("Purge Metaspace", _gc_timer_cm);
ClassLoaderDataGraph::purge();
}
! // Don't resize heap in remark if concurrent resizing is in progress
! if (!_g1h->concurrent_heap_resize()->resize_thread()->during_cycle()) {
! _g1h->resize_heap_if_necessary(true);
! }
compute_new_sizes();
verify_during_pause(G1HeapVerifier::G1VerifyRemark, VerifyOption_G1UsePrevMarking, "Remark after");