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

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

Issue 2876793005: Add UMA metrics for desktop memory pressure notifications. (Closed)
Patch Set: 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_pressure_monitor_mac.cc ('k') | chrome/browser/memory/tab_manager.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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 bool GetProportionalSetSizeBytes(uint64_t* pss_bytes) const; 161 bool GetProportionalSetSizeBytes(uint64_t* pss_bytes) const;
162 162
163 #if defined(OS_MACOSX) 163 #if defined(OS_MACOSX)
164 // Fills both CommitedKBytes and WorkingSetKBytes in a single operation. This 164 // Fills both CommitedKBytes and WorkingSetKBytes in a single operation. This
165 // is more efficient on Mac OS X, as the two can be retrieved with a single 165 // is more efficient on Mac OS X, as the two can be retrieved with a single
166 // system call. 166 // system call.
167 bool GetCommittedAndWorkingSetKBytes(CommittedKBytes* usage, 167 bool GetCommittedAndWorkingSetKBytes(CommittedKBytes* usage,
168 WorkingSetKBytes* ws_usage) const; 168 WorkingSetKBytes* ws_usage) const;
169 169
170 struct TaskVMInfo { 170 struct TaskVMInfo {
171 // Only available on macOS 10.12+. 171 // Only available on macOS 10.12+. Will be 0 on previous versions.
172 // Anonymous, non-discardable memory, including non-volatile IOKit. 172 // Anonymous, non-discardable memory, including non-volatile IOKit.
173 // Measured in bytes. 173 // Measured in bytes.
174 uint64_t phys_footprint = 0; 174 uint64_t phys_footprint = 0;
175 175
176 // Anonymous, non-discardable, non-compressed memory, excluding IOKit. 176 // Anonymous, non-discardable, non-compressed memory, excluding IOKit.
177 // Measured in bytes. 177 // Measured in bytes.
178 uint64_t internal = 0; 178 uint64_t internal = 0;
179 179
180 // Compressed memory measured in bytes. 180 // Compressed memory measured in bytes.
181 uint64_t compressed = 0; 181 uint64_t compressed = 0;
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 // |size| and |info| are output parameters, only valid on Success. 532 // |size| and |info| are output parameters, only valid on Success.
533 BASE_EXPORT MachVMRegionResult GetBasicInfo(mach_port_t task, 533 BASE_EXPORT MachVMRegionResult GetBasicInfo(mach_port_t task,
534 mach_vm_size_t* size, 534 mach_vm_size_t* size,
535 mach_vm_address_t* address, 535 mach_vm_address_t* address,
536 vm_region_basic_info_64* info); 536 vm_region_basic_info_64* info);
537 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 537 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
538 538
539 } // namespace base 539 } // namespace base
540 540
541 #endif // BASE_PROCESS_PROCESS_METRICS_H_ 541 #endif // BASE_PROCESS_PROCESS_METRICS_H_
OLDNEW
« no previous file with comments | « base/memory/memory_pressure_monitor_mac.cc ('k') | chrome/browser/memory/tab_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698