| Index: runtime/vm/timeline.cc
|
| diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc
|
| index d8407670acaef205d6764a114ec95cb0a5b94e40..f5e20cd840cd40f19af008ebdfa2ed632be98370 100644
|
| --- a/runtime/vm/timeline.cc
|
| +++ b/runtime/vm/timeline.cc
|
| @@ -126,9 +126,9 @@ void Timeline::ReclaimCachedBlocksFromThreads() {
|
| }
|
|
|
| // Iterate over threads.
|
| - ThreadIterator it;
|
| + OSThreadIterator it;
|
| while (it.HasNext()) {
|
| - Thread* thread = it.Next();
|
| + OSThread* thread = it.Next();
|
| MutexLocker ml(thread->timeline_block_lock());
|
| // Grab block and clear it.
|
| TimelineEventBlock* block = thread->timeline_block();
|
| @@ -641,9 +641,9 @@ TimelineEventRecorder::TimelineEventRecorder()
|
|
|
|
|
| void TimelineEventRecorder::PrintJSONMeta(JSONArray* events) const {
|
| - ThreadIterator it;
|
| + OSThreadIterator it;
|
| while (it.HasNext()) {
|
| - Thread* thread = it.Next();
|
| + OSThread* thread = it.Next();
|
| const char* thread_name = thread->name();
|
| if (thread_name == NULL) {
|
| // Only emit a thread name if one was set.
|
| @@ -666,7 +666,7 @@ void TimelineEventRecorder::PrintJSONMeta(JSONArray* events) const {
|
|
|
| TimelineEvent* TimelineEventRecorder::ThreadBlockStartEvent() {
|
| // Grab the current thread.
|
| - Thread* thread = Thread::Current();
|
| + OSThread* thread = OSThread::Current();
|
| ASSERT(thread != NULL);
|
| Mutex* thread_block_lock = thread->timeline_block_lock();
|
| ASSERT(thread_block_lock != NULL);
|
| @@ -707,7 +707,7 @@ void TimelineEventRecorder::ThreadBlockCompleteEvent(TimelineEvent* event) {
|
| return;
|
| }
|
| // Grab the current thread.
|
| - Thread* thread = Thread::Current();
|
| + OSThread* thread = OSThread::Current();
|
| ASSERT(thread != NULL);
|
| // Unlock the thread's block lock.
|
| Mutex* thread_block_lock = thread->timeline_block_lock();
|
| @@ -901,9 +901,6 @@ intptr_t TimelineEventRingRecorder::FindOldestBlockIndex() const {
|
|
|
|
|
| TimelineEvent* TimelineEventRingRecorder::StartEvent() {
|
| - // Grab the current thread.
|
| - Thread* thread = Thread::Current();
|
| - ASSERT(thread != NULL);
|
| return ThreadBlockStartEvent();
|
| }
|
|
|
| @@ -986,9 +983,6 @@ TimelineEventBlock* TimelineEventEndlessRecorder::GetHeadBlockLocked() {
|
|
|
|
|
| TimelineEvent* TimelineEventEndlessRecorder::StartEvent() {
|
| - // Grab the current thread.
|
| - Thread* thread = Thread::Current();
|
| - ASSERT(thread != NULL);
|
| return ThreadBlockStartEvent();
|
| }
|
|
|
| @@ -1045,7 +1039,7 @@ void TimelineEventEndlessRecorder::Clear() {
|
| }
|
| head_ = NULL;
|
| block_index_ = 0;
|
| - Thread* thread = Thread::Current();
|
| + OSThread* thread = OSThread::Current();
|
| thread->set_timeline_block(NULL);
|
| }
|
|
|
|
|