Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_TASK_MANAGER_SAMPLING_TASK_GROUP_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_SAMPLING_TASK_GROUP_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGER_SAMPLING_TASK_GROUP_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_SAMPLING_TASK_GROUP_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 base::TimeDelta cpu_time() const { return cpu_time_; } | 73 base::TimeDelta cpu_time() const { return cpu_time_; } |
| 74 int64_t private_bytes() const { return memory_usage_.private_bytes; } | 74 int64_t private_bytes() const { return memory_usage_.private_bytes; } |
| 75 int64_t shared_bytes() const { return memory_usage_.shared_bytes; } | 75 int64_t shared_bytes() const { return memory_usage_.shared_bytes; } |
| 76 int64_t physical_bytes() const { return memory_usage_.physical_bytes; } | 76 int64_t physical_bytes() const { return memory_usage_.physical_bytes; } |
| 77 #if defined(OS_CHROMEOS) | 77 #if defined(OS_CHROMEOS) |
| 78 int64_t swapped_bytes() const { return memory_usage_.swapped_bytes; } | 78 int64_t swapped_bytes() const { return memory_usage_.swapped_bytes; } |
| 79 #endif | 79 #endif |
| 80 int64_t gpu_memory() const { return gpu_memory_; } | 80 int64_t gpu_memory() const { return gpu_memory_; } |
| 81 bool gpu_memory_has_duplicates() const { return gpu_memory_has_duplicates_; } | 81 bool gpu_memory_has_duplicates() const { return gpu_memory_has_duplicates_; } |
| 82 base::MemoryState memory_state() const { return memory_state_; } | 82 base::MemoryState memory_state() const { return memory_state_; } |
| 83 int64_t per_process_network_usage() const { | 83 int64_t per_process_network_usage_rate() const { |
| 84 return per_process_network_usage_; | 84 return per_process_network_usage_rate_; |
| 85 } | |
| 86 int64_t cumulative_per_process_network_usage() const { | |
| 87 return cumulative_per_process_network_usage_; | |
| 85 } | 88 } |
| 86 bool is_backgrounded() const { return is_backgrounded_; } | 89 bool is_backgrounded() const { return is_backgrounded_; } |
| 87 | 90 |
| 88 #if defined(OS_WIN) | 91 #if defined(OS_WIN) |
| 89 int64_t gdi_current_handles() const { return gdi_current_handles_; } | 92 int64_t gdi_current_handles() const { return gdi_current_handles_; } |
| 90 int64_t gdi_peak_handles() const { return gdi_peak_handles_; } | 93 int64_t gdi_peak_handles() const { return gdi_peak_handles_; } |
| 91 int64_t user_current_handles() const { return user_current_handles_; } | 94 int64_t user_current_handles() const { return user_current_handles_; } |
| 92 int64_t user_peak_handles() const { return user_peak_handles_; } | 95 int64_t user_peak_handles() const { return user_peak_handles_; } |
| 93 #endif // defined(OS_WIN) | 96 #endif // defined(OS_WIN) |
| 94 | 97 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 | 158 |
| 156 // The per process resources usages. | 159 // The per process resources usages. |
| 157 double cpu_usage_; | 160 double cpu_usage_; |
| 158 base::Time start_time_; // Only calculated On Windows now. | 161 base::Time start_time_; // Only calculated On Windows now. |
| 159 base::TimeDelta cpu_time_; // Only calculated On Windows now. | 162 base::TimeDelta cpu_time_; // Only calculated On Windows now. |
| 160 MemoryUsageStats memory_usage_; | 163 MemoryUsageStats memory_usage_; |
| 161 int64_t gpu_memory_; | 164 int64_t gpu_memory_; |
| 162 base::MemoryState memory_state_; | 165 base::MemoryState memory_state_; |
| 163 // The network usage in bytes per second as the sum of all network usages of | 166 // The network usage in bytes per second as the sum of all network usages of |
| 164 // the individual tasks sharing the same process. | 167 // the individual tasks sharing the same process. |
| 165 int64_t per_process_network_usage_; | 168 int64_t per_process_network_usage_rate_; |
| 169 | |
| 170 // The total(sum) network usage in bytes as the sum of all network usages of | |
|
ncarter (slow)
2017/06/16 22:28:30
"A continuously updating sum of all bytes that hav
cburn
2017/06/19 22:07:08
Done.
| |
| 171 // individual tasks sharing the same process. | |
| 172 int64_t cumulative_per_process_network_usage_; | |
| 173 | |
| 166 #if defined(OS_WIN) | 174 #if defined(OS_WIN) |
| 167 // Windows GDI and USER Handles. | 175 // Windows GDI and USER Handles. |
| 168 int64_t gdi_current_handles_; | 176 int64_t gdi_current_handles_; |
| 169 int64_t gdi_peak_handles_; | 177 int64_t gdi_peak_handles_; |
| 170 int64_t user_current_handles_; | 178 int64_t user_current_handles_; |
| 171 int64_t user_peak_handles_; | 179 int64_t user_peak_handles_; |
| 172 #endif // defined(OS_WIN) | 180 #endif // defined(OS_WIN) |
| 173 #if !defined(DISABLE_NACL) | 181 #if !defined(DISABLE_NACL) |
| 174 int nacl_debug_stub_port_; | 182 int nacl_debug_stub_port_; |
| 175 #endif // !defined(DISABLE_NACL) | 183 #endif // !defined(DISABLE_NACL) |
| 176 int idle_wakeups_per_second_; | 184 int idle_wakeups_per_second_; |
| 177 #if defined(OS_LINUX) | 185 #if defined(OS_LINUX) |
| 178 // The number of file descriptors currently open by the process. | 186 // The number of file descriptors currently open by the process. |
| 179 int open_fd_count_; | 187 int open_fd_count_; |
| 180 #endif // defined(OS_LINUX) | 188 #endif // defined(OS_LINUX) |
| 181 bool gpu_memory_has_duplicates_; | 189 bool gpu_memory_has_duplicates_; |
| 182 bool is_backgrounded_; | 190 bool is_backgrounded_; |
| 183 | 191 |
| 184 // Always keep this the last member of this class so that it's the first to be | 192 // Always keep this the last member of this class so that it's the first to be |
| 185 // destroyed. | 193 // destroyed. |
| 186 base::WeakPtrFactory<TaskGroup> weak_ptr_factory_; | 194 base::WeakPtrFactory<TaskGroup> weak_ptr_factory_; |
| 187 | 195 |
| 188 DISALLOW_COPY_AND_ASSIGN(TaskGroup); | 196 DISALLOW_COPY_AND_ASSIGN(TaskGroup); |
| 189 }; | 197 }; |
| 190 | 198 |
| 191 } // namespace task_manager | 199 } // namespace task_manager |
| 192 | 200 |
| 193 #endif // CHROME_BROWSER_TASK_MANAGER_SAMPLING_TASK_GROUP_H_ | 201 #endif // CHROME_BROWSER_TASK_MANAGER_SAMPLING_TASK_GROUP_H_ |
| OLD | NEW |