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

Unified Diff: src/heap/incremental-marking.cc

Issue 2592403002: [heap] Ensure progress when incrementally marking wrappers (Closed)
Patch Set: Remove max iterations to 10 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/embedder-tracing.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.cc
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
index c6e81c67eb6109d55192de87364081efbbdda70b..3ad3c1581e1b44bb57529b06b18b69145d97005d 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -1137,11 +1137,12 @@ size_t IncrementalMarking::Step(size_t bytes_to_process,
const bool incremental_wrapper_tracing =
FLAG_incremental_marking_wrappers &&
heap_->local_embedder_heap_tracer()->InUse();
- const bool process_wrappers =
- incremental_wrapper_tracing &&
- (heap_->local_embedder_heap_tracer()
- ->RequiresImmediateWrapperProcessing() ||
- heap_->mark_compact_collector()->marking_deque()->IsEmpty());
+ const bool v8_marking_deque_empty =
+ heap_->mark_compact_collector()->marking_deque()->IsEmpty();
+ const bool process_wrappers = incremental_wrapper_tracing &&
+ (heap_->local_embedder_heap_tracer()
+ ->RequiresImmediateWrapperProcessing() ||
+ v8_marking_deque_empty);
bool wrapper_work_left = incremental_wrapper_tracing;
if (!process_wrappers) {
bytes_processed = ProcessMarkingDeque(bytes_to_process);
@@ -1153,6 +1154,8 @@ size_t IncrementalMarking::Step(size_t bytes_to_process,
heap_->MonotonicallyIncreasingTimeInMs() + kStepSizeInMs;
TRACE_GC(heap()->tracer(),
GCTracer::Scope::MC_INCREMENTAL_WRAPPER_TRACING);
+ if (v8_marking_deque_empty)
+ heap_->local_embedder_heap_tracer()->NotifyV8MarkingDequeWasEmpty();
wrapper_work_left = heap_->local_embedder_heap_tracer()->Trace(
wrapper_deadline, EmbedderHeapTracer::AdvanceTracingActions(
EmbedderHeapTracer::ForceCompletionAction::
« no previous file with comments | « src/heap/embedder-tracing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698