Commit Graph

5 Commits

Author SHA1 Message Date
Suren Baghdasaryan 7d3c5c6ea2 lmkd: Add library function to unregister a process
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>
2019-11-07 18:18:54 +00:00
Pirama Arumuga Nainar f85d4216fd Make inlines static
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
2019-02-06 15:19:00 -08:00
Suren Baghdasaryan a7394ea37f lmkd: Add command to get number of kills
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>
2018-10-24 17:18:32 +00:00
Suren Baghdasaryan 83df0088a3 lmkd: Implement pid purge command to clear old pids when zygote restarts
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>
2018-10-15 16:22:17 +00:00
Suren Baghdasaryan f7932e5b30 lmkd: Introduce liblmkd_utils for communicating with lmkd process
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>
2018-01-31 18:10:49 +00:00