Commit d32d7e32 authored by hpayer's avatar hpayer Committed by Commit bot

Revert of [heap] Always use the passed-in collector in CollectGarbage....

Revert of [heap] Always use the passed-in collector in CollectGarbage. (patchset #1 id:1 of https://codereview.chromium.org/2336943003/ )

Reason for revert:
Regresses jank and memory. Revert for offline analysis.

Original issue's description:
> [heap] Always use the passed-in collector in CollectGarbage.
>
> Do not overwrite a collector decision.
>
> BUG=
>
> Committed: https://crrev.com/c19abaddafb5ede5e0d5efbe608b7fc5d7c7fcd0
> Cr-Commit-Position: refs/heads/master@{#39585}

TBR=ulan@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review-Url: https://codereview.chromium.org/2369933004
Cr-Commit-Position: refs/heads/master@{#39770}
parent c0ded717
......@@ -972,6 +972,22 @@ bool Heap::CollectGarbage(GarbageCollector collector,
}
}
if (collector == MARK_COMPACTOR && !ShouldFinalizeIncrementalMarking() &&
!ShouldAbortIncrementalMarking() && !incremental_marking()->IsStopped() &&
!incremental_marking()->should_hurry() && FLAG_incremental_marking &&
OldGenerationAllocationLimitReached()) {
if (!incremental_marking()->IsComplete() &&
!mark_compact_collector()->marking_deque_.IsEmpty() &&
!FLAG_gc_global) {
if (FLAG_trace_incremental_marking) {
isolate()->PrintWithTimestamp(
"[IncrementalMarking] Delaying MarkSweep.\n");
}
collector = SCAVENGER;
collector_reason = "incremental marking delaying mark-sweep";
}
}
bool next_gc_likely_to_collect_more = false;
intptr_t committed_memory_before = 0;
......
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