OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "base/process/process_metrics.h" | 5 #include "base/process/process_metrics.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 | 14 |
| 15 SystemMemoryInfoKB::SystemMemoryInfoKB() = default; |
| 16 |
| 17 SystemMemoryInfoKB::SystemMemoryInfoKB(const SystemMemoryInfoKB& other) = |
| 18 default; |
| 19 |
15 SystemMetrics::SystemMetrics() { | 20 SystemMetrics::SystemMetrics() { |
16 committed_memory_ = 0; | 21 committed_memory_ = 0; |
17 } | 22 } |
18 | 23 |
19 SystemMetrics SystemMetrics::Sample() { | 24 SystemMetrics SystemMetrics::Sample() { |
20 SystemMetrics system_metrics; | 25 SystemMetrics system_metrics; |
21 | 26 |
22 system_metrics.committed_memory_ = GetSystemCommitCharge(); | 27 system_metrics.committed_memory_ = GetSystemCommitCharge(); |
23 #if defined(OS_LINUX) || defined(OS_ANDROID) | 28 #if defined(OS_LINUX) || defined(OS_ANDROID) |
24 GetSystemMemoryInfo(&system_metrics.memory_info_); | 29 GetSystemMemoryInfo(&system_metrics.memory_info_); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 return (wakeups_delta_for_ms + time_delta / 2) / time_delta; | 95 return (wakeups_delta_for_ms + time_delta / 2) / time_delta; |
91 } | 96 } |
92 #else | 97 #else |
93 int ProcessMetrics::GetIdleWakeupsPerSecond() { | 98 int ProcessMetrics::GetIdleWakeupsPerSecond() { |
94 NOTIMPLEMENTED(); // http://crbug.com/120488 | 99 NOTIMPLEMENTED(); // http://crbug.com/120488 |
95 return 0; | 100 return 0; |
96 } | 101 } |
97 #endif // defined(OS_MACOSX) || defined(OS_LINUX) | 102 #endif // defined(OS_MACOSX) || defined(OS_LINUX) |
98 | 103 |
99 } // namespace base | 104 } // namespace base |
OLD | NEW |