Reviewers: Hannes Payer,

Description:
Version 4.4.63.30 (cherry-pick)

Merged d8ad147944bf761f322482f68b804454321ac245

Grow heap slowly after running memory reducer.

R=hpa...@chromium.org
BUG=515174
LOG=NO

Please review this at https://codereview.chromium.org/1277943003/

Base URL: https://chromium.googlesource.com/v8/v8.git@4.4

Affected files (+11, -1 lines):
  M include/v8-version.h
  M src/heap/gc-idle-time-handler.h
  M src/heap/heap.cc


Index: include/v8-version.h
diff --git a/include/v8-version.h b/include/v8-version.h
index e18f55cc72c30834617a86c5c18dd4ae606bad5a..180969f1161e78e6a8d56025d1bc12e7850b5b42 100644
--- a/include/v8-version.h
+++ b/include/v8-version.h
@@ -11,7 +11,7 @@
 #define V8_MAJOR_VERSION 4
 #define V8_MINOR_VERSION 4
 #define V8_BUILD_NUMBER 63
-#define V8_PATCH_LEVEL 29
+#define V8_PATCH_LEVEL 30

 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
Index: src/heap/gc-idle-time-handler.h
diff --git a/src/heap/gc-idle-time-handler.h b/src/heap/gc-idle-time-handler.h index c4e28f0d1b7d4325cea66ca6fe796abbb998f7b4..1ab506d8174d88744fffb8e31de09e72d37145f0 100644
--- a/src/heap/gc-idle-time-handler.h
+++ b/src/heap/gc-idle-time-handler.h
@@ -231,6 +231,10 @@ class GCIdleTimeHandler {
       size_t scavenger_speed_in_bytes_per_ms,
       size_t new_space_allocation_throughput_in_bytes_per_ms);

+  bool ShouldGrowHeapSlowly() {
+    return mode() == kDone;
+  }
+
   enum Mode { kReduceLatency, kReduceMemory, kDone };

   Mode mode() { return mode_; }
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 6bfa4ae46629e1eff91db93706a1cafbbbd03058..f971359198e406331c9a64f737ea62fd48f37134 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5407,6 +5407,12 @@ void Heap::SetOldGenerationAllocationLimit(intptr_t old_gen_size,
     factor = min_factor;
   }

+  const double kConservativeHeapGrowingFactor = 1.3;
+  if (gc_idle_time_handler_.ShouldGrowHeapSlowly()) {
+    factor = Min(factor, kConservativeHeapGrowingFactor);
+  }
+
+
   idle_factor = Min(factor, idle_max_factor);

   old_generation_allocation_limit_ =


--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to