diff options
author | Ioannis Ilkos <ilkos@google.com> | 2020-09-11 11:10:17 +0100 |
---|---|---|
committer | Suren Baghdasaryan <surenb@google.com> | 2020-09-16 15:39:45 +0000 |
commit | 7717083f3c4c3b5faba60f4d988dede4ae22d694 (patch) | |
tree | b0964fd384bbc839ae3cec9fad1f8eec057347af | |
parent | 2d1d3d0897f66325ddd76afaf78288f453ff936e (diff) |
Additional LMK diagnostic information
Add free memory / swap as well as the kill reason to better understand
and diagnose lmkd behaviour in the field
Test: build with corresponding lmkd change
Bug: 168117803
Merged-In: I190f70758daa442b8605e17960c74574676fa3ae
Change-Id: I190f70758daa442b8605e17960c74574676fa3ae
-rw-r--r-- | cmds/statsd/src/atoms.proto | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index 7d0d97917a4b..285eb4ac150e 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -3863,6 +3863,17 @@ message LmkStateChanged { * system/core/lmkd/lmkd.c */ message LmkKillOccurred { + enum Reason { + UNKNOWN = 0; + PRESSURE_AFTER_KILL = 1; + NOT_RESPONDING = 2; + LOW_SWAP_AND_THRASHING = 3; + LOW_MEM_AND_SWAP = 4; + LOW_MEM_AND_THRASHING = 5; + DIRECT_RECL_AND_THRASHING = 6; + LOW_MEM_AND_SWAP_UTIL = 7; + } + // The uid if available. -1 means not available. optional int32 uid = 1 [(is_uid) = true]; @@ -3892,6 +3903,15 @@ message LmkKillOccurred { // Min oom adj score considered by lmkd. optional int32 min_oom_score = 10; + + // Free physical memory on device at LMK time. + optional int32 free_mem_kb = 11; + + // Free swap on device at LMK time. + optional int32 free_swap_kb = 12; + + // What triggered the LMK event. + optional Reason reason = 13; } /* |