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

Unified Diff: runtime/vm/thread.h

Issue 1406413006: Timeline service protocol support with Observatory UI (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread.h
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 34e3767e6d0e89f2b5d0c89919d83c631d395eed..11e564a0ba29a784f366b255fe43bbe633b460e8 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -363,6 +363,21 @@ LEAF_RUNTIME_ENTRY_LIST(DEFINE_OFFSET_METHOD)
return join_id_;
}
+ ThreadId trace_id() const {
+ ASSERT(trace_id_ != OSThread::kInvalidThreadJoinId);
+ return trace_id_;
+ }
+
+ const char* name() const {
+ return name_;
+ }
+
+ void set_name(const char* name) {
+ ASSERT(Thread::Current() == this);
+ ASSERT(name_ == NULL);
+ name_ = name;
+ }
+
// Used to temporarily disable or enable thread interrupts.
void DisableThreadInterrupts();
void EnableThreadInterrupts();
@@ -410,6 +425,7 @@ LEAF_RUNTIME_ENTRY_LIST(DEFINE_OFFSET_METHOD)
const ThreadId id_;
const ThreadId join_id_;
+ const ThreadId trace_id_;
uintptr_t thread_interrupt_disabled_;
Isolate* isolate_;
Heap* heap_;
@@ -459,6 +475,9 @@ LEAF_RUNTIME_ENTRY_LIST(DECLARE_MEMBERS)
// All |Thread|s are registered in the thread list.
Thread* thread_list_next_;
+ // A name for this thread.
+ const char* name_;
+
static Thread* thread_list_head_;
static Mutex* thread_list_lock_;
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698