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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
161 // is more efficient on Mac OS X, as the two can be retrieved with a single | 161 // is more efficient on Mac OS X, as the two can be retrieved with a single |
162 // system call. | 162 // system call. |
163 bool GetCommittedAndWorkingSetKBytes(CommittedKBytes* usage, | 163 bool GetCommittedAndWorkingSetKBytes(CommittedKBytes* usage, |
164 WorkingSetKBytes* ws_usage) const; | 164 WorkingSetKBytes* ws_usage) const; |
165 | 165 |
166 // Returns the physical footprint, only available on macOS 10.11+. This | 166 // Returns the physical footprint, only available on macOS 10.11+. This |
167 // measures anonymous, non-discardable memory. Returns 0 on error, or if the | 167 // measures anonymous, non-discardable memory. Returns 0 on error, or if the |
168 // measurement was unavailable. | 168 // measurement was unavailable. |
169 size_t GetPhysicalFootprint() const; | 169 size_t GetPhysicalFootprint() const; |
170 | 170 |
171 // Returns the sum of internal and compressed memory. This measures anonymous, | |
172 // non-discardable memory, excluding IOKit. | |
173 size_t GetInternalAndCompressed() const; | |
Primiano Tucci (use gerrit)
2017/04/25 12:43:35
Not an owner here but I guess an "unit" in the nam
| |
174 | |
171 // Returns private, shared, and total resident bytes. |locked_bytes| refers to | 175 // Returns private, shared, and total resident bytes. |locked_bytes| refers to |
172 // bytes that must stay resident. |locked_bytes| only counts bytes locked by | 176 // bytes that must stay resident. |locked_bytes| only counts bytes locked by |
173 // this task, not bytes locked by the kernel. | 177 // this task, not bytes locked by the kernel. |
174 bool GetMemoryBytes(size_t* private_bytes, | 178 bool GetMemoryBytes(size_t* private_bytes, |
175 size_t* shared_bytes, | 179 size_t* shared_bytes, |
176 size_t* resident_bytes, | 180 size_t* resident_bytes, |
177 size_t* locked_bytes) const; | 181 size_t* locked_bytes) const; |
178 #endif | 182 #endif |
179 | 183 |
180 // Returns the CPU usage in percent since the last time this method or | 184 // Returns the CPU usage in percent since the last time this method or |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 SystemDiskInfo disk_info_; | 484 SystemDiskInfo disk_info_; |
481 #endif | 485 #endif |
482 #if defined(OS_CHROMEOS) | 486 #if defined(OS_CHROMEOS) |
483 SwapInfo swap_info_; | 487 SwapInfo swap_info_; |
484 #endif | 488 #endif |
485 }; | 489 }; |
486 | 490 |
487 } // namespace base | 491 } // namespace base |
488 | 492 |
489 #endif // BASE_PROCESS_PROCESS_METRICS_H_ | 493 #endif // BASE_PROCESS_PROCESS_METRICS_H_ |
OLD | NEW |