< prev index next >
src/hotspot/share/gc/g1/g1IHOPControl.cpp
Print this page
rev 58105 : [mq]: 8236073-softmaxheapsize
*** 106,116 ****
// considered.
double safe_total_heap_percentage = MIN2((double)(_heap_reserve_percent + _heap_waste_percent), 100.0);
return (size_t)MIN2(
! G1CollectedHeap::heap()->max_capacity() * (100.0 - safe_total_heap_percentage) / 100.0,
_target_occupancy * (100.0 - _heap_waste_percent) / 100.0
);
}
double G1AdaptiveIHOPControl::predict(TruncatedSeq const* seq) const {
--- 106,116 ----
// considered.
double safe_total_heap_percentage = MIN2((double)(_heap_reserve_percent + _heap_waste_percent), 100.0);
return (size_t)MIN2(
! G1CollectedHeap::heap()->soft_max_capacity() * (100.0 - safe_total_heap_percentage) / 100.0,
_target_occupancy * (100.0 - _heap_waste_percent) / 100.0
);
}
double G1AdaptiveIHOPControl::predict(TruncatedSeq const* seq) const {
*** 185,189 ****
--- 185,194 ----
_last_unrestrained_young_size,
predict(&_allocation_rate_s),
predict(&_marking_times_s),
have_enough_data_for_prediction());
}
+
+ size_t G1AdaptiveIHOPControl::predict_unrestrained_buffer_size() const {
+ // Besides the young size, the promotion bytes of Prepare Mixed and 1st Mixed GC will be counted
+ return _last_unrestrained_young_size + _last_allocated_bytes * 2;
+ }
< prev index next >