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

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

Issue 2865653003: One perf test for windows VirtualQueryEx calls.
Patch Set: add many test cases 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 | « base/memory/memory_uma_perftest.cc ('k') | 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 PortProvider* port_provider); 129 PortProvider* port_provider);
130 #endif // !defined(OS_MACOSX) || defined(OS_IOS) 130 #endif // !defined(OS_MACOSX) || defined(OS_IOS)
131 131
132 // Creates a ProcessMetrics for the current process. This a cross-platform 132 // Creates a ProcessMetrics for the current process. This a cross-platform
133 // convenience wrapper for CreateProcessMetrics(). 133 // convenience wrapper for CreateProcessMetrics().
134 static std::unique_ptr<ProcessMetrics> CreateCurrentProcessMetrics(); 134 static std::unique_ptr<ProcessMetrics> CreateCurrentProcessMetrics();
135 135
136 // Returns the current space allocated for the pagefile, in bytes (these pages 136 // Returns the current space allocated for the pagefile, in bytes (these pages
137 // may or may not be in memory). On Linux, this returns the total virtual 137 // may or may not be in memory). On Linux, this returns the total virtual
138 // memory size. 138 // memory size.
139 //
140 // TODO(ajwong): This is zero in newer versions of windows...
139 size_t GetPagefileUsage() const; 141 size_t GetPagefileUsage() const;
140 // Returns the peak space allocated for the pagefile, in bytes. 142 // Returns the peak space allocated for the pagefile, in bytes.
141 size_t GetPeakPagefileUsage() const; 143 size_t GetPeakPagefileUsage() const;
142 // Returns the current working set size, in bytes. On Linux, this returns 144 // Returns the current working set size, in bytes. On Linux, this returns
143 // the resident set size. 145 // the resident set size.
144 size_t GetWorkingSetSize() const; 146 size_t GetWorkingSetSize() const;
145 // Returns the peak working set size, in bytes. 147 // Returns the peak working set size, in bytes.
146 size_t GetPeakWorkingSetSize() const; 148 size_t GetPeakWorkingSetSize() const;
147 // Returns private and sharedusage, in bytes. Private bytes is the amount of 149 // Returns private and sharedusage, in bytes. Private bytes is the amount of
148 // memory currently allocated to a process that cannot be shared. Returns 150 // memory currently allocated to a process that cannot be shared. Returns
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 // |size| and |info| are output parameters, only valid on Success. 532 // |size| and |info| are output parameters, only valid on Success.
531 BASE_EXPORT MachVMRegionResult GetBasicInfo(mach_port_t task, 533 BASE_EXPORT MachVMRegionResult GetBasicInfo(mach_port_t task,
532 mach_vm_size_t* size, 534 mach_vm_size_t* size,
533 mach_vm_address_t* address, 535 mach_vm_address_t* address,
534 vm_region_basic_info_64* info); 536 vm_region_basic_info_64* info);
535 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 537 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
536 538
537 } // namespace base 539 } // namespace base
538 540
539 #endif // BASE_PROCESS_PROCESS_METRICS_H_ 541 #endif // BASE_PROCESS_PROCESS_METRICS_H_
OLDNEW
« no previous file with comments | « base/memory/memory_uma_perftest.cc ('k') | base/process/process_metrics_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698