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

Unified Diff: runtime/vm/thread.cc

Issue 1309033007: Old-gen marking on separate thread (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Ready for review. 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/thread.cc
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index e023331a761015be35ec7cf48302744c5b60bc15..a52c1bc5b8837ba33a4f283bf04bc685704f49f0 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -133,19 +133,19 @@ CACHED_CONSTANTS_LIST(INIT_VALUE)
}
-void Thread::Schedule(Isolate* isolate) {
+void Thread::Schedule(Isolate* isolate, bool bypass_safepoint) {
State st;
- if (isolate->thread_registry()->RestoreStateTo(this, &st)) {
+ if (isolate->thread_registry()->RestoreStateTo(this, &st, bypass_safepoint)) {
ASSERT(isolate->thread_registry()->Contains(this));
state_ = st;
}
}
-void Thread::Unschedule() {
+void Thread::Unschedule(bool bypass_safepoint) {
ThreadRegistry* reg = isolate_->thread_registry();
ASSERT(reg->Contains(this));
- reg->SaveStateFrom(this, state_);
+ reg->SaveStateFrom(this, state_, bypass_safepoint);
ClearState();
}
@@ -189,7 +189,7 @@ void Thread::ExitIsolate() {
}
-void Thread::EnterIsolateAsHelper(Isolate* isolate) {
+void Thread::EnterIsolateAsHelper(Isolate* isolate, bool bypass_safepoint) {
Thread* thread = Thread::Current();
ASSERT(thread != NULL);
ASSERT(thread->isolate() == NULL);
@@ -205,15 +205,15 @@ void Thread::EnterIsolateAsHelper(Isolate* isolate) {
// Do not update isolate->mutator_thread, but perform sanity check:
// this thread should not be both the main mutator and helper.
ASSERT(!isolate->MutatorThreadIsCurrentThread());
- thread->Schedule(isolate);
+ thread->Schedule(isolate, bypass_safepoint);
}
-void Thread::ExitIsolateAsHelper() {
+void Thread::ExitIsolateAsHelper(bool bypass_safepoint) {
Thread* thread = Thread::Current();
Isolate* isolate = thread->isolate();
ASSERT(isolate != NULL);
- thread->Unschedule();
+ thread->Unschedule(bypass_safepoint);
// TODO(koda): Move store_buffer_block_ into State.
thread->StoreBufferRelease();
thread->isolate_ = NULL;
« runtime/vm/gc_marker.cc ('K') | « runtime/vm/thread.h ('k') | runtime/vm/thread_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698