hotspot/src/share/vm/memory/defNewGeneration.cpp
changeset 15215 048f775ae371
parent 14583 d70ee55535f4
child 17625 3e91c67ddece
--- a/hotspot/src/share/vm/memory/defNewGeneration.cpp	Mon Jan 14 09:58:52 2013 +0100
+++ b/hotspot/src/share/vm/memory/defNewGeneration.cpp	Mon Jan 14 21:30:45 2013 +0100
@@ -550,6 +550,11 @@
   return allocate(size, is_tlab);
 }
 
+void DefNewGeneration::adjust_desired_tenuring_threshold() {
+  // Set the desired survivor size to half the real survivor space
+  _tenuring_threshold =
+    age_table()->compute_tenuring_threshold(to()->capacity()/HeapWordSize);
+}
 
 void DefNewGeneration::collect(bool   full,
                                bool   clear_all_soft_refs,
@@ -649,9 +654,7 @@
 
     assert(to()->is_empty(), "to space should be empty now");
 
-    // Set the desired survivor size to half the real survivor space
-    _tenuring_threshold =
-      age_table()->compute_tenuring_threshold(to()->capacity()/HeapWordSize);
+    adjust_desired_tenuring_threshold();
 
     // A successful scavenge should restart the GC time limit count which is
     // for full GC's.