aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* lmkd: reroute atoms logging to AMSandroid-s-beta-2android-s-beta-1Vova Sharaienko2021-05-111-9/+12
| | | | | | | | | | | | - Added new lmkd message for clients to subscribe LMK_ASYNC_EVENT_STAT - Added support to write kill & mem stats information via data socket to be read & parsed on the AMS Java side for future logging to statsd Bug: 184698933 Test: lmkd_unit_test - test check_for_oom tests lmkd message send to AMS Test: statsd_testdrive 51 54 to inspect statsd logged atoms data Change-Id: Id682a438c87b3e4503261d26461f6cee641d86c4 Merged-In: Id682a438c87b3e4503261d26461f6cee641d86c4
* lmkd: Add property re-initialization supportSuren Baghdasaryan2020-05-062-0/+48
| | | | | | | | | | | | | | Add --reinit command-line option to allow updating lmkd properties. For example to enable debug logging in the running lmkd process user should issue: setprop ro.lmk.debug true lmkd --reinit Bug: 155149944 Test: lmkd_unit_test after resetting lmkd properties Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: Ic60331f3368f5a7fdfe09ad7d47c7ccf0a497685
* lmkd: Restrict lmkd unsolicited notifications only to subscribed recipientsSuren Baghdasaryan2019-12-231-1/+32
| | | | | | | | | | | | | | lmkd unsolicited notifications can cause lmkd to block if clients are not consuming them. Fix that by sending notifications to only subscribed clients. Introduce LMK_SUBSCRIBE command to allow lmkd clients to subscribe to event notifications. The only asynchronous event currently supported is LMK_ASYNC_EVENT_KILL. Bug: 146597855 Test: fill up send buffer using lmkd_unit_test Test: confirm lmkd does not block after the fix Change-Id: I014159aa55b59081f4b9ed53ecd160a49c0682bb Signed-off-by: Suren Baghdasaryan <surenb@google.com>
* lmkd: Support to send unsolicited message to clientsJing Ji2019-12-121-5/+17
| | | | | | | | | | | For now the only unsolicited message from lmkd is the process kills on memory pressure. Bug: 136036078 Test: atest ApplicationExitInfoTest Change-Id: I503fd6a45ebab5276460b0ab978ebb2b8431dc0d Signed-off-by: Jing Ji <jji@google.com>
* lmkd: Support process types when registering a processSuren Baghdasaryan2019-11-071-2/+15
| | | | | | | | | | Add an optional process type field into lmkd registration protocol so that applications can be distinguished from services. Bug: 129011369 Test: boot and verify native service registration Change-Id: Ie610b5d07cbe247a55ab31bc079ee5c5923bea11 Signed-off-by: Suren Baghdasaryan <surenb@google.com>
* lmkd: Add library function to unregister a processSuren Baghdasaryan2019-11-072-1/+9
| | | | | | | | | | Introduce lmkd_unregister_proc helper function. Fix a bug where lmkd_pack_set_procremove used a wrong structure as a parameter. Bug: 129011369 Test: verify process record removal when it is manually killed Change-Id: I7ab5a499f6b1c6eecfdba4d0a5ec916053e2726a Signed-off-by: Suren Baghdasaryan <surenb@google.com>
* Make inlines staticPirama Arumuga Nainar2019-02-061-20/+17
| | | | | | | | | | | | Bug: http://b/116873221 If not, building with coverage (and -O0) is broken since Clang does not inline these functions, and does not emit a definition because they are not static or extern. Test: Build with coverage (-O0) Change-Id: I2880119834f764164a1aac10b696e76a2b462b71
* lmkd: Add command to get number of killsSuren Baghdasaryan2018-10-241-0/+39
| | | | | | | | | | Intrduce LMK_GETKILLCNT command for ActivityManager to get the number of kills from lmkd. Bug: 117126077 Test: used lmkd_unit_test to verify correct reporting Change-Id: I09c720a7176b4df95efc544177cd2694f8d791be Signed-off-by: Suren Baghdasaryan <surenb@google.com>
* lmkd: Implement pid purge command to clear old pids when zygote restartsSuren Baghdasaryan2018-10-151-0/+10
| | | | | | | | | | | lmkd keeps a list of pids registered by ActivityManager, however on rare occasions when framework restarts and lmkd survives that list has to be purged. Implement a command that can be used to clear the pid list. Bug: 116801366 Test: locally by killing zygote process Change-Id: I71d6012f86bb83a73edd5b687e05a0848e0569b1 Signed-off-by: Suren Baghdasaryan <surenb@google.com>
* lmkd: Introduce liblmkd_utils for communicating with lmkd processSuren Baghdasaryan2018-01-312-0/+201
A number of tools and tests require communication with lmkd. In order to avoid code duplication liblmkd_utils implements functions commonly used when interacting with lmkd process. Isolate communication protocol details into lmkd.h Bug: 63631020 Change-Id: Id840983d55b7db60013d52dee0c3187943811822 Signed-off-by: Suren Baghdasaryan <surenb@google.com>