Chromium Code Reviews| Index: base/process/process_metrics_mac.cc |
| diff --git a/base/process/process_metrics_mac.cc b/base/process/process_metrics_mac.cc |
| index 1481f7717f4a2b2fb490063d80a66b0da12db2cf..becd5557ab4285c990e8aba175e1f52855296261 100644 |
| --- a/base/process/process_metrics_mac.cc |
| +++ b/base/process/process_metrics_mac.cc |
| @@ -337,6 +337,17 @@ size_t ProcessMetrics::GetPhysicalFootprint() const { |
| return task_vm_info.phys_footprint; |
| } |
| +size_t GetInternalAndCompressed() const { |
|
Primiano Tucci (use gerrit)
2017/04/25 12:43:35
+ProcessMetrics::
|
| + task_vm_info info; |
| + mach_msg_type_number_t count = TASK_VM_INFO_COUNT; |
| + kern_return_t result = |
| + task_info(TaskForPid(process_), TASK_VM_INFO, |
| + reinterpret_cast<task_info_t>(&info), &count); |
| + if (result != KERN_SUCCESS) |
| + return 0; |
| + return task_vm_info.internal + task_vm_info.compressed; |
| +} |
| + |
| #define TIME_VALUE_TO_TIMEVAL(a, r) do { \ |
| (r)->tv_sec = (a)->seconds; \ |
| (r)->tv_usec = (a)->microseconds; \ |