Log min_score_adj when lmkd kills a process to determine the oom_score
levels that lmkd considers during the kill.
Bug: 123024834
Change-Id: I986ae8f2808199b1654bc8d2a32dd88046c79aa3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
This is to measure an application's behavior with respect to being LMKed
(the longer an app lives before being LMKed, the better).
Bug: 119854389
Test: Manual
Change-Id: I4ef6433391c8758626334731d2b5de038e4468ae
Merged-In: I4ef6433391c8758626334731d2b5de038e4468ae
(cherry picked from I4ef6433391c8758626334731d2b5de038e4468ae)
1. let logs be written to statsd directly like all other stats logs.
+ stats log should not write to logd anymore(b/78239479)
2. fixed the log format
+ need to embed the elapsed real time in the log
3. fixed the log context reuse problem
+reset the log context buffer and internal state before reuse
Bug: 78603347
Bug: 78239479
Test: tested with alloc_stress, and saw logs written to statsd
performance measurement (memory & cpu):
https://paste.googleplex.com/5508158646648832
Change-Id: I345f0eace8ba1687ff480fb88e9abba1d8533f76
Note: The breakage was caused by http://ag/3621623
Test: mmma system/core/lmkd/
Change-Id: I17033aeedb3183d4777dacb89ec84430ff061b3c
Bug: 74443701
(cherry picked from commit fb25ddd9c9)
Pragma once is not part of the standard, and is actually a gnu
C++ addition. Android coding standard requires the #ifndef header
wrappers. Moved things that belong in statslog.h from the lmkd files.
SideEffects: None
Test: lmkd_unit_tests
Bug: 33808187
Bug: 72838192
Change-Id: I9686b1a0791ee2b723d05b91905eda0bb64a1156
It implements logging of following atoms:
-- LMK_STATE_CHANGED
-- LMK_KILL_OCCURRED
We would like to gather memory metrics of the process killed by LMKD
because by gathering this info we would be able to analyze and improve
system health by potentially reducing memory footprint of the process.
This feature would be available on production builds.
To know more about this see: http://go/android-p-memory-metrics
Bug: 65738734
Test: Tested manually
Change-Id: I064e0cdcb47c3b4c95d8b8d5654050c9812008d8