Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file contains routines for gathering resource statistics for processes | 5 // This file contains routines for gathering resource statistics for processes |
| 6 // running on the system. | 6 // running on the system. |
| 7 | 7 |
| 8 #ifndef BASE_PROCESS_PROCESS_METRICS_H_ | 8 #ifndef BASE_PROCESS_PROCESS_METRICS_H_ |
| 9 #define BASE_PROCESS_PROCESS_METRICS_H_ | 9 #define BASE_PROCESS_PROCESS_METRICS_H_ |
| 10 | 10 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 | 195 |
| 196 ProcessHandle process_; | 196 ProcessHandle process_; |
| 197 | 197 |
| 198 int processor_count_; | 198 int processor_count_; |
| 199 | 199 |
| 200 // Used to store the previous times and CPU usage counts so we can | 200 // Used to store the previous times and CPU usage counts so we can |
| 201 // compute the CPU usage between calls. | 201 // compute the CPU usage between calls. |
| 202 TimeTicks last_cpu_time_; | 202 TimeTicks last_cpu_time_; |
| 203 int64 last_system_time_; | 203 int64 last_system_time_; |
| 204 | 204 |
| 205 #if defined(OS_MACOSX) | |
|
Lei Zhang
2014/09/06 09:31:57
OS X only variables
| |
| 205 // Same thing for idle wakeups. | 206 // Same thing for idle wakeups. |
| 206 TimeTicks last_idle_wakeups_time_; | 207 TimeTicks last_idle_wakeups_time_; |
| 207 int64 last_absolute_idle_wakeups_; | 208 uint64 last_absolute_idle_wakeups_; |
|
Lei Zhang
2014/09/06 09:31:57
in process_metrics_mac.cc, the value from OS X is
| |
| 209 #endif | |
| 208 | 210 |
| 209 #if !defined(OS_IOS) | 211 #if !defined(OS_IOS) |
| 210 #if defined(OS_MACOSX) | 212 #if defined(OS_MACOSX) |
| 211 // Queries the port provider if it's set. | 213 // Queries the port provider if it's set. |
| 212 mach_port_t TaskForPid(ProcessHandle process) const; | 214 mach_port_t TaskForPid(ProcessHandle process) const; |
| 213 | 215 |
| 214 PortProvider* port_provider_; | 216 PortProvider* port_provider_; |
| 215 #elif defined(OS_POSIX) | 217 #elif defined(OS_POSIX) |
| 216 // Jiffie count at the last_cpu_time_ we updated. | 218 // Jiffie count at the last_cpu_time_ we updated. |
| 217 int last_cpu_; | 219 int last_cpu_; |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 377 SystemDiskInfo disk_info_; | 379 SystemDiskInfo disk_info_; |
| 378 #endif | 380 #endif |
| 379 #if defined(OS_CHROMEOS) | 381 #if defined(OS_CHROMEOS) |
| 380 SwapInfo swap_info_; | 382 SwapInfo swap_info_; |
| 381 #endif | 383 #endif |
| 382 }; | 384 }; |
| 383 | 385 |
| 384 } // namespace base | 386 } // namespace base |
| 385 | 387 |
| 386 #endif // BASE_PROCESS_PROCESS_METRICS_H_ | 388 #endif // BASE_PROCESS_PROCESS_METRICS_H_ |
| OLD | NEW |