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

Unified Diff: runtime/vm/thread_registry.h

Issue 1309033007: Old-gen marking on separate thread (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Highlight corresponding phases; finalize results in parallel. 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
« runtime/vm/gc_marker.cc ('K') | « runtime/vm/thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread_registry.h
diff --git a/runtime/vm/thread_registry.h b/runtime/vm/thread_registry.h
index cd94c3f9b4f8e671ad610fe0370c42b634d92269..cb106269c2a526fef36febf0a3810e9c6ab90aa0 100644
--- a/runtime/vm/thread_registry.h
+++ b/runtime/vm/thread_registry.h
@@ -48,10 +48,11 @@ class ThreadRegistry {
CheckSafepointLocked();
}
- bool RestoreStateTo(Thread* thread, Thread::State* state) {
+ bool RestoreStateTo(Thread* thread, Thread::State* state,
+ bool bypass_safepoint) {
MonitorLocker ml(monitor_);
// Wait for any rendezvous in progress.
- while (in_rendezvous_) {
+ while (!bypass_safepoint && in_rendezvous_) {
ml.Wait(Monitor::kNoTimeout);
}
Entry* entry = FindEntry(thread);
@@ -83,14 +84,15 @@ class ThreadRegistry {
return false;
}
- void SaveStateFrom(Thread* thread, const Thread::State& state) {
+ void SaveStateFrom(Thread* thread, const Thread::State& state,
+ bool bypass_safepoint) {
MonitorLocker ml(monitor_);
Entry* entry = FindEntry(thread);
ASSERT(entry != NULL);
ASSERT(entry->scheduled);
entry->scheduled = false;
entry->state = state;
- if (in_rendezvous_) {
+ if (!bypass_safepoint && in_rendezvous_) {
// Don't wait for this thread.
ASSERT(remaining_ > 0);
if (--remaining_ == 0) {
« runtime/vm/gc_marker.cc ('K') | « runtime/vm/thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698