summaryrefslogtreecommitdiffstats
path: root/lmkd/statslog.h
Commit message (Collapse)AuthorAgeFilesLines
* Add min_score_adj into LmkKillOccurred eventSuren Baghdasaryan2019-03-051-1/+2
| | | | | | | | | 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>
* Add start time to LmkKillOccurredJim Blackler2019-01-041-1/+2
| | | | | | | | | | | 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)
* Read memory stats from /proc/pid/stat file.Rajeev Kumar2018-10-101-0/+3
| | | | | | | | (cherry pick from commit 0301683e49ab255769b15469487feaab3466167a) Bug: 117333340 Test: Manual testing using alloc-stress tool Merged-In: Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd Change-Id: Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd
* Fix the stats log in lmkdYao Chen2018-05-031-1/+1
| | | | | | | | | | | | | | | | | | | 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
* Fix compilation issue when LMKD_LOG_STATS is defined.Rajeev Kumar2018-03-261-13/+17
| | | | | | | | | Note: The breakage was caused by http://ag/3621623 Test: mmma system/core/lmkd/ Change-Id: I17033aeedb3183d4777dacb89ec84430ff061b3c Bug: 74443701 (cherry picked from commit fb25ddd9c9004de9a9ebb1175a6ceaf7aeec0673)
* lmkd: move sundry pieces to statslog.hMark Salyzyn2018-02-281-1/+43
| | | | | | | | | | | | 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
* Implement stats logging in LMKD.Rajeev Kumar2018-02-091-0/+6
| | | | | | | | | | | | | | | | | | 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
* Functions to log stats log from LMKD.Rajeev Kumar2018-01-291-0/+39
Bug: 72177881 Test: Manual Change-Id: I0f618013e242fabae785b62eb39f9bfbcaac16da