lmkd: fallback to reading procfs stats when failing to read cgroup stats am: dcd968db5e
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/3454703 Change-Id: Ie11f16434a6192cceb2bbafd82a22931c29e93b9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
810b69632d
11
statslog.cpp
11
statslog.cpp
|
|
@ -158,12 +158,11 @@ struct memory_stat *stats_read_memory_stat(bool per_app_memcg, int pid, uid_t ui
|
||||||
if (memory_stat_from_cgroup(&mem_st, pid, uid) == 0) {
|
if (memory_stat_from_cgroup(&mem_st, pid, uid) == 0) {
|
||||||
return &mem_st;
|
return &mem_st;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
if (memory_stat_from_procfs(&mem_st, pid) == 0) {
|
if (memory_stat_from_procfs(&mem_st, pid) == 0) {
|
||||||
mem_st.rss_in_bytes = rss_bytes;
|
mem_st.rss_in_bytes = rss_bytes;
|
||||||
mem_st.swap_in_bytes = swap_bytes;
|
mem_st.swap_in_bytes = swap_bytes;
|
||||||
return &mem_st;
|
return &mem_st;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue