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

Unified Diff: src/heap/embedder-tracing.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.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/embedder-tracing.cc
diff --git a/src/heap/embedder-tracing.cc b/src/heap/embedder-tracing.cc
index 8d5e54090f93e9d660f2525ef20eb3b23579fb18..4001afea9be9a975eb64941a47ed76537a294750 100644
--- a/src/heap/embedder-tracing.cc
+++ b/src/heap/embedder-tracing.cc
@@ -13,6 +13,8 @@ void LocalEmbedderHeapTracer::TracePrologue() {
if (!InUse()) return;
CHECK(cached_wrappers_to_trace_.empty());
+ num_v8_marking_deque_was_empty_ = 0;
+ in_final_pause_ = false;
remote_tracer_->TracePrologue();
}
@@ -33,6 +35,7 @@ void LocalEmbedderHeapTracer::AbortTracing() {
void LocalEmbedderHeapTracer::EnterFinalPause() {
if (!InUse()) return;
+ in_final_pause_ = true;
remote_tracer_->EnterFinalPause();
}
@@ -41,7 +44,10 @@ bool LocalEmbedderHeapTracer::Trace(
if (!InUse()) return false;
RegisterWrappersWithRemoteTracer();
- return remote_tracer_->AdvanceTracing(deadline, actions);
+ return (in_final_pause_ ||
+ (num_v8_marking_deque_was_empty_ <= kMaxIncrementalMarkingRounds))
+ ? remote_tracer_->AdvanceTracing(deadline, actions)
+ : false;
}
size_t LocalEmbedderHeapTracer::NumberOfWrappersToTrace() {
« no previous file with comments | « src/heap/embedder-tracing.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698