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

Unified Diff: test/cctest/test-heap.cc

Issue 1088083002: Revert of Force full GCwhenever CollectAllGarbage is meant to trigger a full GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « test/cctest/test-feedback-vector.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index 685545797c913bb94952272b3bd6f6f2b675badc..0d668c8b94b4307ef2457f836227ba8bd67ee587 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -452,7 +452,7 @@
CHECK(!GlobalHandles::IsNearDeath(h2.location()));
// Incremental marking potentially marked handles before they turned weak.
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK((*h1)->IsString());
@@ -947,7 +947,7 @@
TestHeap* heap = CcTest::test_heap();
// Increase the chance of 'bump-the-pointer' allocation in old space.
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
v8::HandleScope scope(CcTest::isolate());
@@ -1048,14 +1048,14 @@
CHECK(function->shared()->is_compiled());
// The code will survive at least two GCs.
- i_isolate->heap()->CollectAllGarbage();
- i_isolate->heap()->CollectAllGarbage();
+ i_isolate->heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
+ i_isolate->heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK(function->shared()->is_compiled());
// Simulate several GCs that use full marking.
const int kAgingThreshold = 6;
for (int i = 0; i < kAgingThreshold; i++) {
- i_isolate->heap()->CollectAllGarbage();
+ i_isolate->heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
}
// foo should no longer be in the compilation cache
@@ -1101,12 +1101,12 @@
CHECK(function->shared()->is_compiled());
// The code has been run so will survive at least one GC.
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK(function->shared()->is_compiled());
// The code was only run once, so it should be pre-aged and collected on the
// next GC.
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK(!function->shared()->is_compiled() || function->IsOptimized());
// Execute the function again twice, and ensure it is reset to the young age.
@@ -1116,14 +1116,14 @@
}
// The code will survive at least two GC now that it is young again.
- CcTest::heap()->CollectAllGarbage();
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
+ CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK(function->shared()->is_compiled());
// Simulate several GCs that use full marking.
const int kAgingThreshold = 6;
for (int i = 0; i < kAgingThreshold; i++) {
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
}
// foo should no longer be in the compilation cache
@@ -1166,15 +1166,15 @@
CHECK(function->shared()->is_compiled());
// The code will survive at least two GCs.
- CcTest::heap()->CollectAllGarbage();
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
+ CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK(function->shared()->is_compiled());
// Simulate several GCs that use incremental marking.
const int kAgingThreshold = 6;
for (int i = 0; i < kAgingThreshold; i++) {
SimulateIncrementalMarking(CcTest::heap());
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
}
CHECK(!function->shared()->is_compiled() || function->IsOptimized());
CHECK(!function->is_compiled() || function->IsOptimized());
@@ -1189,7 +1189,7 @@
for (int i = 0; i < kAgingThreshold; i++) {
SimulateIncrementalMarking(CcTest::heap());
if (!function->next_function_link()->IsUndefined()) break;
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
}
// Force optimization while incremental marking is active and while
@@ -1199,7 +1199,7 @@
}
// Simulate one final GC to make sure the candidate queue is sane.
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
CHECK(function->shared()->is_compiled() || !function->IsOptimized());
CHECK(function->is_compiled() || !function->IsOptimized());
}
@@ -1228,7 +1228,7 @@
Handle<String> bar_name = factory->InternalizeUtf8String("bar");
// Perfrom one initial GC to enable code flushing.
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
// This compile will add the code to the compilation cache.
{ v8::HandleScope scope(CcTest::isolate());
@@ -1268,7 +1268,7 @@
CcTest::heap()->CollectGarbage(NEW_SPACE, "test scavenge while marking");
// Simulate one final GC to make sure the candidate queue is sane.
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
CHECK(!function->shared()->is_compiled() || function->IsOptimized());
CHECK(!function->is_compiled() || function->IsOptimized());
}
@@ -1305,8 +1305,8 @@
CHECK(function->shared()->is_compiled());
// The code will survive at least two GCs.
- heap->CollectAllGarbage();
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK(function->shared()->is_compiled());
// Bump the code age so that flushing is triggered.
@@ -1333,7 +1333,7 @@
}
// Simulate one final GC to make sure the candidate queue is sane.
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
CHECK(function->shared()->is_compiled() || !function->IsOptimized());
CHECK(function->is_compiled() || !function->IsOptimized());
}
@@ -1388,7 +1388,7 @@
true, native_context, language_mode);
CHECK(!info.is_null());
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
// On second compilation, the hash is replaced by a real cache entry mapping
// the source to the shared function info containing the code.
@@ -1400,7 +1400,7 @@
info.ToHandleChecked()->code()->MakeOlder(NO_MARKING_PARITY);
}
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
// Ensure code aging cleared the entry from the cache.
info = compilation_cache->LookupScript(source, Handle<Object>(), 0, 0, false,
true, native_context, language_mode);
@@ -1500,7 +1500,7 @@
// Collect garbage that might have been created by one of the
// installed extensions.
isolate->compilation_cache()->Clear();
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
CHECK_EQ(i + 1, CountNativeContexts());
@@ -1532,7 +1532,7 @@
// Mark compact handles the weak references.
isolate->compilation_cache()->Clear();
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
CHECK_EQ(4, CountOptimizedUserFunctions(ctx[i]));
// Get rid of f3 and f5 in the same way.
@@ -1541,14 +1541,14 @@
CcTest::heap()->CollectGarbage(NEW_SPACE);
CHECK_EQ(4, CountOptimizedUserFunctions(ctx[i]));
}
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
CHECK_EQ(3, CountOptimizedUserFunctions(ctx[i]));
CompileRun("f5=null");
for (int j = 0; j < 10; j++) {
CcTest::heap()->CollectGarbage(NEW_SPACE);
CHECK_EQ(3, CountOptimizedUserFunctions(ctx[i]));
}
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
CHECK_EQ(2, CountOptimizedUserFunctions(ctx[i]));
ctx[i]->Exit();
@@ -1556,7 +1556,7 @@
// Force compilation cache cleanup.
CcTest::heap()->NotifyContextDisposed(true);
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
// Dispose the native contexts one by one.
for (int i = 0; i < kNumTestContexts; i++) {
@@ -1572,7 +1572,7 @@
}
// Mark compact handles the weak references.
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
CHECK_EQ(kNumTestContexts - i - 1, CountNativeContexts());
}
@@ -1588,7 +1588,7 @@
Handle<Object> object(heap->native_contexts_list(), isolate);
while (!object->IsUndefined()) {
count++;
- if (count == n) heap->CollectAllGarbage();
+ if (count == n) heap->CollectAllGarbage(Heap::kNoGCFlags);
object =
Handle<Object>(Context::cast(*object)->get(Context::NEXT_CONTEXT_LINK),
isolate);
@@ -1610,7 +1610,7 @@
while (object->IsJSFunction() &&
!Handle<JSFunction>::cast(object)->IsBuiltin()) {
count++;
- if (count == n) isolate->heap()->CollectAllGarbage();
+ if (count == n) isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags);
object = Handle<Object>(
Object::cast(JSFunction::cast(*object)->next_function_link()),
isolate);
@@ -1693,11 +1693,11 @@
// Get initial heap size after several full GCs, which will stabilize
// the heap size and return with sweeping finished completely.
- CcTest::heap()->CollectAllGarbage();
- CcTest::heap()->CollectAllGarbage();
- CcTest::heap()->CollectAllGarbage();
- CcTest::heap()->CollectAllGarbage();
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
MarkCompactCollector* collector = CcTest::heap()->mark_compact_collector();
if (collector->sweeping_in_progress()) {
collector->EnsureSweepingCompleted();
@@ -1705,11 +1705,11 @@
int initial_size = static_cast<int>(CcTest::heap()->SizeOfObjects());
CompileRun("'foo'.match(reg_exp_source);");
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
int size_with_regexp = static_cast<int>(CcTest::heap()->SizeOfObjects());
CompileRun("'foo'.match(half_size_reg_exp);");
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
int size_with_optimized_regexp =
static_cast<int>(CcTest::heap()->SizeOfObjects());
@@ -1729,11 +1729,11 @@
// Get initial heap size after several full GCs, which will stabilize
// the heap size and return with sweeping finished completely.
- CcTest::heap()->CollectAllGarbage();
- CcTest::heap()->CollectAllGarbage();
- CcTest::heap()->CollectAllGarbage();
- CcTest::heap()->CollectAllGarbage();
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
MarkCompactCollector* collector = CcTest::heap()->mark_compact_collector();
if (collector->sweeping_in_progress()) {
collector->EnsureSweepingCompleted();
@@ -1755,7 +1755,7 @@
// The heap size should go back to initial size after a full GC, even
// though sweeping didn't finish yet.
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
// Normally sweeping would not be complete here, but no guarantees.
@@ -2177,7 +2177,7 @@
// Verify that only dead prototype transitions are cleared.
CHECK_EQ(initialTransitions + 10,
NumberOfProtoTransitions(baseObject->map()));
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
const int transitions = 10 - 3;
CHECK_EQ(initialTransitions + transitions,
NumberOfProtoTransitions(baseObject->map()));
@@ -2259,8 +2259,8 @@
// guard interrupt. But here we didn't ask for that, and there is no
// JS code running to trigger the interrupt, so we explicitly finalize
// here.
- CcTest::heap()->CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask,
- "Test finalizing incremental mark-sweep");
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags,
+ "Test finalizing incremental mark-sweep");
}
CHECK_EQ(CcTest::heap()->global_ic_age(), f->shared()->ic_age());
@@ -2933,7 +2933,7 @@
CHECK_EQ(transitions_count, transitions_before);
SimulateIncrementalMarking(CcTest::heap());
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
// Count number of live transitions after marking. Note that one transition
// is left, because 'o' still holds an instance of one transition target.
@@ -3116,7 +3116,7 @@
CcTest::heap()->AgeInlineCaches();
// Explicitly request GC to perform final marking step and sweeping.
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
Handle<JSObject> root =
v8::Utils::OpenHandle(
@@ -3160,7 +3160,7 @@
CcTest::heap()->AgeInlineCaches();
// Explicitly request GC to perform final marking step and sweeping.
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
Handle<JSObject> root =
v8::Utils::OpenHandle(
@@ -3198,17 +3198,15 @@
// Triggering one GC will cause a lot of garbage to be discovered but
// even spread across all allocated pages.
- heap->CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask,
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask,
"triggered for preparation");
CHECK_GE(number_of_test_pages + 1, 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.
- heap->CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask,
- "triggered by test 1");
+ heap->CollectAllGarbage(Heap::kNoGCFlags, "triggered by test 1");
CHECK_GE(number_of_test_pages + 1, old_space->CountTotalPages());
- heap->CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask,
- "triggered by test 2");
+ heap->CollectAllGarbage(Heap::kNoGCFlags, "triggered by test 2");
CHECK_GE(number_of_test_pages + 1, old_space->CountTotalPages() * 2);
// Triggering a last-resort GC should cause all pages to be released to the
@@ -3250,7 +3248,7 @@
}
CHECK(SlicedString::cast(*slice)->parent()->IsSeqOneByteString());
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
CHECK(SlicedString::cast(*slice)->parent()->IsSeqOneByteString());
}
@@ -3348,7 +3346,7 @@
CHECK(feedback_vector->Get(FeedbackVectorICSlot(slot2))->IsWeakCell());
SimulateIncrementalMarking(CcTest::heap());
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
CHECK(!WeakCell::cast(feedback_vector->Get(FeedbackVectorICSlot(slot1)))
->cleared());
@@ -3409,7 +3407,7 @@
CHECK(vector->Get(FeedbackVectorSlot(0))->IsWeakCell());
SimulateIncrementalMarking(CcTest::heap());
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
CHECK(vector->Get(FeedbackVectorSlot(0))->IsWeakCell());
}
@@ -3444,7 +3442,7 @@
// Fire context dispose notification.
CcTest::isolate()->ContextDisposedNotification();
SimulateIncrementalMarking(CcTest::heap());
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
CHECK_EQ(*TypeFeedbackVector::UninitializedSentinel(isolate),
vector->Get(FeedbackVectorSlot(0)));
@@ -3474,7 +3472,7 @@
}
SimulateIncrementalMarking(CcTest::heap());
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
Code* ic_after = FindFirstIC(f->shared()->code(), Code::LOAD_IC);
if (FLAG_vector_ics) {
@@ -3516,7 +3514,7 @@
// Fire context dispose notification.
CcTest::isolate()->ContextDisposedNotification();
SimulateIncrementalMarking(CcTest::heap());
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
Code* ic_after = FindFirstIC(f->shared()->code(), Code::LOAD_IC);
if (FLAG_vector_ics) {
@@ -3564,7 +3562,7 @@
// Fire context dispose notification.
SimulateIncrementalMarking(CcTest::heap());
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
Code* ic_after = FindFirstIC(f->shared()->code(), Code::LOAD_IC);
if (FLAG_vector_ics) {
@@ -3613,7 +3611,7 @@
// Fire context dispose notification.
CcTest::isolate()->ContextDisposedNotification();
SimulateIncrementalMarking(CcTest::heap());
- CcTest::heap()->CollectAllGarbage();
+ CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
Code* ic_after = FindFirstIC(f->shared()->code(), Code::LOAD_IC);
if (FLAG_vector_ics) {
@@ -3742,7 +3740,7 @@
HandleScope scope(isolate);
// Perform one initial GC to enable code flushing.
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
// Prepare several closures that are all eligible for code flushing
// because all reachable ones are not optimized. Make sure that the
@@ -3788,7 +3786,7 @@
// finish the GC to complete code flushing.
SimulateIncrementalMarking(heap);
CompileRun("%OptimizeFunctionOnNextCall(g); g(3);");
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
// Unoptimized code is missing and the deoptimizer will go ballistic.
CompileRun("g('bozo');");
@@ -3804,7 +3802,7 @@
HandleScope scope(isolate);
// Perform one initial GC to enable code flushing.
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
// Prepare an optimized closure that the optimized code map will get
// populated. Then age the unoptimized code to trigger code flushing
@@ -3834,7 +3832,7 @@
// Simulate incremental marking so that unoptimized code is flushed
// even though it still is cached in the optimized code map.
SimulateIncrementalMarking(heap);
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
// Make a new closure that will get code installed from the code map.
// Unoptimized code is missing and the deoptimizer will go ballistic.
@@ -3853,7 +3851,7 @@
HandleScope scope(isolate);
// Perform one initial GC to enable code flushing.
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
// Prepare a shared function info eligible for code flushing for which
// the unoptimized code will be replaced during optimization.
@@ -3912,7 +3910,7 @@
"g(false);");
// Finish garbage collection cycle.
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
CHECK(shared1->code()->gc_metadata() == NULL);
}
@@ -4001,7 +3999,7 @@
HandleScope scope(isolate);
// Perform one initial GC to enable code flushing.
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
// Ensure the code ends up on an evacuation candidate.
SimulateFullSpace(heap->code_space());
@@ -4041,8 +4039,8 @@
}
// This cycle will bust the heap and subsequent cycles will go ballistic.
- heap->CollectAllGarbage();
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
}
@@ -4058,7 +4056,7 @@
HandleScope scope(isolate);
// Perform one initial GC to enable code flushing.
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
// Ensure the code ends up on an evacuation candidate.
SimulateFullSpace(heap->code_space());
@@ -4095,8 +4093,8 @@
CHECK(isolate->debug()->Load());
// This cycle will bust the heap and subsequent cycles will go ballistic.
- heap->CollectAllGarbage();
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
}
@@ -4231,7 +4229,7 @@
// 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++) {
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
}
// The site still exists because of our global handle, but the code is no
@@ -4279,7 +4277,7 @@
// Now make sure that a gc should get rid of the function
for (int i = 0; i < 4; i++) {
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
}
DCHECK(code->marked_for_deoptimization());
@@ -4320,7 +4318,7 @@
// Now make sure that a gc should get rid of the function
for (int i = 0; i < 4; i++) {
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
}
DCHECK(code->marked_for_deoptimization());
@@ -4359,7 +4357,7 @@
i, i, i, i, i, i, i, i);
CompileRun(source.start());
}
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(i::Heap::kNoGCFlags);
}
int elements = 0;
if (heap->weak_object_to_code_table()->IsHashTable()) {
@@ -4509,7 +4507,7 @@
weak_ic_cleared = false;
garbage.SetWeak(static_cast<void*>(&garbage), &ClearWeakIC);
Heap* heap = CcTest::i_isolate()->heap();
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK(weak_ic_cleared);
// We've determined the constructor in createObj has had it's weak cell
@@ -4521,7 +4519,7 @@
Object* slot_value = feedback_vector->Get(FeedbackVectorSlot(0));
CHECK(slot_value->IsWeakCell());
if (WeakCell::cast(slot_value)->cleared()) break;
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
}
Object* slot_value = feedback_vector->Get(FeedbackVectorSlot(0));
@@ -4548,7 +4546,7 @@
weak_ic_cleared = false;
garbage.SetWeak(static_cast<void*>(&garbage), &ClearWeakIC);
Heap* heap = CcTest::i_isolate()->heap();
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK(weak_ic_cleared);
}
@@ -4762,7 +4760,7 @@
v8::HandleScope scope(CcTest::isolate());
CompileRun("(testIC())");
}
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CheckIC(loadIC->code(), Code::LOAD_IC, loadIC->shared(), 0, MONOMORPHIC);
{
v8::HandleScope scope(CcTest::isolate());
@@ -4798,7 +4796,7 @@
v8::HandleScope scope(CcTest::isolate());
CompileRun("(testIC())");
}
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CheckIC(loadIC->code(), Code::LOAD_IC, loadIC->shared(), 0, POLYMORPHIC);
{
v8::HandleScope scope(CcTest::isolate());
@@ -4866,7 +4864,7 @@
CHECK(weak_cell->value()->IsFixedArray());
weak_cells[i] = inner_scope.CloseAndEscape(weak_cell);
}
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
CHECK_EQ(*survivor, weak_cells[0]->value());
for (int i = 1; i < N; i++) {
CHECK(weak_cells[i]->cleared());
@@ -4913,7 +4911,7 @@
heap->DisableInlineAllocation();
heap->set_allocation_timeout(1);
g->Call(global, 1, args1);
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
}
@@ -5224,14 +5222,14 @@
"a.x = new cls();"
"cls.prototype = null;");
for (int i = 0; i < 4; i++) {
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
}
// 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++) {
- heap->CollectAllGarbage();
+ heap->CollectAllGarbage(Heap::kNoGCFlags);
}
CHECK(weak_prototype->cleared());
}
« no previous file with comments | « test/cctest/test-feedback-vector.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698