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

Unified Diff: base/trace_event/process_memory_totals.h

Issue 2838803003: Add a field platform_private_footprint_ to ProcessMemoryTotals. (Closed)
Patch Set: Comments from mark. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process/process_metrics_mac.cc ('k') | base/trace_event/process_memory_totals.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/process_memory_totals.h
diff --git a/base/trace_event/process_memory_totals.h b/base/trace_event/process_memory_totals.h
index 329967a6ee74cbee73bfded84c20f3bfc6cb549f..207e39867d7cfce11775c38d86bef5d9ab23fc04 100644
--- a/base/trace_event/process_memory_totals.h
+++ b/base/trace_event/process_memory_totals.h
@@ -32,6 +32,30 @@ class BASE_EXPORT ProcessMemoryTotals {
uint64_t resident_set_bytes() const { return resident_set_bytes_; }
void set_resident_set_bytes(uint64_t value) { resident_set_bytes_ = value; }
+ // Platform-specific data that will be used to compute the
+ // PrivateMemoryFootprint.
+ struct PlatformPrivateFootprint {
+ // macOS 10.12+
+ uint64_t phys_footprint_bytes = 0;
+
+ // macOS [all versions]
+ uint64_t internal_bytes = 0;
+ uint64_t compressed_bytes = 0;
+
+ // Linux, Android, ChromeOS
+ // TODO(hjd): https://crbug.com/707019
+ uint64_t rss_anon_bytes = 0;
+ uint64_t vm_swap_bytes = 0;
+
+ // On Windows,
+ // TBD: https://crbug.com/707022
+ // On iOS,
+ // TBD: https://crbug.com/714961
+ };
+ PlatformPrivateFootprint& GetPlatformPrivateFootprint() {
+ return platform_private_footprint_;
+ }
+
uint64_t peak_resident_set_bytes() const { return peak_resident_set_bytes_; }
void set_peak_resident_set_bytes(uint64_t value) {
peak_resident_set_bytes_ = value;
@@ -51,6 +75,10 @@ class BASE_EXPORT ProcessMemoryTotals {
uint64_t peak_resident_set_bytes_;
bool is_peak_rss_resetable_;
+ // Not emitted in the trace as this is intended to be an intermediary in
+ // computation of private memory footprint.
+ PlatformPrivateFootprint platform_private_footprint_;
+
// Extra metrics for OS-specific statistics.
std::map<const char*, uint64_t> extra_fields_;
« no previous file with comments | « base/process/process_metrics_mac.cc ('k') | base/trace_event/process_memory_totals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698