< prev index next >
src/hotspot/share/gc/g1/g1IHOPControl.cpp
Print this page
rev 60542 : [mq]: 8245511-rev.3
*** 146,169 ****
return (size_t)(_initial_ihop_percent * _target_occupancy / 100.0);
}
}
double G1AdaptiveIHOPControl::last_mutator_period_old_allocation_rate() const {
- // The upper limit of the freed region count is the number of regions allocated
- // since the last gc. When more humongous regions survived the current gc than
- // survived the previous one, deduct the increment.
assert(_last_allocation_time_s > 0, "This should not be called when the last GC is full");
- size_t freed_humongous_bytes = _old_gen_alloc_tracker->_last_period_humongous_bytes;
- size_t humongous_bytes_after_penultimate_gc = _old_gen_alloc_tracker->_humongous_bytes_after_penultimate_gc;
- size_t humongous_bytes_after_last_gc = _old_gen_alloc_tracker->_humongous_bytes_after_last_gc;
- size_t last_period_old_bytes = _old_gen_alloc_tracker->last_period_old_bytes();
! if (freed_humongous_bytes > 0 && humongous_bytes_after_penultimate_gc < humongous_bytes_after_last_gc) {
! freed_humongous_bytes -= humongous_bytes_after_last_gc - humongous_bytes_after_penultimate_gc;
! }
! assert(last_period_old_bytes >= freed_humongous_bytes, "Allocation rate cannot be negative");
! return (last_period_old_bytes - freed_humongous_bytes) / _last_allocation_time_s;
}
void G1AdaptiveIHOPControl::update_allocation_info(double allocation_time_s,
size_t additional_buffer_size) {
G1IHOPControl::update_allocation_info(allocation_time_s, additional_buffer_size);
--- 146,158 ----
return (size_t)(_initial_ihop_percent * _target_occupancy / 100.0);
}
}
double G1AdaptiveIHOPControl::last_mutator_period_old_allocation_rate() const {
assert(_last_allocation_time_s > 0, "This should not be called when the last GC is full");
! return _old_gen_alloc_tracker->last_period_net_survived_old_bytes() / _last_allocation_time_s;
}
void G1AdaptiveIHOPControl::update_allocation_info(double allocation_time_s,
size_t additional_buffer_size) {
G1IHOPControl::update_allocation_info(allocation_time_s, additional_buffer_size);
< prev index next >