mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8222186: Shenandoah should not uncommit below minimum heap size
Reviewed-by: zgu, rkennke
This commit is contained in:
parent
6453df40be
commit
321615029c
5 changed files with 54 additions and 9 deletions
|
@ -462,9 +462,11 @@ void ShenandoahControlThread::service_stw_degenerated_cycle(GCCause::Cause cause
|
|||
void ShenandoahControlThread::service_uncommit(double shrink_before) {
|
||||
ShenandoahHeap* heap = ShenandoahHeap::heap();
|
||||
|
||||
// Scan through the heap and determine if there is work to do. This avoids taking
|
||||
// heap lock if there is no work available, avoids spamming logs with superfluous
|
||||
// logging messages, and minimises the amount of work while locks are taken.
|
||||
// Determine if there is work to do. This avoids taking heap lock if there is
|
||||
// no work available, avoids spamming logs with superfluous logging messages,
|
||||
// and minimises the amount of work while locks are taken.
|
||||
|
||||
if (heap->committed() <= heap->min_capacity()) return;
|
||||
|
||||
bool has_work = false;
|
||||
for (size_t i = 0; i < heap->num_regions(); i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue