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

Unified Diff: src/heap/heap.cc

Issue 2369933004: Revert of [heap] Always use the passed-in collector in CollectGarbage. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 23bdb3c7122d167473d3120834d319fbea5ea2a4..37848c25942f4ecd822b517cd3deed066f18d27e 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -982,6 +982,22 @@
}
}
+ 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698