aboutsummaryrefslogtreecommitdiffstats
path: root/statslog.cpp
diff options
context:
space:
mode:
authorSuren Baghdasaryan <surenb@google.com>2021-07-22 16:21:21 -0700
committerSuren Baghdasaryan <surenb@google.com>2021-07-23 19:11:36 +0000
commite16047516d05d8fa125a99e0cbb5326c72496efb (patch)
tree468842637b7726e8f8bafbec4ad8e79d937d6756 /statslog.cpp
parent1ef4718aedff5a7992690c107d76eb2f960b45d4 (diff)
downloadplatform_system_memory_lmkd-e16047516d05d8fa125a99e0cbb5326c72496efb.tar.gz
platform_system_memory_lmkd-e16047516d05d8fa125a99e0cbb5326c72496efb.tar.bz2
platform_system_memory_lmkd-e16047516d05d8fa125a99e0cbb5326c72496efb.zip
lmkd: Add current and max thrashing levels in LMK_MEMORY_STATS reports
Thrashing threshold tuning requires collecting thrashing level data from the field and correlating these levels with other indications of device being non-responsive. Include current and max thrashing levels in the lmkd kill reports. Max thrashing level captures the highest level seen since the last kill report. Bug: 194433891 Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: I8a34dc41e7f03668bfad4ac2cbcb5d2570a10752 Merged-In: I8a34dc41e7f03668bfad4ac2cbcb5d2570a10752
Diffstat (limited to 'statslog.cpp')
-rw-r--r--statslog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/statslog.cpp b/statslog.cpp
index ba39f54..6568f73 100644
--- a/statslog.cpp
+++ b/statslog.cpp
@@ -323,6 +323,8 @@ size_t lmkd_pack_set_kill_occurred(LMK_KILL_OCCURRED_PACKET packet,
index = pack_int32(packet, index, (int)kill_stat->free_mem_kb);
index = pack_int32(packet, index, (int)kill_stat->free_swap_kb);
index = pack_int32(packet, index, (int)kill_stat->kill_reason);
+ index = pack_int32(packet, index, kill_stat->thrashing);
+ index = pack_int32(packet, index, kill_stat->max_thrashing);
index = pack_string(packet, index, kill_stat->taskname);
return index;