Commit 0cef7f7c authored by hpayer's avatar hpayer Committed by Commit Bot

[heap] Register an idle embedder garbage collection when starting incremental...

[heap] Register an idle embedder garbage collection when starting incremental marking through reached marking limit.

We need to schedule an idle garbage collection in the embedder to drive progress. The embedder is responsible to schedule the request or ignore it.

BUG=chromium:728228

Review-Url: https://codereview.chromium.org/2937433002
Cr-Commit-Position: refs/heads/master@{#45866}
parent 1624da37
...@@ -1068,8 +1068,8 @@ bool Heap::CollectGarbage(GarbageCollector collector, ...@@ -1068,8 +1068,8 @@ bool Heap::CollectGarbage(GarbageCollector collector,
// causes another mark-compact. // causes another mark-compact.
if (IsYoungGenerationCollector(collector) && if (IsYoungGenerationCollector(collector) &&
!ShouldAbortIncrementalMarking()) { !ShouldAbortIncrementalMarking()) {
StartIncrementalMarkingIfAllocationLimitIsReached(kNoGCFlags, StartIncrementalMarkingIfAllocationLimitIsReached(
kNoGCCallbackFlags); kNoGCFlags, kGCCallbackScheduleIdleGarbageCollection);
} }
return next_gc_likely_to_collect_more; return next_gc_likely_to_collect_more;
......
...@@ -2718,7 +2718,7 @@ HeapObject* FreeList::Allocate(size_t size_in_bytes) { ...@@ -2718,7 +2718,7 @@ HeapObject* FreeList::Allocate(size_t size_in_bytes) {
owner_->EmptyAllocationInfo(); owner_->EmptyAllocationInfo();
owner_->heap()->StartIncrementalMarkingIfAllocationLimitIsReached( owner_->heap()->StartIncrementalMarkingIfAllocationLimitIsReached(
Heap::kNoGCFlags, kNoGCCallbackFlags); Heap::kNoGCFlags, kGCCallbackScheduleIdleGarbageCollection);
size_t new_node_size = 0; size_t new_node_size = 0;
FreeSpace* new_node = FindNodeFor(size_in_bytes, &new_node_size); FreeSpace* new_node = FindNodeFor(size_in_bytes, &new_node_size);
...@@ -3156,8 +3156,8 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size, ...@@ -3156,8 +3156,8 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size,
reinterpret_cast<Object**>(object->address())[1] = Smi::kZero; reinterpret_cast<Object**>(object->address())[1] = Smi::kZero;
} }
heap()->StartIncrementalMarkingIfAllocationLimitIsReached(Heap::kNoGCFlags, heap()->StartIncrementalMarkingIfAllocationLimitIsReached(
kNoGCCallbackFlags); Heap::kNoGCFlags, kGCCallbackScheduleIdleGarbageCollection);
AllocationStep(object->address(), object_size); AllocationStep(object->address(), object_size);
heap()->CreateFillerObjectAt(object->address(), object_size, heap()->CreateFillerObjectAt(object->address(), object_size,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment