Revision: 17753
Author:   [email protected]
Date:     Thu Nov 14 15:25:21 2013 UTC
Log:      Do not update survival rate if the new space size is zero.

BUG=v8:2333
LOG=N
[email protected]

Review URL: https://chromiumcodereview.appspot.com/48443002
http://code.google.com/p/v8/source/detail?r=17753

Modified:
 /branches/bleeding_edge/src/heap.cc
 /branches/bleeding_edge/test/cctest/test-api.cc

=======================================
--- /branches/bleeding_edge/src/heap.cc Thu Nov 14 15:14:37 2013 UTC
+++ /branches/bleeding_edge/src/heap.cc Thu Nov 14 15:25:21 2013 UTC
@@ -939,6 +939,8 @@


 void Heap::UpdateSurvivalRateTrend(int start_new_space_size) {
+  if (start_new_space_size == 0) return;
+
   double survival_rate =
       (static_cast<double>(young_survivors_after_last_gc_) * 100) /
       start_new_space_size;
=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc Wed Nov 13 10:34:06 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-api.cc Thu Nov 14 15:25:21 2013 UTC
@@ -17130,6 +17130,14 @@
   intptr_t final_size = CcTest::heap()->SizeOfObjects();
   CHECK_LT(final_size, initial_size + 1);
 }
+
+
+TEST(Regress2333) {
+  LocalContext env;
+  for (int i = 0; i < 3; i++) {
+    CcTest::heap()->PerformScavenge();
+  }
+}

 static uint32_t* stack_limit;

--
--
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/groups/opt_out.

Reply via email to