Revision: 21865
Author:   [email protected]
Date:     Tue Jun 17 06:10:43 2014 UTC
Log:      Revert "Grow big old generation slower.", tanks SplayHarder.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/331393002
http://code.google.com/p/v8/source/detail?r=21865

Modified:
 /branches/bleeding_edge/src/heap.cc
 /branches/bleeding_edge/src/heap.h

=======================================
--- /branches/bleeding_edge/src/heap.cc Fri Jun 13 11:06:42 2014 UTC
+++ /branches/bleeding_edge/src/heap.cc Tue Jun 17 06:10:43 2014 UTC
@@ -60,6 +60,7 @@
 // Will be 4 * reserved_semispace_size_ to ensure that young
 // generation can be aligned to its size.
       maximum_committed_(0),
+      old_space_growing_factor_(4),
       survived_since_last_expansion_(0),
       sweep_generation_(0),
       always_allocate_scope_depth_(0),
@@ -5024,6 +5025,12 @@
           AllocationMemento::kSize));

   code_range_size_ = code_range_size * MB;
+
+ // We set the old generation growing factor to 2 to grow the heap slower on
+  // memory-constrained devices.
+  if (max_old_generation_size_ <= kMaxOldSpaceSizeMediumMemoryDevice) {
+    old_space_growing_factor_ = 2;
+  }

   configured_ = true;
   return true;
=======================================
--- /branches/bleeding_edge/src/heap.h  Fri Jun 13 13:31:56 2014 UTC
+++ /branches/bleeding_edge/src/heap.h  Tue Jun 17 06:10:43 2014 UTC
@@ -1074,23 +1074,9 @@
       700 * kPointerMultiplier;

   intptr_t OldGenerationAllocationLimit(intptr_t old_gen_size) {
-    intptr_t limit;
-    if (FLAG_stress_compaction) {
-      limit = old_gen_size + old_gen_size / 10;
-    } else if (old_gen_size < max_old_generation_size_ / 8) {
-      if (max_old_generation_size_ <= kMaxOldSpaceSizeMediumMemoryDevice) {
-        limit = old_gen_size * 2;
-      } else {
-        limit = old_gen_size * 4;
-      }
-    } else if (old_gen_size < max_old_generation_size_ / 4) {
-      limit = static_cast<intptr_t>(old_gen_size * 1.5);
-    } else if (old_gen_size < max_old_generation_size_ / 2) {
-      limit = static_cast<intptr_t>(old_gen_size * 1.2);
-    } else {
-      limit = static_cast<intptr_t>(old_gen_size * 1.1);
-    }
-
+    intptr_t limit = FLAG_stress_compaction
+        ? old_gen_size + old_gen_size / 10
+        : old_gen_size * old_space_growing_factor_;
     limit = Max(limit, kMinimumOldGenerationAllocationLimit);
     limit += new_space_.Capacity();
intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2;
@@ -1515,6 +1501,11 @@
   intptr_t max_executable_size_;
   intptr_t maximum_committed_;

+  // The old space growing factor is used in the old space heap growing
+  // strategy. The new old space size is the current old space size times
+  // old_space_growing_factor_.
+  int old_space_growing_factor_;
+
   // For keeping track of how much data has survived
   // scavenge since last new space expansion.
   int survived_since_last_expansion_;

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to