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; |
Mark Mentovai
2017/04/25 20:29:44
Like you did here. :)
|
+ |
+ // 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; |
Mark Mentovai
2017/04/25 20:29:44
Should we only define the proper OS-specific field
erikchen
2017/04/25 20:49:46
I considered if-def-souping this, but these parame
|
+ 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_; |