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

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

Issue 2866723002: Fill in PlatformPrivateFootprint on Linux 2/2 (Closed)
Patch Set: rebase Created 3 years, 7 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_linux.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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 #if defined(OS_LINUX) || defined(OS_AIX) 218 #if defined(OS_LINUX) || defined(OS_AIX)
219 // Returns the number of file descriptors currently open by the process, or 219 // Returns the number of file descriptors currently open by the process, or
220 // -1 on error. 220 // -1 on error.
221 int GetOpenFdCount() const; 221 int GetOpenFdCount() const;
222 222
223 // Returns the soft limit of file descriptors that can be opened by the 223 // Returns the soft limit of file descriptors that can be opened by the
224 // process, or -1 on error. 224 // process, or -1 on error.
225 int GetOpenFdSoftLimit() const; 225 int GetOpenFdSoftLimit() const;
226 #endif // defined(OS_LINUX) || defined(OS_AIX) 226 #endif // defined(OS_LINUX) || defined(OS_AIX)
227 227
228 #if defined(OS_LINUX) || defined(OS_ANDROID)
229 // Bytes of swap as reported by /proc/[pid]/status.
230 uint64_t GetVmSwapBytes() const;
231 #endif // defined(OS_LINUX) || defined(OS_ANDROID)
232
228 private: 233 private:
229 #if !defined(OS_MACOSX) || defined(OS_IOS) 234 #if !defined(OS_MACOSX) || defined(OS_IOS)
230 explicit ProcessMetrics(ProcessHandle process); 235 explicit ProcessMetrics(ProcessHandle process);
231 #else 236 #else
232 ProcessMetrics(ProcessHandle process, PortProvider* port_provider); 237 ProcessMetrics(ProcessHandle process, PortProvider* port_provider);
233 #endif // !defined(OS_MACOSX) || defined(OS_IOS) 238 #endif // !defined(OS_MACOSX) || defined(OS_IOS)
234 239
235 #if defined(OS_LINUX) || defined(OS_ANDROID) | defined(OS_AIX) 240 #if defined(OS_LINUX) || defined(OS_ANDROID) | defined(OS_AIX)
236 bool GetWorkingSetKBytesStatm(WorkingSetKBytes* ws_usage) const; 241 bool GetWorkingSetKBytesStatm(WorkingSetKBytes* ws_usage) const;
237 #endif 242 #endif
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 // |size| and |info| are output parameters, only valid on Success. 537 // |size| and |info| are output parameters, only valid on Success.
533 BASE_EXPORT MachVMRegionResult GetBasicInfo(mach_port_t task, 538 BASE_EXPORT MachVMRegionResult GetBasicInfo(mach_port_t task,
534 mach_vm_size_t* size, 539 mach_vm_size_t* size,
535 mach_vm_address_t* address, 540 mach_vm_address_t* address,
536 vm_region_basic_info_64* info); 541 vm_region_basic_info_64* info);
537 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 542 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
538 543
539 } // namespace base 544 } // namespace base
540 545
541 #endif // BASE_PROCESS_PROCESS_METRICS_H_ 546 #endif // BASE_PROCESS_PROCESS_METRICS_H_
OLDNEW
« no previous file with comments | « no previous file | base/process/process_metrics_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698