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

Unified Diff: runtime/bin/thread_macos.cc

Issue 2613283002: Fuchsia: Use new call to get thread CPU time (Closed)
Patch Set: Delete dead code Created 3 years, 11 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
« no previous file with comments | « runtime/bin/thread_linux.cc ('k') | runtime/bin/thread_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/thread_macos.cc
diff --git a/runtime/bin/thread_macos.cc b/runtime/bin/thread_macos.cc
index b63b0b929cd61feaadc6bbf1c3e1c962b471d7ff..dc76aaacbb515f0120495587b5fd74f5e54b311e 100644
--- a/runtime/bin/thread_macos.cc
+++ b/runtime/bin/thread_macos.cc
@@ -158,30 +158,6 @@ bool Thread::Compare(ThreadId a, ThreadId b) {
}
-void Thread::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;
-}
-
-
void Thread::InitOnce() {
// Nothing to be done.
}
« no previous file with comments | « runtime/bin/thread_linux.cc ('k') | runtime/bin/thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698