< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp

Print this page

        

@@ -460,15 +460,13 @@
 }
 
 void ShenandoahControlThread::service_uncommit(double shrink_before) {
   ShenandoahHeap* heap = ShenandoahHeap::heap();
 
-  // 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;
+  // 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.
 
   bool has_work = false;
   for (size_t i = 0; i < heap->num_regions(); i++) {
     ShenandoahHeapRegion *r = heap->get_region(i);
     if (r->is_empty_committed() && (r->empty_time() < shrink_before)) {
< prev index next >