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

Unified Diff: runtime/vm/scavenger.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/scavenger.cc
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index f154078809a9e83688f25035e2199f177a4074d9..285354c51501ca2d241204f9acc9678d771d75e1 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -16,6 +16,7 @@
#include "vm/object_id_ring.h"
#include "vm/stack_frame.h"
#include "vm/store_buffer.h"
+#include "vm/thread_registry.h"
#include "vm/verified_memory.h"
#include "vm/verifier.h"
#include "vm/visitor.h"
@@ -803,6 +804,9 @@ void Scavenger::Scavenge(bool invoke_api_callbacks) {
ASSERT(!scavenging_);
scavenging_ = true;
Isolate* isolate = heap_->isolate();
+
+ isolate->thread_registry()->SafepointThreads();
Ivan Posva 2015/08/25 23:27:15 ditto about the comment. Also please explain what
koda 2015/08/26 01:09:14 Done. Added TODO about avoiding the possibility o
+
PageSpace* page_space = heap_->old_space();
NoSafepointScope no_safepoints;
@@ -858,6 +862,8 @@ void Scavenger::Scavenge(bool invoke_api_callbacks) {
OS::PrintErr(" done.\n");
}
+ isolate->thread_registry()->ResumeAllThreads();
+
// Done scavenging. Reset the marker.
ASSERT(scavenging_);
scavenging_ = false;
« runtime/vm/pages.cc ('K') | « runtime/vm/pages.cc ('k') | runtime/vm/thread_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698