From b3887f8a2cdb5e7fc9058fc9685c257c99c102e6 Mon Sep 17 00:00:00 2001 From: Adam Klein Date: Wed, 26 Apr 2017 15:16:41 -0700 Subject: [PATCH] [cctest] Simplify the majority of callers of CcTest::CollectAllGarbage Most callers passed kFinalizeIncrementalMarkingMask, so use that as a default argument (not using default argument syntax to avoid including heap.h in cctest.h). Change-Id: I904f1eb3a0f5fdbe63eab16f6a6f01d04618645d Reviewed-on: https://chromium-review.googlesource.com/488104 Reviewed-by: Ulan Degenbaev Commit-Queue: Adam Klein Cr-Commit-Position: refs/heads/master@{#44950} --- test/cctest/cctest.cc | 4 + test/cctest/cctest.h | 1 + test/cctest/heap/test-array-buffer-tracker.cc | 2 +- test/cctest/heap/test-compaction.cc | 8 +- test/cctest/heap/test-heap.cc | 153 +++++++++--------- test/cctest/heap/test-mark-compact.cc | 8 +- test/cctest/test-accessors.cc | 2 +- test/cctest/test-api-interceptors.cc | 2 +- test/cctest/test-api.cc | 150 +++++++++-------- test/cctest/test-cpu-profiler.cc | 2 +- test/cctest/test-debug.cc | 8 +- test/cctest/test-feedback-vector.cc | 6 +- test/cctest/test-heap-profiler.cc | 10 +- test/cctest/test-identity-map.cc | 2 +- test/cctest/test-mementos.cc | 2 +- test/cctest/test-symbols.cc | 2 +- test/cctest/test-unboxed-doubles.cc | 6 +- test/cctest/test-weakmaps.cc | 10 +- test/cctest/test-weaksets.cc | 8 +- 19 files changed, 194 insertions(+), 192 deletions(-) diff --git a/test/cctest/cctest.cc b/test/cctest/cctest.cc index 08f52ea849..531cd4e239 100644 --- a/test/cctest/cctest.cc +++ b/test/cctest/cctest.cc @@ -113,6 +113,10 @@ void CcTest::CollectGarbage(i::AllocationSpace space) { heap()->CollectGarbage(space, i::GarbageCollectionReason::kTesting); } +void CcTest::CollectAllGarbage() { + CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); +} + void CcTest::CollectAllGarbage(int flags) { heap()->CollectAllGarbage(flags, i::GarbageCollectionReason::kTesting); } diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h index 7ff55446b1..8ef5d23418 100644 --- a/test/cctest/cctest.h +++ b/test/cctest/cctest.h @@ -126,6 +126,7 @@ class CcTest { static i::Heap* heap(); static void CollectGarbage(i::AllocationSpace space); + static void CollectAllGarbage(); static void CollectAllGarbage(int flags); static void CollectAllAvailableGarbage(); diff --git a/test/cctest/heap/test-array-buffer-tracker.cc b/test/cctest/heap/test-array-buffer-tracker.cc index 11bc4c0727..4c668f636d 100644 --- a/test/cctest/heap/test-array-buffer-tracker.cc +++ b/test/cctest/heap/test-array-buffer-tracker.cc @@ -132,7 +132,7 @@ TEST(ArrayBuffer_Compaction) { heap::ForceEvacuationCandidate(page_before_gc); CHECK(IsTracked(*buf1)); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); Page* page_after_gc = Page::FromAddress(buf1->address()); CHECK(IsTracked(*buf1)); diff --git a/test/cctest/heap/test-compaction.cc b/test/cctest/heap/test-compaction.cc index b7780fa409..64e7a09255 100644 --- a/test/cctest/heap/test-compaction.cc +++ b/test/cctest/heap/test-compaction.cc @@ -68,7 +68,7 @@ HEAP_TEST(CompactionFullAbortedPage) { CheckAllObjectsOnPage(compaction_page_handles, to_be_aborted_page); heap->set_force_oom(true); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); heap->mark_compact_collector()->EnsureSweepingCompleted(); // Check that all handles still point to the same page, i.e., compaction @@ -128,7 +128,7 @@ HEAP_TEST(CompactionPartiallyAbortedPage) { Page::FromAddress(page_to_fill_handles.front()->address()); heap->set_force_oom(true); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); heap->mark_compact_collector()->EnsureSweepingCompleted(); bool migration_aborted = false; @@ -210,7 +210,7 @@ HEAP_TEST(CompactionPartiallyAbortedPageIntraAbortedPointers) { Page::FromAddress(page_to_fill_handles.front()->address()); heap->set_force_oom(true); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); heap->mark_compact_collector()->EnsureSweepingCompleted(); // The following check makes sure that we compacted "some" objects, while @@ -303,7 +303,7 @@ HEAP_TEST(CompactionPartiallyAbortedPageWithStoreBufferEntries) { Page::FromAddress(page_to_fill_handles.front()->address()); heap->set_force_oom(true); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); heap->mark_compact_collector()->EnsureSweepingCompleted(); // The following check makes sure that we compacted "some" objects, while diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc index 9159d5cfaa..25e1a66470 100644 --- a/test/cctest/heap/test-heap.cc +++ b/test/cctest/heap/test-heap.cc @@ -565,7 +565,7 @@ TEST(WeakGlobalHandlesMark) { CHECK(!GlobalHandles::IsNearDeath(h2.location())); // Incremental marking potentially marked handles before they turned weak. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK((*h1)->IsString()); @@ -653,7 +653,7 @@ TEST(BytecodeArray) { // evacuation candidate. Page* evac_page = Page::FromAddress(constant_pool->address()); heap::ForceEvacuationCandidate(evac_page); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // BytecodeArray should survive. CHECK_EQ(array->length(), kRawBytesSize); @@ -1184,12 +1184,12 @@ TEST(TestCodeFlushingPreAged) { CHECK(function->shared()->is_compiled()); // The code has been run so will survive at least one GC. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(function->shared()->is_compiled()); // The code was only run once, so it should be pre-aged and collected on the // next GC. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(!function->shared()->is_compiled() || function->IsOptimized() || function->IsInterpreted()); @@ -1200,14 +1200,14 @@ TEST(TestCodeFlushingPreAged) { } // The code will survive at least two GC now that it is young again. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); CHECK(function->shared()->is_compiled()); // Simulate several GCs that use full marking. const int kAgingThreshold = 6; for (int i = 0; i < kAgingThreshold; i++) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } // foo should no longer be in the compilation cache @@ -1253,15 +1253,15 @@ TEST(TestCodeFlushingIncremental) { CHECK(function->shared()->is_compiled()); // The code will survive at least two GCs. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); CHECK(function->shared()->is_compiled()); // Simulate several GCs that use incremental marking. const int kAgingThreshold = 6; for (int i = 0; i < kAgingThreshold; i++) { heap::SimulateIncrementalMarking(CcTest::heap()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } CHECK(!function->shared()->is_compiled() || function->IsOptimized() || function->IsInterpreted()); @@ -1279,7 +1279,7 @@ TEST(TestCodeFlushingIncremental) { heap::SimulateIncrementalMarking(CcTest::heap()); if (!function->next_function_link()->IsUndefined(CcTest::i_isolate())) break; - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } // Force optimization while incremental marking is active and while @@ -1289,7 +1289,7 @@ TEST(TestCodeFlushingIncremental) { } // Simulate one final GC to make sure the candidate queue is sane. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(function->shared()->is_compiled() || !function->IsOptimized()); CHECK(function->is_compiled() || !function->IsOptimized()); } @@ -1319,7 +1319,7 @@ TEST(TestCodeFlushingIncrementalScavenge) { Handle bar_name = factory->InternalizeUtf8String("bar"); // Perfrom one initial GC to enable code flushing. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // This compile will add the code to the compilation cache. { v8::HandleScope scope(CcTest::isolate()); @@ -1359,7 +1359,7 @@ TEST(TestCodeFlushingIncrementalScavenge) { CcTest::CollectGarbage(NEW_SPACE); // Simulate one final GC to make sure the candidate queue is sane. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(!function->shared()->is_compiled() || function->IsOptimized() || function->IsInterpreted()); CHECK(!function->is_compiled() || function->IsOptimized() || @@ -1399,8 +1399,8 @@ TEST(TestCodeFlushingIncrementalAbort) { CHECK(function->shared()->is_compiled()); // The code will survive at least two GCs. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); CHECK(function->shared()->is_compiled()); // Bump the code age so that flushing is triggered. @@ -1429,7 +1429,7 @@ TEST(TestCodeFlushingIncrementalAbort) { } // Simulate one final GC to make sure the candidate queue is sane. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(function->shared()->is_compiled() || !function->IsOptimized()); CHECK(function->is_compiled() || !function->IsOptimized()); } @@ -1515,7 +1515,7 @@ TEST(CompilationCacheCachingBehavior) { // (Unless --optimize-for-size, in which case it might get collected // immediately.) if (!FLAG_optimize_for_size) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); pair = compilation_cache->LookupScript(source, Handle(), 0, 0, v8::ScriptOriginOptions(true, false), native_context, language_mode); @@ -1531,7 +1531,7 @@ TEST(CompilationCacheCachingBehavior) { } } - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Ensure code aging cleared the entry from the cache. pair = compilation_cache->LookupScript(source, Handle(), 0, 0, v8::ScriptOriginOptions(true, false), @@ -1606,7 +1606,7 @@ TEST(TestInternalWeakLists) { // Collect garbage that might have been created by one of the // installed extensions. isolate->compilation_cache()->Clear(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(i + 1, CountNativeContexts()); @@ -1638,7 +1638,7 @@ TEST(TestInternalWeakLists) { // Mark compact handles the weak references. isolate->compilation_cache()->Clear(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(4, CountOptimizedUserFunctions(ctx[i])); // Get rid of f3 and f5 in the same way. @@ -1647,14 +1647,14 @@ TEST(TestInternalWeakLists) { CcTest::CollectGarbage(NEW_SPACE); CHECK_EQ(4, CountOptimizedUserFunctions(ctx[i])); } - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(3, CountOptimizedUserFunctions(ctx[i])); CompileRun("f5=null"); for (int j = 0; j < 10; j++) { CcTest::CollectGarbage(NEW_SPACE); CHECK_EQ(3, CountOptimizedUserFunctions(ctx[i])); } - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(2, CountOptimizedUserFunctions(ctx[i])); ctx[i]->Exit(); @@ -1662,7 +1662,7 @@ TEST(TestInternalWeakLists) { // Force compilation cache cleanup. CcTest::heap()->NotifyContextDisposed(true); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Dispose the native contexts one by one. for (int i = 0; i < kNumTestContexts; i++) { @@ -1678,7 +1678,7 @@ TEST(TestInternalWeakLists) { } // Mark compact handles the weak references. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(kNumTestContexts - i - 1, CountNativeContexts()); } @@ -1694,8 +1694,7 @@ static int CountNativeContextsWithGC(Isolate* isolate, int n) { Handle object(heap->native_contexts_list(), isolate); while (!object->IsUndefined(isolate)) { count++; - if (count == n) - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + if (count == n) CcTest::CollectAllGarbage(); object = Handle(Context::cast(*object)->next_context_link(), isolate); } @@ -1810,11 +1809,11 @@ TEST(TestSizeOfRegExpCode) { int initial_size = static_cast(CcTest::heap()->SizeOfObjects()); CompileRun("'foo'.match(reg_exp_source);"); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); int size_with_regexp = static_cast(CcTest::heap()->SizeOfObjects()); CompileRun("'foo'.match(half_size_reg_exp);"); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); int size_with_optimized_regexp = static_cast(CcTest::heap()->SizeOfObjects()); @@ -1861,7 +1860,7 @@ HEAP_TEST(TestSizeOfObjects) { // The heap size should go back to initial size after a full GC, even // though sweeping didn't finish yet. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Normally sweeping would not be complete here, but no guarantees. CHECK_EQ(initial_size, static_cast(heap->SizeOfObjects())); // Waiting for sweeper threads should not change heap size. @@ -2485,7 +2484,7 @@ TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) { // The following calls will increment CcTest::heap()->global_ic_age(). CcTest::isolate()->ContextDisposedNotification(); heap::SimulateIncrementalMarking(CcTest::heap()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(CcTest::heap()->global_ic_age(), f->shared()->ic_age()); CHECK_EQ(0, f->shared()->opt_count()); @@ -2527,7 +2526,7 @@ TEST(ResetSharedFunctionInfoCountersDuringMarkSweep) { // The following two calls will increment CcTest::heap()->global_ic_age(). CcTest::isolate()->ContextDisposedNotification(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(CcTest::heap()->global_ic_age(), f->shared()->ic_age()); CHECK_EQ(0, f->shared()->opt_count()); @@ -3100,7 +3099,7 @@ TEST(Regress1465) { CHECK_EQ(transitions_count, transitions_before); heap::SimulateIncrementalMarking(CcTest::heap()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Count number of live transitions after marking. Note that one transition // is left, because 'o' still holds an instance of one transition target. @@ -3284,7 +3283,7 @@ TEST(Regress2143a) { CcTest::heap()->AgeInlineCaches(); // Explicitly request GC to perform final marking step and sweeping. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); Handle root = v8::Utils::OpenHandle(*v8::Local::Cast( CcTest::global() @@ -3327,7 +3326,7 @@ TEST(Regress2143b) { CcTest::heap()->AgeInlineCaches(); // Explicitly request GC to perform final marking step and sweeping. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); Handle root = v8::Utils::OpenHandle(*v8::Local::Cast( CcTest::global() @@ -3378,14 +3377,14 @@ TEST(ReleaseOverReservedPages) { // Triggering one GC will cause a lot of garbage to be discovered but // even spread across all allocated pages. - CcTest::CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_GE(overall_page_count, old_space->CountTotalPages()); // Triggering subsequent GCs should cause at least half of the pages // to be released to the OS after at most two cycles. - CcTest::CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_GE(overall_page_count, old_space->CountTotalPages()); - CcTest::CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_GE(overall_page_count, old_space->CountTotalPages() * 2); // Triggering a last-resort GC should cause all pages to be released to the @@ -3481,7 +3480,7 @@ TEST(IncrementalMarkingPreservesMonomorphicCallIC) { CHECK(feedback_vector->Get(feedback_helper.slot(slot2))->IsWeakCell()); heap::SimulateIncrementalMarking(CcTest::heap()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(!WeakCell::cast(feedback_vector->Get(feedback_helper.slot(slot1))) ->cleared()); @@ -3538,7 +3537,7 @@ TEST(IncrementalMarkingPreservesMonomorphicConstructor) { CHECK(vector->Get(FeedbackSlot(0))->IsWeakCell()); heap::SimulateIncrementalMarking(CcTest::heap()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(vector->Get(FeedbackSlot(0))->IsWeakCell()); } @@ -3560,7 +3559,7 @@ TEST(IncrementalMarkingPreservesMonomorphicIC) { CheckVectorIC(f, 0, MONOMORPHIC); heap::SimulateIncrementalMarking(CcTest::heap()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CheckVectorIC(f, 0, MONOMORPHIC); } @@ -3598,7 +3597,7 @@ TEST(IncrementalMarkingPreservesPolymorphicIC) { // Fire context dispose notification. heap::SimulateIncrementalMarking(CcTest::heap()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CheckVectorIC(f, 0, POLYMORPHIC); } @@ -3637,7 +3636,7 @@ TEST(ContextDisposeDoesntClearPolymorphicIC) { // Fire context dispose notification. CcTest::isolate()->ContextDisposedNotification(); heap::SimulateIncrementalMarking(CcTest::heap()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CheckVectorIC(f, 0, POLYMORPHIC); } @@ -3769,7 +3768,7 @@ TEST(Regress159140) { HandleScope scope(isolate); // Perform one initial GC to enable code flushing. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Prepare several closures that are all eligible for code flushing // because all reachable ones are not optimized. Make sure that the @@ -3813,7 +3812,7 @@ TEST(Regress159140) { // finish the GC to complete code flushing. heap::SimulateIncrementalMarking(heap); CompileRun("%OptimizeFunctionOnNextCall(g); g(3);"); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Unoptimized code is missing and the deoptimizer will go ballistic. CompileRun("g('bozo');"); @@ -3829,7 +3828,7 @@ TEST(Regress165495) { HandleScope scope(isolate); // Perform one initial GC to enable code flushing. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Prepare an optimized closure that the optimized code map will get // populated. Then age the unoptimized code to trigger code flushing @@ -3859,7 +3858,7 @@ TEST(Regress165495) { // Simulate incremental marking so that unoptimized code is flushed // even though it still is cached in the optimized code map. heap::SimulateIncrementalMarking(heap); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Make a new closure that will get code installed from the code map. // Unoptimized code is missing and the deoptimizer will go ballistic. @@ -3881,7 +3880,7 @@ TEST(Regress169209) { HandleScope scope(isolate); // Perform one initial GC to enable code flushing. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Prepare a shared function info eligible for code flushing for which // the unoptimized code will be replaced during optimization. @@ -3939,7 +3938,7 @@ TEST(Regress169209) { "g(false);"); // Finish garbage collection cycle. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(shared1->code()->gc_metadata() == NULL); } @@ -4081,7 +4080,7 @@ TEST(Regress513496) { HandleScope scope(isolate); // Perfrom one initial GC to enable code flushing. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Prepare an optimized closure with containing an inlined function. Then age // the inlined unoptimized code to trigger code flushing but make sure the @@ -4125,7 +4124,7 @@ TEST(Regress513496) { // Finish a full GC cycle so that the unoptimized code of 'g' is flushed even // though the optimized code for 'f' is reachable via the optimized code map. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Make a new closure that will get code installed from the code map. // Unoptimized code is missing and the deoptimizer will go ballistic. @@ -4169,7 +4168,7 @@ TEST(LargeObjectSlotRecording) { } // Move the evaucation candidate object. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Verify that the pointers in the large object got updated. for (int i = 0; i < size; i += kStep) { @@ -4328,7 +4327,7 @@ TEST(EnsureAllocationSiteDependentCodesProcessed) { // Now make sure that a gc should get rid of the function, even though we // still have the allocation site alive. for (int i = 0; i < 4; i++) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } // The site still exists because of our global handle, but the code is no @@ -4375,7 +4374,7 @@ TEST(CellsInOptimizedCodeAreWeak) { // Now make sure that a gc should get rid of the function for (int i = 0; i < 4; i++) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } CHECK(code->marked_for_deoptimization()); @@ -4417,7 +4416,7 @@ TEST(ObjectsInOptimizedCodeAreWeak) { // Now make sure that a gc should get rid of the function for (int i = 0; i < 4; i++) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } CHECK(code->marked_for_deoptimization()); @@ -4478,7 +4477,7 @@ TEST(NewSpaceObjectsInOptimizedCode) { // Now make sure that a gc should get rid of the function for (int i = 0; i < 4; i++) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } CHECK(code->marked_for_deoptimization()); @@ -4500,7 +4499,7 @@ TEST(NoWeakHashTableLeakWithIncrementalMarking) { // Get a clean slate regarding optimized functions on the heap. i::Deoptimizer::DeoptimizeAll(isolate); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); if (!isolate->use_crankshaft()) return; HandleScope outer_scope(heap->isolate()); @@ -4681,7 +4680,7 @@ TEST(WeakFunctionInConstructor) { } weak_ic_cleared = false; garbage.SetWeak(&garbage, &ClearWeakIC, v8::WeakCallbackType::kParameter); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(weak_ic_cleared); // We've determined the constructor in createObj has had it's weak cell @@ -4693,7 +4692,7 @@ TEST(WeakFunctionInConstructor) { Object* slot_value = feedback_vector->Get(FeedbackSlot(0)); CHECK(slot_value->IsWeakCell()); if (WeakCell::cast(slot_value)->cleared()) break; - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } Object* slot_value = feedback_vector->Get(FeedbackSlot(0)); @@ -4723,7 +4722,7 @@ void CheckWeakness(const char* source) { } weak_ic_cleared = false; garbage.SetWeak(&garbage, &ClearWeakIC, v8::WeakCallbackType::kParameter); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(weak_ic_cleared); } @@ -4930,7 +4929,7 @@ TEST(MonomorphicStaysMonomorphicAfterGC) { v8::HandleScope scope(CcTest::isolate()); CompileRun("(testIC())"); } - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CheckIC(loadIC, Code::LOAD_IC, 0, MONOMORPHIC); { v8::HandleScope scope(CcTest::isolate()); @@ -4965,7 +4964,7 @@ TEST(PolymorphicStaysPolymorphicAfterGC) { v8::HandleScope scope(CcTest::isolate()); CompileRun("(testIC())"); } - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CheckIC(loadIC, Code::LOAD_IC, 0, POLYMORPHIC); { v8::HandleScope scope(CcTest::isolate()); @@ -5039,8 +5038,8 @@ TEST(WeakCellsWithIncrementalMarking) { } // Call collect all twice to make sure that we also cleared // weak cells that were allocated on black pages. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); CHECK_EQ(*survivor, weak_cells[0]->value()); for (int i = 1; i < N; i++) { CHECK(weak_cells[i]->cleared()); @@ -5087,7 +5086,7 @@ TEST(AddInstructionChangesNewSpacePromotion) { heap->DisableInlineAllocation(); heap->set_allocation_timeout(1); g->Call(env.local(), global, 1, args1).ToLocalChecked(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } @@ -5420,14 +5419,14 @@ TEST(Regress3877) { "a.x = new cls();" "cls.prototype = null;"); for (int i = 0; i < 4; i++) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } // The map of a.x keeps prototype alive CHECK(!weak_prototype->cleared()); // Change the map of a.x and make the previous map garbage collectable. CompileRun("a.x.__proto__ = {};"); for (int i = 0; i < 4; i++) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } CHECK(weak_prototype->cleared()); } @@ -5872,7 +5871,7 @@ TEST(ScriptIterator) { Heap* heap = CcTest::heap(); LocalContext context; - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); int script_count = 0; { @@ -5898,8 +5897,8 @@ TEST(SharedFunctionInfoIterator) { Heap* heap = CcTest::heap(); LocalContext context; - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); int sfi_count = 0; { @@ -6156,7 +6155,7 @@ TEST(Regress615489) { v8::HandleScope scope(CcTest::isolate()); Heap* heap = CcTest::heap(); Isolate* isolate = heap->isolate(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); i::MarkCompactCollector* collector = heap->mark_compact_collector(); i::IncrementalMarking* marking = heap->incremental_marking(); @@ -6184,7 +6183,7 @@ TEST(Regress615489) { } CHECK(marking->IsComplete()); intptr_t size_before = heap->SizeOfObjects(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); intptr_t size_after = heap->SizeOfObjects(); // Live size does not increase after garbage collection. CHECK_LE(size_after, size_before); @@ -6257,7 +6256,7 @@ TEST(LeftTrimFixedArrayInBlackArea) { v8::HandleScope scope(CcTest::isolate()); Heap* heap = CcTest::heap(); Isolate* isolate = heap->isolate(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); i::MarkCompactCollector* collector = heap->mark_compact_collector(); i::IncrementalMarking* marking = heap->incremental_marking(); @@ -6296,7 +6295,7 @@ TEST(ContinuousLeftTrimFixedArrayInBlackArea) { v8::HandleScope scope(CcTest::isolate()); Heap* heap = CcTest::heap(); Isolate* isolate = heap->isolate(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); i::MarkCompactCollector* collector = heap->mark_compact_collector(); i::IncrementalMarking* marking = heap->incremental_marking(); @@ -6362,7 +6361,7 @@ TEST(ContinuousRightTrimFixedArrayInBlackArea) { v8::HandleScope scope(CcTest::isolate()); Heap* heap = CcTest::heap(); Isolate* isolate = heap->isolate(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); i::MarkCompactCollector* collector = heap->mark_compact_collector(); i::IncrementalMarking* marking = heap->incremental_marking(); @@ -6450,7 +6449,7 @@ TEST(UncommitUnusedLargeObjectMemory) { array->Shrink(1); CHECK(array->Size() < size_before); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(chunk->CommittedPhysicalMemory() < committed_memory_before); size_t shrinked_size = RoundUp((array->address() - chunk->address()) + array->Size(), @@ -6531,7 +6530,7 @@ HEAP_TEST(Regress670675) { Heap* heap = CcTest::heap(); Isolate* isolate = heap->isolate(); i::MarkCompactCollector* collector = heap->mark_compact_collector(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); if (collector->sweeping_in_progress()) { collector->EnsureSweepingCompleted(); diff --git a/test/cctest/heap/test-mark-compact.cc b/test/cctest/heap/test-mark-compact.cc index f77586e878..7242e1e7c4 100644 --- a/test/cctest/heap/test-mark-compact.cc +++ b/test/cctest/heap/test-mark-compact.cc @@ -90,8 +90,8 @@ TEST(Promotion) { // Array should be in the new space. CHECK(heap->InSpace(*array, NEW_SPACE)); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); CHECK(heap->InSpace(*array, OLD_SPACE)); } } @@ -115,8 +115,8 @@ HEAP_TEST(NoPromotion) { heap->set_force_oom(true); // Array should be in the new space. CHECK(heap->InSpace(*array, NEW_SPACE)); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); CHECK(heap->InSpace(*array, NEW_SPACE)); } } diff --git a/test/cctest/test-accessors.cc b/test/cctest/test-accessors.cc index c38d77bd21..070a1a0817 100644 --- a/test/cctest/test-accessors.cc +++ b/test/cctest/test-accessors.cc @@ -319,7 +319,7 @@ static void CheckAccessorArgsCorrect( CHECK(info.Data() ->Equals(info.GetIsolate()->GetCurrentContext(), v8_str("data")) .FromJust()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(info.GetIsolate() == CcTest::isolate()); CHECK(info.This() == info.Holder()); CHECK(info.Data() diff --git a/test/cctest/test-api-interceptors.cc b/test/cctest/test-api-interceptors.cc index 9680b4241b..dd138c1b3f 100644 --- a/test/cctest/test-api-interceptors.cc +++ b/test/cctest/test-api-interceptors.cc @@ -378,7 +378,7 @@ void InterceptorHasOwnPropertyGetter( void InterceptorHasOwnPropertyGetterGC( Local name, const v8::PropertyCallbackInfo& info) { ApiTestFuzzer::Fuzz(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } int query_counter_int = 0; diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc index 30e60c344d..64c9e8db5a 100644 --- a/test/cctest/test-api.cc +++ b/test/cctest/test-api.cc @@ -456,7 +456,7 @@ THREADED_TEST(ScriptUsingStringResource) { CHECK_EQ(static_cast(resource), source->GetExternalStringResourceBase(&encoding)); CHECK_EQ(String::TWO_BYTE_ENCODING, encoding); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(0, dispose_count); } CcTest::i_isolate()->compilation_cache()->Clear(); @@ -487,7 +487,7 @@ THREADED_TEST(ScriptUsingOneByteStringResource) { Local value = script->Run(env.local()).ToLocalChecked(); CHECK(value->IsNumber()); CHECK_EQ(7, value->Int32Value(env.local()).FromJust()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(0, dispose_count); } CcTest::i_isolate()->compilation_cache()->Clear(); @@ -521,11 +521,11 @@ THREADED_TEST(ScriptMakingExternalString) { Local value = script->Run(env.local()).ToLocalChecked(); CHECK(value->IsNumber()); CHECK_EQ(7, value->Int32Value(env.local()).FromJust()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(0, dispose_count); } CcTest::i_isolate()->compilation_cache()->Clear(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(1, dispose_count); } @@ -547,11 +547,11 @@ THREADED_TEST(ScriptMakingExternalOneByteString) { Local value = script->Run(env.local()).ToLocalChecked(); CHECK(value->IsNumber()); CHECK_EQ(7, value->Int32Value(env.local()).FromJust()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(0, dispose_count); } CcTest::i_isolate()->compilation_cache()->Clear(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(1, dispose_count); } @@ -629,7 +629,7 @@ TEST(MakingExternalUnalignedOneByteString) { CHECK(success); // Trigger GCs and force evacuation. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CcTest::CollectAllGarbage(i::Heap::kReduceMemoryFootprintMask); } @@ -651,8 +651,8 @@ THREADED_TEST(UsingExternalString) { factory->InternalizeString(istring); CHECK(isymbol->IsInternalizedString()); } - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); } @@ -674,8 +674,8 @@ THREADED_TEST(UsingExternalOneByteString) { factory->InternalizeString(istring); CHECK(isymbol->IsInternalizedString()); } - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); } @@ -900,8 +900,8 @@ THREADED_TEST(StringConcat) { CHECK_EQ(68, value->Int32Value(env.local()).FromJust()); } CcTest::i_isolate()->compilation_cache()->Clear(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); } @@ -2670,7 +2670,7 @@ static void CheckAlignedPointerInInternalField(Local obj, void* value) { CHECK_EQ(0, static_cast(reinterpret_cast(value) & 0x1)); obj->SetAlignedPointerInInternalField(0, value); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(value, obj->GetAlignedPointerFromInternalField(0)); } @@ -2725,14 +2725,14 @@ THREADED_TEST(SetAlignedPointerInInternalFields) { void* values[] = {heap_allocated_1, heap_allocated_2}; obj->SetAlignedPointerInInternalFields(2, indices, values); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(heap_allocated_1, obj->GetAlignedPointerFromInternalField(0)); CHECK_EQ(heap_allocated_2, obj->GetAlignedPointerFromInternalField(1)); indices[0] = 1; indices[1] = 0; obj->SetAlignedPointerInInternalFields(2, indices, values); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(heap_allocated_2, obj->GetAlignedPointerFromInternalField(0)); CHECK_EQ(heap_allocated_1, obj->GetAlignedPointerFromInternalField(1)); @@ -2744,7 +2744,7 @@ static void CheckAlignedPointerInEmbedderData(LocalContext* env, int index, void* value) { CHECK_EQ(0, static_cast(reinterpret_cast(value) & 0x1)); (*env)->SetAlignedPointerInEmbedderData(index, value); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(value, (*env)->GetAlignedPointerFromEmbedderData(index)); } @@ -2774,7 +2774,7 @@ THREADED_TEST(EmbedderDataAlignedPointers) { for (int i = 0; i < 100; i++) { env->SetAlignedPointerInEmbedderData(i, AlignedTestPointer(i)); } - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); for (int i = 0; i < 100; i++) { CHECK_EQ(AlignedTestPointer(i), env->GetAlignedPointerFromEmbedderData(i)); } @@ -2806,7 +2806,7 @@ THREADED_TEST(IdentityHash) { // Ensure that the test starts with an fresh heap to test whether the hash // code is based on the address. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); Local obj = v8::Object::New(isolate); int hash = obj->GetIdentityHash(); int hash1 = obj->GetIdentityHash(); @@ -2816,7 +2816,7 @@ THREADED_TEST(IdentityHash) { // objects should not be assigned the same hash code. If the test below fails // the random number generator should be evaluated. CHECK_NE(hash, hash2); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); int hash3 = v8::Object::New(isolate)->GetIdentityHash(); // Make sure that the identity hash is not based on the initial address of // the object alone. If the test below fails the random number generator @@ -2892,7 +2892,7 @@ TEST(SymbolIdentityHash) { int hash = symbol->GetIdentityHash(); int hash1 = symbol->GetIdentityHash(); CHECK_EQ(hash, hash1); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); int hash3 = symbol->GetIdentityHash(); CHECK_EQ(hash, hash3); } @@ -2903,7 +2903,7 @@ TEST(SymbolIdentityHash) { int hash = js_symbol->GetIdentityHash(); int hash1 = js_symbol->GetIdentityHash(); CHECK_EQ(hash, hash1); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); int hash3 = js_symbol->GetIdentityHash(); CHECK_EQ(hash, hash3); } @@ -2919,7 +2919,7 @@ TEST(StringIdentityHash) { int hash = str->GetIdentityHash(); int hash1 = str->GetIdentityHash(); CHECK_EQ(hash, hash1); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); int hash3 = str->GetIdentityHash(); CHECK_EQ(hash, hash3); @@ -2940,7 +2940,7 @@ THREADED_TEST(SymbolProperties) { v8::Local sym3 = v8::Symbol::New(isolate, v8_str("sym3")); v8::Local sym4 = v8::Symbol::New(isolate, v8_str("native")); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Check basic symbol functionality. CHECK(sym1->IsSymbol()); @@ -3009,7 +3009,7 @@ THREADED_TEST(SymbolProperties) { CHECK_EQ(num_props + 1, obj->GetPropertyNames(env.local()).ToLocalChecked()->Length()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(obj->SetAccessor(env.local(), sym3, SymbolAccessorGetter, SymbolAccessorSetter) @@ -3136,7 +3136,7 @@ THREADED_TEST(PrivatePropertiesOnProxies) { v8::Local priv2 = v8::Private::New(isolate, v8_str("my-private")); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(priv2->Name() ->Equals(env.local(), @@ -3178,7 +3178,7 @@ THREADED_TEST(PrivatePropertiesOnProxies) { CHECK_EQ(num_props + 1, proxy->GetPropertyNames(env.local()).ToLocalChecked()->Length()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Add another property and delete it afterwards to force the object in // slow case. @@ -3230,7 +3230,7 @@ THREADED_TEST(PrivateProperties) { v8::Local priv2 = v8::Private::New(isolate, v8_str("my-private")); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(priv2->Name() ->Equals(env.local(), @@ -3272,7 +3272,7 @@ THREADED_TEST(PrivateProperties) { CHECK_EQ(num_props + 1, obj->GetPropertyNames(env.local()).ToLocalChecked()->Length()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Add another property and delete it afterwards to force the object in // slow case. @@ -3444,7 +3444,7 @@ THREADED_TEST(ArrayBuffer_ApiInternalToExternal) { CheckInternalFieldsAreZero(ab); CHECK_EQ(1024, static_cast(ab->ByteLength())); CHECK(!ab->IsExternal()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); ScopedArrayBufferContents ab_contents(ab->Externalize()); CHECK(ab->IsExternal()); @@ -3720,7 +3720,7 @@ THREADED_TEST(SharedArrayBuffer_ApiInternalToExternal) { CheckInternalFieldsAreZero(ab); CHECK_EQ(1024, static_cast(ab->ByteLength())); CHECK(!ab->IsExternal()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); ScopedSharedArrayBufferContents ab_contents(ab->Externalize()); CHECK(ab->IsExternal()); @@ -3837,7 +3837,7 @@ THREADED_TEST(HiddenProperties) { v8::Local empty = v8_str(""); v8::Local prop_name = v8_str("prop_name"); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Make sure delete of a non-existent hidden value works obj->DeletePrivate(env.local(), key).FromJust(); @@ -3855,7 +3855,7 @@ THREADED_TEST(HiddenProperties) { ->Int32Value(env.local()) .FromJust()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Make sure we do not find the hidden property. CHECK(!obj->Has(env.local(), empty).FromJust()); @@ -3879,7 +3879,7 @@ THREADED_TEST(HiddenProperties) { ->Int32Value(env.local()) .FromJust()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Add another property and delete it afterwards to force the object in // slow case. @@ -3903,7 +3903,7 @@ THREADED_TEST(HiddenProperties) { ->Int32Value(env.local()) .FromJust()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK(obj->SetPrivate(env.local(), key, v8::Integer::New(isolate, 2002)) .FromJust()); @@ -4194,7 +4194,7 @@ void SecondPassCallback(const v8::WeakCallbackInfo& data) { if (!trigger_gc) return; auto data_2 = new TwoPassCallbackData(data.GetIsolate(), instance_counter); data_2->SetWeak(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } @@ -4215,7 +4215,7 @@ TEST(TwoPassPhantomCallbacks) { data->SetWeak(); } CHECK_EQ(static_cast(kLength), instance_counter); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); EmptyMessageQueues(isolate); CHECK_EQ(0, instance_counter); } @@ -4234,7 +4234,7 @@ TEST(TwoPassPhantomCallbacksNestedGc) { array[10]->MarkTriggerGc(); array[15]->MarkTriggerGc(); CHECK_EQ(static_cast(kLength), instance_counter); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); EmptyMessageQueues(isolate); CHECK_EQ(0, instance_counter); } @@ -4799,7 +4799,7 @@ TEST(NativeWeakMap) { CHECK(value->Equals(env.local(), weak_map->Get(obj2)).FromJust()); CHECK(value->Equals(env.local(), weak_map->Get(sym1)).FromJust()); } - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); { HandleScope scope(isolate); CHECK(value->Equals(env.local(), weak_map->Get(local1)).FromJust()); @@ -4821,7 +4821,7 @@ TEST(NativeWeakMap) { s1.handle.SetWeak(&s1, &WeakPointerCallback, v8::WeakCallbackType::kParameter); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(3, counter.NumberOfWeakCalls()); CHECK(o1.handle.IsEmpty()); @@ -7554,7 +7554,7 @@ static void IndependentWeakHandle(bool global_gc, bool interlinked) { b->Set(context, v8_str("x"), a).FromJust(); } if (global_gc) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } else { CcTest::CollectGarbage(i::NEW_SPACE); } @@ -7580,7 +7580,7 @@ static void IndependentWeakHandle(bool global_gc, bool interlinked) { object_b.handle.MarkIndependent(); CHECK(object_b.handle.IsIndependent()); if (global_gc) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } else { CcTest::CollectGarbage(i::NEW_SPACE); } @@ -7678,7 +7678,7 @@ void InternalFieldCallback(bool global_gc) { } } if (global_gc) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } else { CcTest::CollectGarbage(i::NEW_SPACE); } @@ -7758,9 +7758,7 @@ THREADED_HEAP_TEST(ResetWeakHandle) { static void InvokeScavenge() { CcTest::CollectGarbage(i::NEW_SPACE); } -static void InvokeMarkSweep() { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); -} +static void InvokeMarkSweep() { CcTest::CollectAllGarbage(); } static void ForceScavenge2( const v8::WeakCallbackInfo& data) { @@ -7836,7 +7834,7 @@ static void ArgumentsTestCallback( CHECK(v8::Integer::New(isolate, 3)->Equals(context, args[2]).FromJust()); CHECK(v8::Undefined(isolate)->Equals(context, args[3]).FromJust()); v8::HandleScope scope(args.GetIsolate()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } @@ -9166,7 +9164,7 @@ static bool security_check_with_gc_called; static bool SecurityTestCallbackWithGC(Local accessing_context, Local accessed_object, Local data) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); security_check_with_gc_called = true; return true; } @@ -11940,7 +11938,7 @@ static void InterceptorCallICFastApi( reinterpret_cast(v8::External::Cast(*info.Data())->Value()); ++(*call_count); if ((*call_count) % 20 == 0) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } } @@ -11997,7 +11995,7 @@ static void GenerateSomeGarbage() { void DirectApiCallback(const v8::FunctionCallbackInfo& args) { static int count = 0; if (count++ % 3 == 0) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // This should move the stub GenerateSomeGarbage(); // This should ensure the old stub memory is flushed } @@ -12067,7 +12065,7 @@ static int p_getter_count_3; static Local DoDirectGetter() { if (++p_getter_count_3 % 3 == 0) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); GenerateSomeGarbage(); } return v8_str("Direct Getter Result"); @@ -13776,7 +13774,7 @@ static void CheckSurvivingGlobalObjectsCount(int expected) { // the first garbage collection but some of the maps have already // been marked at that point. Therefore some of the maps are not // collected until the second garbage collection. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CcTest::CollectAllGarbage(i::Heap::kMakeHeapIterableMask); int count = GetGlobalObjectsCount(); CHECK_EQ(expected, count); @@ -13918,7 +13916,7 @@ THREADED_TEST(NewPersistentHandleFromWeakCallback) { handle1.SetWeak(&handle1, NewPersistentHandleCallback1, v8::WeakCallbackType::kParameter); handle2.Reset(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } @@ -13928,7 +13926,7 @@ v8::Persistent to_be_disposed; void DisposeAndForceGcCallback2( const v8::WeakCallbackInfo>& data) { to_be_disposed.Reset(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } @@ -13952,7 +13950,7 @@ THREADED_TEST(DoNotUseDeletedNodesInSecondLevelGc) { handle1.SetWeak(&handle1, DisposeAndForceGcCallback1, v8::WeakCallbackType::kParameter); to_be_disposed.Reset(isolate, handle2); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } void DisposingCallback( @@ -13990,7 +13988,7 @@ THREADED_TEST(NoGlobalHandlesOrphaningDueToWeakCallback) { v8::WeakCallbackType::kParameter); handle3.SetWeak(&handle3, HandleCreatingCallback1, v8::WeakCallbackType::kParameter); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); EmptyMessageQueues(isolate); } @@ -16221,7 +16219,7 @@ static void ObjectWithExternalArrayTestHelper(Local context, "}" "sum;"); // Force GC to trigger verification. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(28, result->Int32Value(context).FromJust()); // Make sure out-of-range loads do not throw. @@ -16437,12 +16435,12 @@ static void FixedTypedArrayTestHelper(i::ExternalArrayType array_type, CHECK_EQ(FixedTypedArrayClass::kInstanceType, fixed_array->map()->instance_type()); CHECK_EQ(kElementCount, fixed_array->length()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); for (int i = 0; i < kElementCount; i++) { fixed_array->set(i, static_cast(i)); } // Force GC to trigger verification. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); for (int i = 0; i < kElementCount; i++) { CHECK_EQ(static_cast(static_cast(i)), static_cast(fixed_array->get_scalar(i))); @@ -16634,8 +16632,8 @@ THREADED_TEST(SkipArrayBufferBackingStoreDuringGC) { // Should not crash CcTest::CollectGarbage(i::NEW_SPACE); // in survivor space now CcTest::CollectGarbage(i::NEW_SPACE); // in old gen now - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); // Should not move the pointer CHECK_EQ(ab->GetContents().Data(), store_ptr); @@ -18886,7 +18884,7 @@ TEST(Regress528) { other_context->Enter(); CompileRun(source_simple); other_context->Exit(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); if (GetGlobalObjectsCount() == 1) break; } CHECK_GE(2, gc_count); @@ -18908,7 +18906,7 @@ TEST(Regress528) { other_context->Enter(); CompileRun(source_eval); other_context->Exit(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); if (GetGlobalObjectsCount() == 1) break; } CHECK_GE(2, gc_count); @@ -18935,7 +18933,7 @@ TEST(Regress528) { other_context->Enter(); CompileRun(source_exception); other_context->Exit(); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); if (GetGlobalObjectsCount() == 1) break; } CHECK_GE(2, gc_count); @@ -19564,26 +19562,26 @@ TEST(GCCallbacksOld) { context->GetIsolate()->AddGCEpilogueCallback(EpilogueCallback); CHECK_EQ(0, prologue_call_count); CHECK_EQ(0, epilogue_call_count); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(1, prologue_call_count); CHECK_EQ(1, epilogue_call_count); context->GetIsolate()->AddGCPrologueCallback(PrologueCallbackSecond); context->GetIsolate()->AddGCEpilogueCallback(EpilogueCallbackSecond); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(2, prologue_call_count); CHECK_EQ(2, epilogue_call_count); CHECK_EQ(1, prologue_call_count_second); CHECK_EQ(1, epilogue_call_count_second); context->GetIsolate()->RemoveGCPrologueCallback(PrologueCallback); context->GetIsolate()->RemoveGCEpilogueCallback(EpilogueCallback); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(2, prologue_call_count); CHECK_EQ(2, epilogue_call_count); CHECK_EQ(2, prologue_call_count_second); CHECK_EQ(2, epilogue_call_count_second); context->GetIsolate()->RemoveGCPrologueCallback(PrologueCallbackSecond); context->GetIsolate()->RemoveGCEpilogueCallback(EpilogueCallbackSecond); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(2, prologue_call_count); CHECK_EQ(2, epilogue_call_count); CHECK_EQ(2, prologue_call_count_second); @@ -19599,26 +19597,26 @@ TEST(GCCallbacks) { isolate->AddGCEpilogueCallback(EpilogueCallback); CHECK_EQ(0, prologue_call_count); CHECK_EQ(0, epilogue_call_count); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(1, prologue_call_count); CHECK_EQ(1, epilogue_call_count); isolate->AddGCPrologueCallback(PrologueCallbackSecond); isolate->AddGCEpilogueCallback(EpilogueCallbackSecond); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(2, prologue_call_count); CHECK_EQ(2, epilogue_call_count); CHECK_EQ(1, prologue_call_count_second); CHECK_EQ(1, epilogue_call_count_second); isolate->RemoveGCPrologueCallback(PrologueCallback); isolate->RemoveGCEpilogueCallback(EpilogueCallback); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(2, prologue_call_count); CHECK_EQ(2, epilogue_call_count); CHECK_EQ(2, prologue_call_count_second); CHECK_EQ(2, epilogue_call_count_second); isolate->RemoveGCPrologueCallback(PrologueCallbackSecond); isolate->RemoveGCEpilogueCallback(EpilogueCallbackSecond); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(2, prologue_call_count); CHECK_EQ(2, epilogue_call_count); CHECK_EQ(2, prologue_call_count_second); @@ -19806,7 +19804,7 @@ TEST(ContainsOnlyOneByte) { void FailedAccessCheckCallbackGC(Local target, v8::AccessType type, Local data) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CcTest::isolate()->ThrowException( v8::Exception::Error(v8_str("cross context"))); } @@ -20429,7 +20427,7 @@ TEST(DontDeleteCellLoadIC) { "})()", "ReferenceError: cell is not defined"); CompileRun("cell = \"new_second\";"); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); ExpectString("readCell()", "new_second"); ExpectString("readCell()", "new_second"); } @@ -20499,8 +20497,8 @@ TEST(PersistentHandleInNewSpaceVisitor) { object1.SetWrapperClassId(42); CHECK_EQ(42, object1.WrapperClassId()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); v8::Persistent object2(isolate, v8::Object::New(isolate)); CHECK_EQ(0, object2.WrapperClassId()); diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc index 08f262d0e7..3eead4b269 100644 --- a/test/cctest/test-cpu-profiler.cc +++ b/test/cctest/test-cpu-profiler.cc @@ -1179,7 +1179,7 @@ TEST(FunctionCallSample) { // Collect garbage that might have be generated while installing // extensions. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CompileRun(call_function_test_source); v8::Local function = GetFunction(env.local(), "start"); diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc index 8a2eb14e10..e055b5f145 100644 --- a/test/cctest/test-debug.cc +++ b/test/cctest/test-debug.cc @@ -384,7 +384,7 @@ void CheckDebuggerUnloaded(bool check_functions) { CHECK(!CcTest::i_isolate()->debug()->debug_info_list_); // Collect garbage to ensure weak handles are cleared. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CcTest::CollectAllGarbage(Heap::kMakeHeapIterableMask); // Iterate the heap and check that there are no debugger related objects left. @@ -812,7 +812,7 @@ static void DebugEventBreakPointCollectGarbage( CcTest::CollectGarbage(v8::internal::NEW_SPACE); } else { // Mark sweep compact. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } } } @@ -1223,7 +1223,7 @@ static void CallAndGC(v8::Local context, CHECK_EQ(2 + i * 3, break_point_hit_count); // Mark sweep (and perhaps compact) and call function. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); f->Call(context, recv, 0, NULL).ToLocalChecked(); CHECK_EQ(3 + i * 3, break_point_hit_count); } @@ -1947,7 +1947,7 @@ TEST(ScriptBreakPointLineTopLevel) { ->Get(context, v8_str(env->GetIsolate(), "f")) .ToLocalChecked()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); SetScriptBreakPointByNameFromJS(env->GetIsolate(), "test.html", 3, -1); diff --git a/test/cctest/test-feedback-vector.cc b/test/cctest/test-feedback-vector.cc index dc111e340f..4ba4ea5997 100644 --- a/test/cctest/test-feedback-vector.cc +++ b/test/cctest/test-feedback-vector.cc @@ -220,7 +220,7 @@ TEST(VectorCallICStates) { CHECK_EQ(GENERIC, nexus.StateFromFeedback()); // After a collection, state should remain GENERIC. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(GENERIC, nexus.StateFromFeedback()); } @@ -245,7 +245,7 @@ TEST(VectorCallFeedbackForArray) { CHECK_EQ(MONOMORPHIC, nexus.StateFromFeedback()); CHECK(nexus.GetFeedback()->IsAllocationSite()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // It should stay monomorphic even after a GC. CHECK_EQ(MONOMORPHIC, nexus.StateFromFeedback()); } @@ -359,7 +359,7 @@ TEST(VectorLoadICStates) { CHECK(!nexus.FindFirstMap()); // After a collection, state should not be reset to PREMONOMORPHIC. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); CHECK_EQ(MEGAMORPHIC, nexus.StateFromFeedback()); } diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc index 7855f75b38..cc56e2edfe 100644 --- a/test/cctest/test-heap-profiler.cc +++ b/test/cctest/test-heap-profiler.cc @@ -689,7 +689,7 @@ TEST(HeapSnapshotAddressReuse) { CompileRun( "for (var i = 0; i < 10000; ++i)\n" " a[i] = new A();\n"); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); const v8::HeapSnapshot* snapshot2 = heap_profiler->TakeHeapSnapshot(); CHECK(ValidateSnapshot(snapshot2)); @@ -731,7 +731,7 @@ TEST(HeapEntryIdsAndArrayShift) { "for (var i = 0; i < 1; ++i)\n" " a.shift();\n"); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); const v8::HeapSnapshot* snapshot2 = heap_profiler->TakeHeapSnapshot(); CHECK(ValidateSnapshot(snapshot2)); @@ -772,7 +772,7 @@ TEST(HeapEntryIdsAndGC) { const v8::HeapSnapshot* snapshot1 = heap_profiler->TakeHeapSnapshot(); CHECK(ValidateSnapshot(snapshot1)); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); const v8::HeapSnapshot* snapshot2 = heap_profiler->TakeHeapSnapshot(); CHECK(ValidateSnapshot(snapshot2)); @@ -1101,7 +1101,7 @@ TEST(HeapSnapshotObjectsStats) { // We have to call GC 6 times. In other case the garbage will be // the reason of flakiness. for (int i = 0; i < 6; ++i) { - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } v8::SnapshotObjectId initial_id; @@ -2905,7 +2905,7 @@ TEST(SamplingHeapProfiler) { " eval(\"new Array(100)\");\n" "}\n"); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); std::unique_ptr profile( heap_profiler->GetAllocationProfile()); diff --git a/test/cctest/test-identity-map.cc b/test/cctest/test-identity-map.cc index f57036afc9..bb5c3b524c 100644 --- a/test/cctest/test-identity-map.cc +++ b/test/cctest/test-identity-map.cc @@ -738,7 +738,7 @@ TEST(CanonicalHandleScope) { Handle string2(*string1); CHECK_EQ(number1.location(), number2.location()); CHECK_EQ(string1.location(), string2.location()); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); Handle number3(*number2); Handle string3(*string2); CHECK_EQ(number1.location(), number3.location()); diff --git a/test/cctest/test-mementos.cc b/test/cctest/test-mementos.cc index 5c9ac2e327..6d44f33ce6 100644 --- a/test/cctest/test-mementos.cc +++ b/test/cctest/test-mementos.cc @@ -46,7 +46,7 @@ static void SetUpNewSpaceWithPoisonedMementoAtTop() { NewSpace* new_space = heap->new_space(); // Make sure we can allocate some objects without causing a GC later. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // Allocate a string, the GC may suspect a memento behind the string. Handle string = diff --git a/test/cctest/test-symbols.cc b/test/cctest/test-symbols.cc index 0d032e96ce..3f184de6a0 100644 --- a/test/cctest/test-symbols.cc +++ b/test/cctest/test-symbols.cc @@ -72,7 +72,7 @@ TEST(Create) { } CcTest::CollectGarbage(i::NEW_SPACE); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // All symbols should be distinct. for (int i = 0; i < kNumSymbols; ++i) { diff --git a/test/cctest/test-unboxed-doubles.cc b/test/cctest/test-unboxed-doubles.cc index f077d28c90..7911412c2d 100644 --- a/test/cctest/test-unboxed-doubles.cc +++ b/test/cctest/test-unboxed-doubles.cc @@ -918,7 +918,7 @@ TEST(Regress436816) { // Force a GC to free up space before we allocate objects whose // mid-test states would fail heap verification. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); const int kPropsCount = kSmiValueSize * 3; TestPropertyKind props[kPropsCount]; @@ -955,7 +955,7 @@ TEST(Regress436816) { CHECK(object->map()->HasFastPointerLayout()); // Trigger GCs and heap verification. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } @@ -1014,7 +1014,7 @@ TEST(DescriptorArrayTrimming) { // Call GC that should trim both |map|'s descriptor array and layout // descriptor. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); // The unused tail of the layout descriptor is now "clean" again. CHECK(map->layout_descriptor()->IsConsistentWithMap(*map, true)); diff --git a/test/cctest/test-weakmaps.cc b/test/cctest/test-weakmaps.cc index 79edee5577..9c88456eb5 100644 --- a/test/cctest/test-weakmaps.cc +++ b/test/cctest/test-weakmaps.cc @@ -197,7 +197,7 @@ TEST(Regress2060a) { // Force compacting garbage collection. CHECK(FLAG_always_compact); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } @@ -239,9 +239,9 @@ TEST(Regress2060b) { // Force compacting garbage collection. The subsequent collections are used // to verify that key references were actually updated. CHECK(FLAG_always_compact); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); } @@ -259,5 +259,5 @@ TEST(Regress399527) { // The weak map is marked black here but leaving the handle scope will make // the object unreachable. Aborting incremental marking will clear all the // marking bits which makes the weak map garbage. - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } diff --git a/test/cctest/test-weaksets.cc b/test/cctest/test-weaksets.cc index 13e3b65886..f0d3354f4f 100644 --- a/test/cctest/test-weaksets.cc +++ b/test/cctest/test-weaksets.cc @@ -196,7 +196,7 @@ TEST(WeakSet_Regress2060a) { // Force compacting garbage collection. CHECK(FLAG_always_compact); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); } @@ -238,7 +238,7 @@ TEST(WeakSet_Regress2060b) { // Force compacting garbage collection. The subsequent collections are used // to verify that key references were actually updated. CHECK(FLAG_always_compact); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); - CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); + CcTest::CollectAllGarbage(); }