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

Unified Diff: runtime/vm/os_thread_macos.cc

Issue 1960483002: Include thread CPU time in Timeline (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/os_thread_macos.cc
diff --git a/runtime/vm/os_thread_macos.cc b/runtime/vm/os_thread_macos.cc
index 42dd360972387225cddb0b2644e3dd155aa78084..4c7d094d9f37ac20d011e28778852c22fac00544 100644
--- a/runtime/vm/os_thread_macos.cc
+++ b/runtime/vm/os_thread_macos.cc
@@ -195,30 +195,6 @@ bool OSThread::Compare(ThreadId a, ThreadId b) {
}
-void OSThread::GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage) {
- ASSERT(thread_id == GetCurrentThreadId());
- ASSERT(cpu_usage != NULL);
- // TODO(johnmccutchan): Enable this after fixing issue with macos directory
- // watcher.
- const bool get_cpu_usage = false;
- if (get_cpu_usage) {
- mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
- thread_basic_info_data_t info_data;
- thread_basic_info_t info = &info_data;
- mach_port_t thread_port = mach_thread_self();
- kern_return_t r = thread_info(thread_port, THREAD_BASIC_INFO,
- (thread_info_t)info, &count);
- mach_port_deallocate(mach_task_self(), thread_port);
- if (r == KERN_SUCCESS) {
- *cpu_usage = (info->user_time.seconds * kMicrosecondsPerSecond) +
- info->user_time.microseconds;
- return;
- }
- }
- *cpu_usage = 0;
-}
-
-
Mutex::Mutex() {
pthread_mutexattr_t attr;
int result = pthread_mutexattr_init(&attr);

Powered by Google App Engine
This is Rietveld 408576698