summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Rafal Slawik <rslawik@google.com> 2018-12-13 20:31:32 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-12-13 20:31:32 +0000
commit00b10effe869f3d9df28d358f06bd67b03fdad4c (patch)
tree8047ef2eee5f881ef31acc9783e3f4857fc07be3
parenteb922e64f10c19366b4e6844272d112efdfca2b5 (diff)
parentda51b93a610b50d6c2582eab3e344e0dd5a2b967 (diff)
Merge "Update documentation for memory atoms."
-rw-r--r--cmds/statsd/src/atoms.proto26
1 files changed, 22 insertions, 4 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index beb4dc31c70e..410bd198a227 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -2547,15 +2547,19 @@ message BluetoothActivityInfo {
/*
* Logs the memory stats for a process.
+ *
+ * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService).
*/
message ProcessMemoryState {
// The uid if available. -1 means not available.
optional int32 uid = 1 [(is_uid) = true];
// The process name.
+ // Usually package name, "system" for system server.
+ // Provided by ActivityManagerService.
optional string process_name = 2;
- // oom adj score.
+ // Current OOM score adjustment. Value read from ProcessRecord.
optional int32 oom_adj_score = 3;
// # of page-faults
@@ -2565,12 +2569,18 @@ message ProcessMemoryState {
optional int64 page_major_fault = 5;
// RSS
+ // Value is read from /proc/PID/stat, field 24. Or from memory.stat, field
+ // total_rss if per-app memory cgroups are enabled.
optional int64 rss_in_bytes = 6;
// CACHE
+ // Value is read from memory.stat, field total_cache if per-app memory
+ // cgroups are enabled. Otherwise, 0.
optional int64 cache_in_bytes = 7;
// SWAP
+ // Value is read from memory.stat, field total_swap if per-app memory
+ // cgroups are enabled. Otherwise, 0.
optional int64 swap_in_bytes = 8;
// Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0.
@@ -2583,12 +2593,15 @@ message ProcessMemoryState {
/*
* Logs the memory stats for a native process (from procfs).
+ *
+ * Pulled from StatsCompanionService for selected native processes.
*/
message NativeProcessMemoryState {
// The uid if available. -1 means not available.
optional int32 uid = 1 [(is_uid) = true];
// The process name.
+ // Value read from /proc/PID/cmdline.
optional string process_name = 2;
// # of page-faults
@@ -2598,6 +2611,7 @@ message NativeProcessMemoryState {
optional int64 page_major_fault = 4;
// RSS
+ // Value read from /proc/PID/stat, field 24.
optional int64 rss_in_bytes = 5;
// Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0.
@@ -2610,13 +2624,17 @@ message NativeProcessMemoryState {
/*
* Logs the memory high-water mark for a process.
- * Recorded in ActivityManagerService.
+ *
+ * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie)
+ * and for selected native processes.
*/
message ProcessMemoryHighWaterMark {
// The uid if available. -1 means not available.
optional int32 uid = 1 [(is_uid) = true];
- // The process name. Provided by ActivityManagerService or read from /proc/PID/cmdline.
+ // The process name.
+ // Usually package name or process cmdline.
+ // Provided by ActivityManagerService or read from /proc/PID/cmdline.
optional string process_name = 2;
// RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in
@@ -3593,4 +3611,4 @@ message DocsUIUserActionReported {
*/
message DocsUIInvalidScopedAccessRequestReported {
optional android.stats.docsui.InvalidScopedAccess type = 1;
-} \ No newline at end of file
+}