summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Rajeev Kumar <rajekumar@google.com> 2018-01-20 04:30:53 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-01-20 04:30:53 +0000
commit0fd0659f7660e38dc6d1f85488d360dfc92c3723 (patch)
treed3df31bd685d8426eebf44347bc22365b0fc50f9
parent57eb94358527242b4265e59f277ef262af2df17d (diff)
parent508a9bfe33fbb65a634bedb8e93951d346f9d4f5 (diff)
Merge "Add atoms to log memory metrics."
-rw-r--r--cmds/statsd/src/atoms.proto46
1 files changed, 46 insertions, 0 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 7d513cd01694..f840894db416 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -84,6 +84,7 @@ message Atom {
AppStartChanged app_start_changed = 48;
AppStartCancelChanged app_start_cancel_changed = 49;
AppStartFullyDrawnChanged app_start_fully_drawn_changed = 50;
+ LmkEventOccurred lmk_event_occurred = 51;
// TODO: Reorder the numbering so that the most frequent occur events occur in the first 15.
}
@@ -101,6 +102,7 @@ message Atom {
CpuTimePerUidFreq cpu_time_per_uid_freq = 10010;
WifiActivityEnergyInfo wifi_activity_energy_info = 10011;
ModemActivityInfo modem_activity_info = 10012;
+ MemoryStat memory_stat = 10013;
}
}
@@ -1177,3 +1179,47 @@ message ModemActivityInfo {
// product of current(mA), voltage(V) and time(ms)
optional uint64 energy_used = 10;
}
+
+/*
+ * Logs the memory stats for a process
+ */
+message MemoryStat {
+ // The uid if available. -1 means not available.
+ optional int32 uid = 1;
+
+ // The app package name.
+ optional string pkg_name = 2;
+
+ // # of page-faults
+ optional int64 pgfault = 3;
+
+ // # of major page-faults
+ optional int64 pgmajfault = 4;
+
+ // RSS+CACHE(+SWAP)
+ optional int64 usage_in_bytes = 5;
+}
+
+/*
+ * Logs the event when LMKD kills a process to reduce memory pressure
+ * Logged from:
+ * system/core/lmkd/lmkd.c
+ */
+message LmkEventOccurred {
+ // The uid if available. -1 means not available.
+ optional int32 uid = 1;
+
+ // The app package name.
+ optional string pkg_name = 2;
+
+ // oom adj score.
+ optional int32 oom_score = 3;
+
+ // Used as start/stop boundaries for the event
+ enum State {
+ UNKNOWN = 0;
+ START = 1;
+ END = 2;
+ }
+ optional State state = 4;
+}