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

Unified Diff: runtime/vm/pages.cc

Issue 1292353004: Safepointing in GC (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove obsolete TODO. Created 5 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/pages.cc
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index f45c5b04a95f5715b7f77d3ab3e2ccd2571e8ffe..55e5fa0dcc8f2313b55d54517068f63dcdf52365 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -11,6 +11,7 @@
#include "vm/lockers.h"
#include "vm/object.h"
#include "vm/os_thread.h"
+#include "vm/thread_registry.h"
#include "vm/verified_memory.h"
#include "vm/virtual_memory.h"
@@ -768,6 +769,8 @@ void PageSpace::MarkSweep(bool invoke_api_callbacks) {
set_tasks(1);
}
+ isolate->thread_registry()->SafepointThreads();
Ivan Posva 2015/08/25 23:27:15 // Ensure that all threads for this isolate are at
koda 2015/08/26 01:09:14 Done.
+
// Perform various cleanup that relies on no tasks interfering.
isolate->class_table()->FreeOldTables();
@@ -907,6 +910,8 @@ void PageSpace::MarkSweep(bool invoke_api_callbacks) {
freelist_[HeapPage::kExecutable].Print();
}
+ isolate->thread_registry()->ResumeAllThreads();
+
// Done, reset the task count.
{
MonitorLocker ml(tasks_lock());
« no previous file with comments | « runtime/vm/gc_sweeper.cc ('k') | runtime/vm/scavenger.cc » ('j') | runtime/vm/scavenger.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698