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

Unified Diff: base/trace_event/process_memory_totals.h

Issue 2838803003: Add a field platform_private_footprint_ to ProcessMemoryTotals. (Closed)
Patch Set: 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
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..beb256f31ec924222e71f50b716098b6d5ca4817 100644
--- a/base/trace_event/process_memory_totals.h
+++ b/base/trace_event/process_memory_totals.h
@@ -32,6 +32,13 @@ 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; }
+ uint64_t private_footprint_precursor() const {
Primiano Tucci (use gerrit) 2017/04/25 12:43:35 I'd: just call this private_footprint_bytes() and
+ return private_footprint_precursor_;
+ }
+ void set_private_footprint_precursor(uint64_t value) {
+ private_footprint_precursor_ = value;
+ }
+
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 +58,23 @@ class BASE_EXPORT ProcessMemoryTotals {
uint64_t peak_resident_set_bytes_;
bool is_peak_rss_resetable_;
+ // Number of bytes in a platform-specific precursor that will be used to
+ // compute the private memory footprint. Not emitted in the trace as its value
+ // is platform-dependent. The meaning of the precursor depends on the OS.
+ // On macOS 10.12+,
+ // task_info(...TASK_VM_INFO...).phys_footprint
+ // On macOS 10.11 and older,
+ // task_info(...TASK_VM_INFO...).internal +
+ // task_info(...TASK_VM_INFO...).compressed
+ // On Linux, Android and ChromeOS,
+ // RssAnon + VmSwap from /proc/pid/status
+ // TODO(hjd): https://crbug.com/707019
+ // On Windows,
+ // TBD: https://crbug.com/707022
+ // On iOS,
+ // TBD: https://crbug.com/714961
+ uint64_t private_footprint_precursor_;
Wez 2017/04/25 17:47:19 As discussed on Slack: "precursor" isn't quite the
+
// Extra metrics for OS-specific statistics.
std::map<const char*, uint64_t> extra_fields_;

Powered by Google App Engine
This is Rietveld 408576698