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

Unified Diff: src/heap/embedder-tracing.h

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 | « no previous file | src/heap/embedder-tracing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/embedder-tracing.h
diff --git a/src/heap/embedder-tracing.h b/src/heap/embedder-tracing.h
index 60c85cd52f285a5d6c85794216a7da22a39fb00b..280278c4cfb3d7712965b3f346a998fdf3729f68 100644
--- a/src/heap/embedder-tracing.h
+++ b/src/heap/embedder-tracing.h
@@ -17,7 +17,10 @@ class V8_EXPORT_PRIVATE LocalEmbedderHeapTracer final {
public:
typedef std::pair<void*, void*> WrapperInfo;
- LocalEmbedderHeapTracer() : remote_tracer_(nullptr) {}
+ LocalEmbedderHeapTracer()
+ : remote_tracer_(nullptr),
+ num_v8_marking_deque_was_empty_(0),
+ in_final_pause_(false) {}
void SetRemoteTracer(EmbedderHeapTracer* tracer) { remote_tracer_ = tracer; }
bool InUse() { return remote_tracer_ != nullptr; }
@@ -43,11 +46,17 @@ class V8_EXPORT_PRIVATE LocalEmbedderHeapTracer final {
// are too many of them.
bool RequiresImmediateWrapperProcessing();
+ void NotifyV8MarkingDequeWasEmpty() { num_v8_marking_deque_was_empty_++; }
+
private:
typedef std::vector<WrapperInfo> WrapperCache;
+ static const size_t kMaxIncrementalMarkingRounds = 10;
+
EmbedderHeapTracer* remote_tracer_;
WrapperCache cached_wrappers_to_trace_;
+ size_t num_v8_marking_deque_was_empty_;
+ bool in_final_pause_;
};
} // namespace internal
« no previous file with comments | « no previous file | src/heap/embedder-tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698