Revision: 14680
Author:   [email protected]
Date:     Wed May 15 04:08:59 2013
Log:      Simplifying GC heuristics, deleted old generation limit factor.

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

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

=======================================
--- /branches/bleeding_edge/src/heap.cc Mon May 13 04:10:31 2013
+++ /branches/bleeding_edge/src/heap.cc Wed May 15 04:08:59 2013
@@ -120,7 +120,6 @@
       new_space_high_promotion_mode_active_(false),
       old_gen_promotion_limit_(kMinimumPromotionLimit),
       old_gen_allocation_limit_(kMinimumAllocationLimit),
-      old_gen_limit_factor_(1),
       size_of_old_gen_at_last_old_space_gc_(0),
       external_allocation_limit_(0),
       amount_of_external_allocated_memory_(0),
@@ -912,25 +911,10 @@
     // Perform mark-sweep with optional compaction.
     MarkCompact(tracer);
     sweep_generation_++;
-    bool high_survival_rate_during_scavenges = IsHighSurvivalRate() &&
-        IsStableOrIncreasingSurvivalTrend();

     UpdateSurvivalRateTrend(start_new_space_size);

     size_of_old_gen_at_last_old_space_gc_ = PromotedSpaceSizeOfObjects();
-
-    if (high_survival_rate_during_scavenges &&
-        IsStableOrIncreasingSurvivalTrend()) {
- // Stable high survival rates of young objects both during partial and - // full collection indicate that mutator is either building or modifying
-      // a structure with a long lifetime.
-      // In this case we aggressively raise old generation memory limits to
-      // postpone subsequent mark-sweep collection and thus trade memory
-      // space for the mutation speed.
-      old_gen_limit_factor_ = 2;
-    } else {
-      old_gen_limit_factor_ = 1;
-    }

     old_gen_promotion_limit_ =
         OldGenPromotionLimit(size_of_old_gen_at_last_old_space_gc_);
@@ -5895,7 +5879,6 @@
          old_gen_promotion_limit_);
   PrintF("old_gen_allocation_limit_ %" V8_PTR_PREFIX "d\n",
          old_gen_allocation_limit_);
-  PrintF("old_gen_limit_factor_ %d\n", old_gen_limit_factor_);

   PrintF("\n");
PrintF("Number of handles : %d\n", HandleScope::NumberOfHandles(isolate_));
=======================================
--- /branches/bleeding_edge/src/heap.h  Tue May 14 09:26:56 2013
+++ /branches/bleeding_edge/src/heap.h  Wed May 15 04:08:59 2013
@@ -1571,7 +1571,6 @@
     intptr_t limit =
         Max(old_gen_size + old_gen_size / divisor, kMinimumPromotionLimit);
     limit += new_space_.Capacity();
-    limit *= old_gen_limit_factor_;
intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2;
     return Min(limit, halfway_to_the_max);
   }
@@ -1582,7 +1581,6 @@
     intptr_t limit =
Max(old_gen_size + old_gen_size / divisor, kMinimumAllocationLimit);
     limit += new_space_.Capacity();
-    limit *= old_gen_limit_factor_;
intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2;
     return Min(limit, halfway_to_the_max);
   }
@@ -2002,10 +2000,6 @@
   // every allocation in large object space.
   intptr_t old_gen_allocation_limit_;

- // Sometimes the heuristics dictate that those limits are increased. This
-  // variable records that fact.
-  int old_gen_limit_factor_;
-
   // Used to adjust the limits that control the timing of the next GC.
   intptr_t size_of_old_gen_at_last_old_space_gc_;

--
--
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