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

Unified Diff: runtime/vm/thread.cc

Issue 1275113003: Endless thread safe timeline recorder (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 aa4f67ea92a647b00488f466a0e6f9ed26af02e4..a14d5b81848ba36c95fd24f64b129323b555abbe 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -108,6 +108,15 @@ void Thread::Schedule(Isolate* isolate) {
ASSERT(isolate->thread_registry()->Contains(this));
state_ = st;
}
+ PostSchedule();
+}
+
+
+void Thread::PostSchedule() {
+ if ((current_block() == NULL) || current_block()->IsFull()) {
+ // Thread doesn't have a timeline block or it is full, request a new one.
koda 2015/08/07 01:09:54 Why not let these cases be handled naturally when
Cutch 2015/08/07 16:47:42 Done.
+ set_current_block(isolate_->GetNewTimelineBlock());
+ }
}

Powered by Google App Engine
This is Rietveld 408576698