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

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

Issue 2786313002: Revert of Add new wired memory metric to memory-infra dumps. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | base/process/process_metrics_mac.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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Computes pss (proportional set size) of a process. Note that this 147 // Computes pss (proportional set size) of a process. Note that this
148 // function is somewhat expensive on Windows (a few ms per process). 148 // function is somewhat expensive on Windows (a few ms per process).
149 bool GetProportionalSetSizeBytes(uint64_t* pss_bytes) const; 149 bool GetProportionalSetSizeBytes(uint64_t* pss_bytes) const;
150 150
151 #if defined(OS_MACOSX) 151 #if defined(OS_MACOSX)
152 // Fills both CommitedKBytes and WorkingSetKBytes in a single operation. This 152 // Fills both CommitedKBytes and WorkingSetKBytes in a single operation. This
153 // is more efficient on Mac OS X, as the two can be retrieved with a single 153 // is more efficient on Mac OS X, as the two can be retrieved with a single
154 // system call. 154 // system call.
155 bool GetCommittedAndWorkingSetKBytes(CommittedKBytes* usage, 155 bool GetCommittedAndWorkingSetKBytes(CommittedKBytes* usage,
156 WorkingSetKBytes* ws_usage) const; 156 WorkingSetKBytes* ws_usage) const;
157 // Returns private, shared, and total resident bytes. |locked_bytes| refers to 157 // Returns private, shared, and total resident bytes.
158 // bytes that must stay resident. |locked_bytes| only counts bytes locked by
159 // this task, not bytes locked by the kernel.
160 bool GetMemoryBytes(size_t* private_bytes, 158 bool GetMemoryBytes(size_t* private_bytes,
161 size_t* shared_bytes, 159 size_t* shared_bytes,
162 size_t* resident_bytes, 160 size_t* resident_bytes) const;
163 size_t* locked_bytes) const;
164 #endif 161 #endif
165 162
166 // Returns the CPU usage in percent since the last time this method or 163 // Returns the CPU usage in percent since the last time this method or
167 // GetPlatformIndependentCPUUsage() was called. The first time this method 164 // GetPlatformIndependentCPUUsage() was called. The first time this method
168 // is called it returns 0 and will return the actual CPU info on subsequent 165 // is called it returns 0 and will return the actual CPU info on subsequent
169 // calls. On Windows, the CPU usage value is for all CPUs. So if you have 166 // calls. On Windows, the CPU usage value is for all CPUs. So if you have
170 // 2 CPUs and your process is using all the cycles of 1 CPU and not the other 167 // 2 CPUs and your process is using all the cycles of 1 CPU and not the other
171 // CPU, this method returns 50. 168 // CPU, this method returns 50.
172 double GetCPUUsage(); 169 double GetCPUUsage();
173 170
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 SystemDiskInfo disk_info_; 459 SystemDiskInfo disk_info_;
463 #endif 460 #endif
464 #if defined(OS_CHROMEOS) 461 #if defined(OS_CHROMEOS)
465 SwapInfo swap_info_; 462 SwapInfo swap_info_;
466 #endif 463 #endif
467 }; 464 };
468 465
469 } // namespace base 466 } // namespace base
470 467
471 #endif // BASE_PROCESS_PROCESS_METRICS_H_ 468 #endif // BASE_PROCESS_PROCESS_METRICS_H_
OLDNEW
« no previous file with comments | « no previous file | base/process/process_metrics_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698