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

Side by Side Diff: runtime/vm/timeline.cc

Issue 1368793002: Add OSThread::GetCurrentThreadTraceId and use it in the timeline implementation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/os_thread_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/os_thread_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698