Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: base/process/process_metrics.h

Issue 2740423002: mac: Fix calulation for number of resident pages in a process. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 size_t GetPeakPagefileUsage() const; 129 size_t GetPeakPagefileUsage() const;
130 // Returns the current working set size, in bytes. On Linux, this returns 130 // Returns the current working set size, in bytes. On Linux, this returns
131 // the resident set size. 131 // the resident set size.
132 size_t GetWorkingSetSize() const; 132 size_t GetWorkingSetSize() const;
133 // Returns the peak working set size, in bytes. 133 // Returns the peak working set size, in bytes.
134 size_t GetPeakWorkingSetSize() const; 134 size_t GetPeakWorkingSetSize() const;
135 // Returns private and sharedusage, in bytes. Private bytes is the amount of 135 // Returns private and sharedusage, in bytes. Private bytes is the amount of
136 // memory currently allocated to a process that cannot be shared. Returns 136 // memory currently allocated to a process that cannot be shared. Returns
137 // false on platform specific error conditions. Note: |private_bytes| 137 // false on platform specific error conditions. Note: |private_bytes|
138 // returns 0 on unsupported OSes: prior to XP SP2. 138 // returns 0 on unsupported OSes: prior to XP SP2.
139 bool GetMemoryBytes(size_t* private_bytes, 139 bool GetMemoryBytes(size_t* private_bytes, size_t* shared_bytes) const;
140 size_t* shared_bytes);
141 // Fills a CommittedKBytes with both resident and paged 140 // Fills a CommittedKBytes with both resident and paged
142 // memory usage as per definition of CommittedBytes. 141 // memory usage as per definition of CommittedBytes.
143 void GetCommittedKBytes(CommittedKBytes* usage) const; 142 void GetCommittedKBytes(CommittedKBytes* usage) const;
144 // Fills a WorkingSetKBytes containing resident private and shared memory 143 // Fills a WorkingSetKBytes containing resident private and shared memory
145 // usage in bytes, as per definition of WorkingSetBytes. Note that this 144 // usage in bytes, as per definition of WorkingSetBytes. Note that this
146 // function is somewhat expensive on Windows (a few ms per process). 145 // function is somewhat expensive on Windows (a few ms per process).
147 bool GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const; 146 bool GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const;
148 // Computes pss (proportional set size) of a process. Note that this 147 // Computes pss (proportional set size) of a process. Note that this
149 // function is somewhat expensive on Windows (a few ms per process). 148 // function is somewhat expensive on Windows (a few ms per process).
150 bool GetProportionalSetSizeBytes(uint64_t* pss_bytes) const; 149 bool GetProportionalSetSizeBytes(uint64_t* pss_bytes) const;
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 SystemDiskInfo disk_info_; 429 SystemDiskInfo disk_info_;
431 #endif 430 #endif
432 #if defined(OS_CHROMEOS) 431 #if defined(OS_CHROMEOS)
433 SwapInfo swap_info_; 432 SwapInfo swap_info_;
434 #endif 433 #endif
435 }; 434 };
436 435
437 } // namespace base 436 } // namespace base
438 437
439 #endif // BASE_PROCESS_PROCESS_METRICS_H_ 438 #endif // BASE_PROCESS_PROCESS_METRICS_H_
OLDNEW
« no previous file with comments | « no previous file | base/process/process_metrics_freebsd.cc » ('j') | chrome/browser/task_manager/sampling/task_group_sampler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698