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

Unified Diff: runtime/platform/thread_win.cc

Issue 109803002: Profiler Take 2 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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/platform/thread_macos.cc ('k') | runtime/tests/vm/vm.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/thread_win.cc
diff --git a/runtime/platform/thread_win.cc b/runtime/platform/thread_win.cc
index f4494aef0cf5d669987037cec4e9508a8236f23f..afbae8b7afe20e6be0fddc238e4bf92de783cc0d 100644
--- a/runtime/platform/thread_win.cc
+++ b/runtime/platform/thread_win.cc
@@ -99,7 +99,8 @@ void ThreadInlineImpl::DestroyThreadId(ThreadId thread_id) {
ThreadLocalKey ThreadInlineImpl::thread_id_key = Thread::kUnsetThreadLocalKey;
ThreadLocalKey Thread::kUnsetThreadLocalKey = TLS_OUT_OF_INDEXES;
-
+ThreadId Thread::kInvalidThreadId =
+ reinterpret_cast<ThreadId>(INVALID_HANDLE_VALUE);
ThreadLocalKey Thread::CreateThreadLocal() {
ThreadLocalKey key = TlsAlloc();
@@ -133,6 +134,17 @@ ThreadId Thread::GetCurrentThreadId() {
}
+intptr_t Thread::ThreadIdToIntPtr(ThreadId id) {
+ ASSERT(sizeof(id) == sizeof(intptr_t));
+ return reinterpret_cast<intptr_t>(id);
+}
+
+
+bool Thread::Compare(ThreadId a, ThreadId b) {
+ return a == b;
+}
+
+
void Thread::GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage) {
static const int64_t kTimeEpoc = 116444736000000000LL;
static const int64_t kTimeScaler = 10; // 100 ns to us.
« no previous file with comments | « runtime/platform/thread_macos.cc ('k') | runtime/tests/vm/vm.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698