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

Unified Diff: runtime/vm/dart_api_state.cc

Issue 2281193002: Treat background finalization as another GC task so it won't run in parallel with the marker. (Closed)
Patch Set: Created 4 years, 4 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
Index: runtime/vm/dart_api_state.cc
diff --git a/runtime/vm/dart_api_state.cc b/runtime/vm/dart_api_state.cc
index be30a2d5d5258a24423ce38af1ecc3ae4d4a7631..57be5276ec955eaea8017f631c8162359311e1e2 100644
--- a/runtime/vm/dart_api_state.cc
+++ b/runtime/vm/dart_api_state.cc
@@ -19,9 +19,9 @@ BackgroundFinalizer::BackgroundFinalizer(Isolate* isolate,
isolate_(isolate),
queue_(queue) {
ASSERT(FLAG_background_finalization);
- MonitorLocker ml(isolate->heap()->finalization_tasks_lock());
- isolate->heap()->set_finalization_tasks(
- isolate->heap()->finalization_tasks() + 1);
+ MonitorLocker ml(isolate->heap()->old_space()->tasks_lock());
+ isolate->heap()->old_space()->set_tasks(
+ isolate->heap()->old_space()->tasks() + 1);
siva 2016/08/29 22:05:09 PageSpace* old_space = heap_->old_space(); Monitor
rmacnak 2016/08/29 23:09:45 Done.
ml.Notify();
}
@@ -47,8 +47,8 @@ void BackgroundFinalizer::Run() {
{
Heap* heap = isolate_->heap();
- MonitorLocker ml(heap->finalization_tasks_lock());
- heap->set_finalization_tasks(heap->finalization_tasks() - 1);
+ MonitorLocker ml(heap->old_space()->tasks_lock());
+ heap->old_space()->set_tasks(heap->old_space()->tasks() - 1);
siva 2016/08/29 22:05:09 Ditto comment.
rmacnak 2016/08/29 23:09:45 Done.
ml.Notify();
}
}

Powered by Google App Engine
This is Rietveld 408576698