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

Unified Diff: runtime/lib/timeline.cc

Issue 1439483003: - Add an OSThread structure which is the generic TLS structure for all C++ (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review 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 | « no previous file | runtime/vm/dart.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/timeline.cc
diff --git a/runtime/lib/timeline.cc b/runtime/lib/timeline.cc
index a26c847cf74b6ba3f50e20eeda39851a73f256f2..39fa28babfc9d18178f2124c0a656b6f82c2fb6e 100644
--- a/runtime/lib/timeline.cc
+++ b/runtime/lib/timeline.cc
@@ -55,7 +55,9 @@ DEFINE_NATIVE_ENTRY(Timeline_reportTaskEvent, 6) {
}
int64_t pid = OS::ProcessId();
- int64_t tid = OSThread::ThreadIdToIntPtr(OSThread::GetCurrentThreadTraceId());
+ OSThread* os_thread = thread->os_thread();
+ ASSERT(os_thread != NULL);
+ int64_t tid = OSThread::ThreadIdToIntPtr(os_thread->trace_id());
char* json = OS::SCreate(zone,
"{\"name\":\"%s\",\"cat\":\"%s\",\"tid\":%" Pd64 ",\"pid\":%" Pd64 ","
@@ -101,7 +103,9 @@ DEFINE_NATIVE_ENTRY(Timeline_reportCompleteEvent, 5) {
int64_t duration = end.AsInt64Value() - start.AsInt64Value();
int64_t pid = OS::ProcessId();
- int64_t tid = OSThread::ThreadIdToIntPtr(OSThread::GetCurrentThreadTraceId());
+ OSThread* os_thread = thread->os_thread();
+ ASSERT(os_thread != NULL);
+ int64_t tid = OSThread::ThreadIdToIntPtr(os_thread->trace_id());
char* json = OS::SCreate(zone,
"{\"name\":\"%s\",\"cat\":\"%s\",\"tid\":%" Pd64 ",\"pid\":%" Pd64 ","
@@ -144,7 +148,9 @@ DEFINE_NATIVE_ENTRY(Timeline_reportInstantEvent, 4) {
}
int64_t pid = OS::ProcessId();
- int64_t tid = OSThread::ThreadIdToIntPtr(OSThread::GetCurrentThreadTraceId());
+ OSThread* os_thread = thread->os_thread();
+ ASSERT(os_thread != NULL);
+ int64_t tid = OSThread::ThreadIdToIntPtr(os_thread->trace_id());
char* json = OS::SCreate(zone,
"{\"name\":\"%s\",\"cat\":\"%s\",\"tid\":%" Pd64 ",\"pid\":%" Pd64 ","
« no previous file with comments | « no previous file | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698