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

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: review 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
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ed6ac3ed19e2671b5fc6fcd46e12ff721ce4da2c 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);
+ PageSpace* old_space = isolate->heap()->old_space();
+ MonitorLocker ml(old_space->tasks_lock());
+ old_space->set_tasks(old_space->tasks() + 1);
ml.Notify();
}
@@ -46,9 +46,9 @@ void BackgroundFinalizer::Run() {
Thread::ExitIsolateAsHelper();
{
- Heap* heap = isolate_->heap();
- MonitorLocker ml(heap->finalization_tasks_lock());
- heap->set_finalization_tasks(heap->finalization_tasks() - 1);
+ PageSpace* old_space = isolate_->heap()->old_space();
+ MonitorLocker ml(old_space->tasks_lock());
+ old_space->set_tasks(old_space->tasks() - 1);
ml.Notify();
}
}
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698