< prev index next >
src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp
Print this page
rev 55538 : 8226757: Shenandoah: Make Traversal a separate mode
*** 33,54 ****
ShenandoahAdaptiveHeuristics::ShenandoahAdaptiveHeuristics() :
ShenandoahHeuristics(),
_cycle_gap_history(new TruncatedSeq(5)),
_conc_mark_duration_history(new TruncatedSeq(5)),
! _conc_uprefs_duration_history(new TruncatedSeq(5)) {
!
! SHENANDOAH_ERGO_ENABLE_FLAG(ExplicitGCInvokesConcurrent);
! SHENANDOAH_ERGO_ENABLE_FLAG(ShenandoahImplicitGCInvokesConcurrent);
!
! // Final configuration checks
! SHENANDOAH_CHECK_FLAG_SET(ShenandoahLoadRefBarrier);
! SHENANDOAH_CHECK_FLAG_SET(ShenandoahSATBBarrier);
! SHENANDOAH_CHECK_FLAG_SET(ShenandoahKeepAliveBarrier);
! SHENANDOAH_CHECK_FLAG_SET(ShenandoahCASBarrier);
! SHENANDOAH_CHECK_FLAG_SET(ShenandoahCloneBarrier);
! }
ShenandoahAdaptiveHeuristics::~ShenandoahAdaptiveHeuristics() {}
void ShenandoahAdaptiveHeuristics::choose_collection_set_from_regiondata(ShenandoahCollectionSet* cset,
RegionData* data, size_t size,
--- 33,43 ----
ShenandoahAdaptiveHeuristics::ShenandoahAdaptiveHeuristics() :
ShenandoahHeuristics(),
_cycle_gap_history(new TruncatedSeq(5)),
_conc_mark_duration_history(new TruncatedSeq(5)),
! _conc_uprefs_duration_history(new TruncatedSeq(5)) {}
ShenandoahAdaptiveHeuristics::~ShenandoahAdaptiveHeuristics() {}
void ShenandoahAdaptiveHeuristics::choose_collection_set_from_regiondata(ShenandoahCollectionSet* cset,
RegionData* data, size_t size,
*** 119,129 ****
} else if (phase == ShenandoahPhaseTimings::conc_update_refs) {
_conc_uprefs_duration_history->add(secs);
} // Else ignore
}
! bool ShenandoahAdaptiveHeuristics::should_start_normal_gc() const {
ShenandoahHeap* heap = ShenandoahHeap::heap();
size_t capacity = heap->max_capacity();
size_t available = heap->free_set()->available();
// Check if we are falling below the worst limit, time to trigger the GC, regardless of
--- 108,118 ----
} else if (phase == ShenandoahPhaseTimings::conc_update_refs) {
_conc_uprefs_duration_history->add(secs);
} // Else ignore
}
! bool ShenandoahAdaptiveHeuristics::should_start_gc() const {
ShenandoahHeap* heap = ShenandoahHeap::heap();
size_t capacity = heap->max_capacity();
size_t available = heap->free_set()->available();
// Check if we are falling below the worst limit, time to trigger the GC, regardless of
*** 170,180 ****
log_info(gc, ergo)("Free headroom: " SIZE_FORMAT "M (free) - " SIZE_FORMAT "M (spike) - " SIZE_FORMAT "M (penalties) = " SIZE_FORMAT "M",
available / M, spike_headroom / M, penalties / M, allocation_headroom / M);
return true;
}
! return ShenandoahHeuristics::should_start_normal_gc();
}
bool ShenandoahAdaptiveHeuristics::should_start_update_refs() {
if (! _update_refs_adaptive) {
return _update_refs_early;
--- 159,169 ----
log_info(gc, ergo)("Free headroom: " SIZE_FORMAT "M (free) - " SIZE_FORMAT "M (spike) - " SIZE_FORMAT "M (penalties) = " SIZE_FORMAT "M",
available / M, spike_headroom / M, penalties / M, allocation_headroom / M);
return true;
}
! return ShenandoahHeuristics::should_start_gc();
}
bool ShenandoahAdaptiveHeuristics::should_start_update_refs() {
if (! _update_refs_adaptive) {
return _update_refs_early;
< prev index next >