Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(744)

Unified Diff: test/unittests/heap/memory-reducer-unittest.cc

Issue 1261373006: Grow heap slowly after running memory reducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/memory-reducer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/heap/memory-reducer-unittest.cc
diff --git a/test/unittests/heap/memory-reducer-unittest.cc b/test/unittests/heap/memory-reducer-unittest.cc
index ce11c4714035bc7bd33c1b6246b1f58a4c3b7361..3301d13b7efbe07aff6ac940dbf00b02b70e1205 100644
--- a/test/unittests/heap/memory-reducer-unittest.cc
+++ b/test/unittests/heap/memory-reducer-unittest.cc
@@ -239,19 +239,19 @@ TEST(MemoryReducer, FromWaitToDone) {
state1 = MemoryReducer::Step(state0, TimerEventLowAllocationRate(2000));
EXPECT_EQ(MemoryReducer::kDone, state1.action);
EXPECT_EQ(0, state1.next_gc_start_ms);
- EXPECT_EQ(0, state1.started_gcs);
+ EXPECT_EQ(MemoryReducer::kMaxNumberOfGCs, state1.started_gcs);
EXPECT_EQ(state0.last_gc_time_ms, state1.last_gc_time_ms);
state1 = MemoryReducer::Step(state0, TimerEventHighAllocationRate(2000));
EXPECT_EQ(MemoryReducer::kDone, state1.action);
EXPECT_EQ(0, state1.next_gc_start_ms);
- EXPECT_EQ(0, state1.started_gcs);
+ EXPECT_EQ(MemoryReducer::kMaxNumberOfGCs, state1.started_gcs);
EXPECT_EQ(state0.last_gc_time_ms, state1.last_gc_time_ms);
state1 = MemoryReducer::Step(state0, TimerEventPendingGC(2000));
EXPECT_EQ(MemoryReducer::kDone, state1.action);
EXPECT_EQ(0, state1.next_gc_start_ms);
- EXPECT_EQ(0, state1.started_gcs);
+ EXPECT_EQ(MemoryReducer::kMaxNumberOfGCs, state1.started_gcs);
EXPECT_EQ(state0.last_gc_time_ms, state1.last_gc_time_ms);
}
@@ -295,7 +295,7 @@ TEST(MemoryReducer, FromRunToDone) {
state1 = MemoryReducer::Step(state0, MarkCompactEventNoGarbageLeft(2000));
EXPECT_EQ(MemoryReducer::kDone, state1.action);
EXPECT_EQ(0, state1.next_gc_start_ms);
- EXPECT_EQ(0, state1.started_gcs);
+ EXPECT_EQ(MemoryReducer::kMaxNumberOfGCs, state1.started_gcs);
EXPECT_EQ(2000, state1.last_gc_time_ms);
state0.started_gcs = MemoryReducer::kMaxNumberOfGCs;
« no previous file with comments | « src/heap/memory-reducer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698