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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 // priv: Pages mapped only by this process. | 56 // priv: Pages mapped only by this process. |
| 57 // shared: PSS or 0 if the kernel doesn't support this. | 57 // shared: PSS or 0 if the kernel doesn't support this. |
| 58 // shareable: 0 | 58 // shareable: 0 |
| 59 | 59 |
| 60 // On ChromeOS: | 60 // On ChromeOS: |
| 61 // priv: Pages mapped only by this process. | 61 // priv: Pages mapped only by this process. |
| 62 // shared: PSS or 0 if the kernel doesn't support this. | 62 // shared: PSS or 0 if the kernel doesn't support this. |
| 63 // shareable: 0 | 63 // shareable: 0 |
| 64 // swapped Pages swapped out to zram. | 64 // swapped Pages swapped out to zram. |
| 65 // | 65 // |
| 66 // On OS X: TODO(thakis): Revise. | 66 // On macOS: |
| 67 // priv: Memory. | 67 // priv: Resident size (RSS) including shared memory. |
|
Alexei Svitkine (slow)
2017/03/29 20:12:26
Note: based on what the GetCommittedAndWorkingSetK
erikchen
2017/03/29 20:25:14
GetCommittedAndWorkingSetKBytes returns pmap->stat
Alexei Svitkine (slow)
2017/03/29 21:02:39
I see - should I just update the TODO to you and r
erikchen
2017/03/29 21:10:38
You're welcome to add a warning and a more accurat
Alexei Svitkine (slow)
2017/03/29 21:16:54
Done. PTAL.
| |
| 68 // shared: 0 | 68 // shared: 0 |
| 69 // shareable: 0 | 69 // shareable: 0 |
| 70 // | 70 // |
| 71 struct WorkingSetKBytes { | 71 struct WorkingSetKBytes { |
| 72 WorkingSetKBytes() : priv(0), shareable(0), shared(0) {} | 72 WorkingSetKBytes() : priv(0), shareable(0), shared(0) {} |
| 73 size_t priv; | 73 size_t priv; |
| 74 size_t shareable; | 74 size_t shareable; |
| 75 size_t shared; | 75 size_t shared; |
| 76 #if defined(OS_CHROMEOS) | 76 #if defined(OS_CHROMEOS) |
| 77 size_t swapped; | 77 size_t swapped; |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 459 SystemDiskInfo disk_info_; | 459 SystemDiskInfo disk_info_; |
| 460 #endif | 460 #endif |
| 461 #if defined(OS_CHROMEOS) | 461 #if defined(OS_CHROMEOS) |
| 462 SwapInfo swap_info_; | 462 SwapInfo swap_info_; |
| 463 #endif | 463 #endif |
| 464 }; | 464 }; |
| 465 | 465 |
| 466 } // namespace base | 466 } // namespace base |
| 467 | 467 |
| 468 #endif // BASE_PROCESS_PROCESS_METRICS_H_ | 468 #endif // BASE_PROCESS_PROCESS_METRICS_H_ |
| OLD | NEW |