282ad1a8f9
While troubleshooting memory pressure related issues it's hard to get a good view of the memory state when lmkd kill happens. Logging relevant information from /proc/meminfo file that was used to make a kill decision is very helpful for further analysis. To do this efficiently we are using Android Logger event library functions and log the data used for kill decision after the kill signal was issued. Test: Run lmkd_unit_test and logcat -b events -v descriptive Change-Id: Id5de41b9d91a04dd5d3eb9b85d4e1babe9755628 Signed-off-by: Suren Baghdasaryan <surenb@google.com>
51 lines
935 B
Text
51 lines
935 B
Text
cc_binary {
|
|
name: "lmkd",
|
|
|
|
srcs: ["lmkd.c"],
|
|
shared_libs: [
|
|
"libcutils",
|
|
"liblog",
|
|
],
|
|
static_libs: [
|
|
"libstatslogc",
|
|
"libstatssocket",
|
|
],
|
|
local_include_dirs: ["include"],
|
|
cflags: ["-Werror", "-DLMKD_TRACE_KILLS"],
|
|
init_rc: ["lmkd.rc"],
|
|
product_variables: {
|
|
use_lmkd_stats_log: {
|
|
cflags: [
|
|
"-DLMKD_LOG_STATS"
|
|
],
|
|
},
|
|
},
|
|
logtags: ["event.logtags"],
|
|
}
|
|
|
|
cc_library_static {
|
|
name: "libstatslogc",
|
|
srcs: ["statslog.c"],
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
],
|
|
shared_libs: [
|
|
"liblog",
|
|
],
|
|
static_libs: ["libstatssocket",],
|
|
}
|
|
|
|
cc_library_static {
|
|
name: "liblmkd_utils",
|
|
srcs: ["liblmkd_utils.c"],
|
|
shared_libs: [
|
|
"libcutils",
|
|
],
|
|
export_include_dirs: ["include"],
|
|
cppflags: [
|
|
"-g",
|
|
"-Wall",
|
|
"-Werror",
|
|
]
|
|
}
|