 Chromium Code Reviews
 Chromium Code Reviews Issue 254603002:
  Remove lazy sweeping.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 254603002:
  Remove lazy sweeping.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| Index: test/cctest/test-heap.cc | 
| diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc | 
| index 0b0c7041f528512cf2c6976c9bca96e86e2a1e2e..40549660d31bf419f38c369230275d5b958722da 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. | 
| 
Michael Starzinger
2014/04/25 07:57:14
nit: Indentation is off.
 
Hannes Payer (out of office)
2014/04/25 09:40:54
Done.
 | 
| 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,10 @@ 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())); | 
| + if (collector->IsConcurrentSweepingInProgress()) { | 
| 
Michael Starzinger
2014/04/25 07:57:14
Can we preserve a comment along the lines of "Wait
 
Hannes Payer (out of office)
2014/04/25 09:40:54
Done.
 | 
| + collector->WaitUntilSweepingCompleted(); | 
| } | 
| + CHECK_EQ(initial_size, static_cast<int>(CcTest::heap()->SizeOfObjects())); | 
| } | 
| @@ -4199,11 +4202,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(); |