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

Unified Diff: src/heap/heap.cc

Issue 2592393003: Revert of Reland "[heap] Ensure progress when incrementally marking wrappers" (Closed)
Patch Set: Created 4 years 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 | « src/heap/heap.h ('k') | src/heap/incremental-marking.cc » ('j') | 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 06b55f84d1ea3fb23e633ba2a500ac8f4770daaf..951199d8166568caac66afe426a4299c92e3d172 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4176,18 +4176,19 @@
}
}
+bool Heap::MarkingDequesAreEmpty() {
+ return mark_compact_collector()->marking_deque()->IsEmpty() &&
+ local_embedder_heap_tracer()->NumberOfWrappersToTrace() == 0;
+}
+
void Heap::FinalizeIncrementalMarkingIfComplete(
GarbageCollectionReason gc_reason) {
if (incremental_marking()->IsMarking() &&
(incremental_marking()->IsReadyToOverApproximateWeakClosure() ||
(!incremental_marking()->finalize_marking_completed() &&
- mark_compact_collector()->marking_deque()->IsEmpty() &&
- local_embedder_heap_tracer()->ShouldFinalizeIncrementalMarking()))) {
+ MarkingDequesAreEmpty()))) {
FinalizeIncrementalMarking(gc_reason);
- } else if (incremental_marking()->IsComplete() ||
- (mark_compact_collector()->marking_deque()->IsEmpty() &&
- local_embedder_heap_tracer()
- ->ShouldFinalizeIncrementalMarking())) {
+ } else if (incremental_marking()->IsComplete() || MarkingDequesAreEmpty()) {
CollectAllGarbage(current_gc_flags_, gc_reason);
}
}
@@ -4199,16 +4200,13 @@
tracer()->FinalIncrementalMarkCompactSpeedInBytesPerMillisecond();
if (incremental_marking()->IsReadyToOverApproximateWeakClosure() ||
(!incremental_marking()->finalize_marking_completed() &&
- mark_compact_collector()->marking_deque()->IsEmpty() &&
- local_embedder_heap_tracer()->ShouldFinalizeIncrementalMarking() &&
+ MarkingDequesAreEmpty() &&
gc_idle_time_handler_->ShouldDoOverApproximateWeakClosure(
idle_time_in_ms))) {
FinalizeIncrementalMarking(gc_reason);
return true;
} else if (incremental_marking()->IsComplete() ||
- (mark_compact_collector()->marking_deque()->IsEmpty() &&
- local_embedder_heap_tracer()
- ->ShouldFinalizeIncrementalMarking() &&
+ (MarkingDequesAreEmpty() &&
gc_idle_time_handler_->ShouldDoFinalIncrementalMarkCompact(
idle_time_in_ms, size_of_objects,
final_incremental_mark_compact_speed_in_bytes_per_ms))) {
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698