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

Unified Diff: runtime/vm/scavenger.cc

Issue 1292353004: Safepointing in GC (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Scavenger again. 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 eac850151aaafdfdb4c42bae5dce5a2b99e2940a..4da52556c564fab6440c3d33c797ae063b07e854 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,8 @@ void Scavenger::Scavenge(bool invoke_api_callbacks) {
ASSERT(!scavenging_);
scavenging_ = true;
Isolate* isolate = heap_->isolate();
+ // TODO(koda): Allow concurrent sweeper to keep running.
+ isolate->thread_registry()->SafepointThreads();
PageSpace* page_space = heap_->old_space();
NoSafepointScope no_safepoints;
@@ -858,6 +861,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/gc_sweeper.cc ('K') | « runtime/vm/pages.cc ('k') | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698