OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include <cstdlib> | 5 #include <cstdlib> |
6 | 6 |
7 #include "vm/atomic.h" | 7 #include "vm/atomic.h" |
8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
9 #include "vm/json_stream.h" | 9 #include "vm/json_stream.h" |
10 #include "vm/lockers.h" | 10 #include "vm/lockers.h" |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 } | 333 } |
334 } | 334 } |
335 | 335 |
336 | 336 |
337 void TimelineEvent::Init(EventType event_type, | 337 void TimelineEvent::Init(EventType event_type, |
338 const char* label) { | 338 const char* label) { |
339 ASSERT(label != NULL); | 339 ASSERT(label != NULL); |
340 set_event_type(event_type); | 340 set_event_type(event_type); |
341 timestamp0_ = 0; | 341 timestamp0_ = 0; |
342 timestamp1_ = 0; | 342 timestamp1_ = 0; |
343 thread_ = OSThread::GetCurrentThreadId(); | 343 thread_ = OSThread::GetCurrentThreadTraceId(); |
344 isolate_ = Isolate::Current(); | 344 isolate_ = Isolate::Current(); |
345 label_ = label; | 345 label_ = label; |
346 FreeArguments(); | 346 FreeArguments(); |
347 } | 347 } |
348 | 348 |
349 | 349 |
350 void TimelineEvent::PrintJSON(JSONStream* stream) const { | 350 void TimelineEvent::PrintJSON(JSONStream* stream) const { |
351 JSONObject obj(stream); | 351 JSONObject obj(stream); |
352 int64_t pid = OS::ProcessId(); | 352 int64_t pid = OS::ProcessId(); |
353 int64_t tid = OSThread::ThreadIdToIntPtr(thread_); | 353 int64_t tid = OSThread::ThreadIdToIntPtr(thread_); |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 | 994 |
995 | 995 |
996 TimelineEventBlock* TimelineEventBlockIterator::Next() { | 996 TimelineEventBlock* TimelineEventBlockIterator::Next() { |
997 ASSERT(current_ != NULL); | 997 ASSERT(current_ != NULL); |
998 TimelineEventBlock* r = current_; | 998 TimelineEventBlock* r = current_; |
999 current_ = current_->next(); | 999 current_ = current_->next(); |
1000 return r; | 1000 return r; |
1001 } | 1001 } |
1002 | 1002 |
1003 } // namespace dart | 1003 } // namespace dart |
OLD | NEW |