8133456: HeapRegionManager::shrink_by() iterates suboptimally across regions
authortschatzl
Mon, 24 Aug 2015 16:32:50 +0200
changeset 32390 b0f6868d46ee
parent 32389 626f27450e12
child 32403 ca775ebfab3a
child 32584 2e0377d76c5a
child 32585 cffadc776803
8133456: HeapRegionManager::shrink_by() iterates suboptimally across regions Reviewed-by: brutisso, tbenson
hotspot/src/share/vm/gc/g1/heapRegionManager.cpp
--- a/hotspot/src/share/vm/gc/g1/heapRegionManager.cpp	Mon Aug 24 16:27:41 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/heapRegionManager.cpp	Mon Aug 24 16:32:50 2015 +0200
@@ -428,7 +428,7 @@
 
     uncommit_regions(idx_last_found + num_last_found - to_remove, to_remove);
 
-    cur -= num_last_found;
+    cur = idx_last_found;
     removed += to_remove;
   }