Index: test/cctest/test-heap.cc |
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
index 0b0c7041f528512cf2c6976c9bca96e86e2a1e2e..92522fd45b11b6f52bd517838418a7c1df82f16c 100644 |
--- a/test/cctest/test-heap.cc |
+++ b/test/cctest/test-heap.cc |
@@ -1606,12 +1606,16 @@ TEST(TestSizeOfObjects) { |
CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags); |
CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags); |
CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags); |
- CHECK(CcTest::heap()->old_pointer_space()->IsLazySweepingComplete()); |
+ MarkCompactCollector* collector = CcTest::heap()->mark_compact_collector(); |
+ if (collector->IsConcurrentSweepingInProgress()) { |
+ collector->WaitUntilSweepingCompleted(); |
+ } |
int initial_size = static_cast<int>(CcTest::heap()->SizeOfObjects()); |
{ |
// Allocate objects on several different old-space pages so that |
- // lazy sweeping kicks in for subsequent GC runs. |
+ // concurrent sweeper threads will be busy sweeping the old space on |
+ // subsequent GC runs. |
AlwaysAllocateScope always_allocate(CcTest::i_isolate()); |
int filler_size = static_cast<int>(FixedArray::SizeFor(8192)); |
for (int i = 1; i <= 100; i++) { |
@@ -1629,11 +1633,11 @@ TEST(TestSizeOfObjects) { |
CHECK_EQ(initial_size, static_cast<int>(CcTest::heap()->SizeOfObjects())); |
- // Advancing the sweeper step-wise should not change the heap size. |
- while (!CcTest::heap()->old_pointer_space()->IsLazySweepingComplete()) { |
- CcTest::heap()->old_pointer_space()->AdvanceSweeper(KB); |
- CHECK_EQ(initial_size, static_cast<int>(CcTest::heap()->SizeOfObjects())); |
+ // Waiting for sweeper threads should not change heap size. |
+ if (collector->IsConcurrentSweepingInProgress()) { |
+ collector->WaitUntilSweepingCompleted(); |
} |
+ CHECK_EQ(initial_size, static_cast<int>(CcTest::heap()->SizeOfObjects())); |
} |
@@ -4199,11 +4203,8 @@ TEST(Regress357137) { |
} |
-TEST(ArrayShiftLazySweeping) { |
+TEST(ArrayShiftSweeping) { |
i::FLAG_expose_gc = true; |
- i::FLAG_parallel_sweeping = false; |
- i::FLAG_concurrent_sweeping = false; |
- i::FLAG_lazy_sweeping = true; |
CcTest::InitializeVM(); |
v8::HandleScope scope(CcTest::isolate()); |
Isolate* isolate = CcTest::i_isolate(); |