From 19c32969885c752f8507625f30171695b34c595b Mon Sep 17 00:00:00 2001 From: "hpayer@chromium.org" Date: Fri, 7 Nov 2014 13:07:04 +0000 Subject: [PATCH] Remove heap size filter for context disposal garbage collection. 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 | 3 +-- src/heap/gc-idle-time-handler.h | 4 ---- test/unittests/heap/gc-idle-time-handler-unittest.cc | 3 +-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/heap/gc-idle-time-handler.cc b/src/heap/gc-idle-time-handler.cc index b3350d1..accb87c 100644 --- a/src/heap/gc-idle-time-handler.cc +++ b/src/heap/gc-idle-time-handler.cc @@ -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(); } diff --git a/src/heap/gc-idle-time-handler.h b/src/heap/gc-idle-time-handler.h index 1e87e9d..cae6936 100644 --- a/src/heap/gc-idle-time-handler.h +++ b/src/heap/gc-idle-time-handler.h @@ -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; diff --git a/test/unittests/heap/gc-idle-time-handler-unittest.cc b/test/unittests/heap/gc-idle-time-handler-unittest.cc index 2b476f7..977882a 100644 --- a/test/unittests/heap/gc-idle-time-handler-unittest.cc +++ b/test/unittests/heap/gc-idle-time-handler-unittest.cc @@ -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); -- 2.7.4