Remove heap size filter for context disposal garbage collection.
authorhpayer@chromium.org <hpayer@chromium.org>
Fri, 7 Nov 2014 13:07:04 +0000 (13:07 +0000)
committerhpayer@chromium.org <hpayer@chromium.org>
Fri, 7 Nov 2014 13:07:47 +0000 (13:07 +0000)
BUG=
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/712563002

Cr-Commit-Position: refs/heads/master@{#25213}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/heap/gc-idle-time-handler.cc
src/heap/gc-idle-time-handler.h
test/unittests/heap/gc-idle-time-handler-unittest.cc

index b3350d1..accb87c 100644 (file)
@@ -144,8 +144,7 @@ GCIdleTimeAction GCIdleTimeHandler::Compute(size_t idle_time_in_ms,
                                             HeapState heap_state) {
   if (idle_time_in_ms == 0) {
     if (heap_state.incremental_marking_stopped) {
-      if (heap_state.size_of_objects < kSmallHeapSize &&
-          heap_state.contexts_disposed > 0 &&
+      if (heap_state.contexts_disposed > 0 &&
           heap_state.contexts_disposal_rate < kHighContextDisposalRate) {
         return GCIdleTimeAction::FullGC();
       }
index 1e87e9d..cae6936 100644 (file)
@@ -106,10 +106,6 @@ class GCIdleTimeHandler {
   // Number of scavenges that will trigger start of new idle round.
   static const int kIdleScavengeThreshold;
 
-  // Heap size threshold below which we prefer mark-compact over incremental
-  // step.
-  static const size_t kSmallHeapSize = 4 * kPointerSize * MB;
-
   // That is the maximum idle time we will have during frame rendering.
   static const size_t kMaxFrameRenderingIdleTime = 16;
 
index 2b476f7..977882a 100644 (file)
@@ -198,7 +198,7 @@ TEST_F(GCIdleTimeHandlerTest, ContextDisposeHighRate) {
   heap_state.incremental_marking_stopped = true;
   int idle_time_ms = 0;
   GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
-  EXPECT_EQ(DO_NOTHING, action.type);
+  EXPECT_EQ(DO_FULL_GC, action.type);
 }
 
 
@@ -221,7 +221,6 @@ TEST_F(GCIdleTimeHandlerTest, AfterContextDisposeZeroIdleTime) {
   heap_state.contexts_disposed = 1;
   heap_state.contexts_disposal_rate = 1.0;
   heap_state.incremental_marking_stopped = true;
-  heap_state.size_of_objects = GCIdleTimeHandler::kSmallHeapSize / 2;
   int idle_time_ms = 0;
   GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state);
   EXPECT_EQ(DO_FULL_GC, action.type);