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

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

Issue 2549803003: Add function to compute proportional set size for OS_WIN (Closed)
Patch Set: Fix compile error for std::min Created 4 years 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
« no previous file with comments | « no previous file | base/process/process_metrics_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
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,
140 size_t* shared_bytes); 140 size_t* shared_bytes);
141 // Fills a CommittedKBytes with both resident and paged 141 // Fills a CommittedKBytes with both resident and paged
142 // memory usage as per definition of CommittedBytes. 142 // memory usage as per definition of CommittedBytes.
143 void GetCommittedKBytes(CommittedKBytes* usage) const; 143 void GetCommittedKBytes(CommittedKBytes* usage) const;
144 // Fills a WorkingSetKBytes containing resident private and shared memory 144 // Fills a WorkingSetKBytes containing resident private and shared memory
145 // usage in bytes, as per definition of WorkingSetBytes. Note that this 145 // usage in bytes, as per definition of WorkingSetBytes. Note that this
146 // function is somewhat expensive on Windows (a few ms per process). 146 // function is somewhat expensive on Windows (a few ms per process).
147 bool GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const; 147 bool GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const;
148 // Computes pss (proportional set size) of a process. Note that this
149 // function is somewhat expensive on Windows (a few ms per process).
150 bool GetProportionalSetSizeBytes(uint64_t* pss_bytes) const;
148 151
149 #if defined(OS_MACOSX) 152 #if defined(OS_MACOSX)
150 // Fills both CommitedKBytes and WorkingSetKBytes in a single operation. This 153 // Fills both CommitedKBytes and WorkingSetKBytes in a single operation. This
151 // is more efficient on Mac OS X, as the two can be retrieved with a single 154 // is more efficient on Mac OS X, as the two can be retrieved with a single
152 // system call. 155 // system call.
153 bool GetCommittedAndWorkingSetKBytes(CommittedKBytes* usage, 156 bool GetCommittedAndWorkingSetKBytes(CommittedKBytes* usage,
154 WorkingSetKBytes* ws_usage) const; 157 WorkingSetKBytes* ws_usage) const;
155 #endif 158 #endif
156 159
157 // Returns the CPU usage in percent since the last time this method or 160 // Returns the CPU usage in percent since the last time this method or
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 SystemDiskInfo disk_info_; 430 SystemDiskInfo disk_info_;
428 #endif 431 #endif
429 #if defined(OS_CHROMEOS) 432 #if defined(OS_CHROMEOS)
430 SwapInfo swap_info_; 433 SwapInfo swap_info_;
431 #endif 434 #endif
432 }; 435 };
433 436
434 } // namespace base 437 } // namespace base
435 438
436 #endif // BASE_PROCESS_PROCESS_METRICS_H_ 439 #endif // BASE_PROCESS_PROCESS_METRICS_H_
OLDNEW
« no previous file with comments | « no previous file | base/process/process_metrics_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698