Improving ART debugging and printing VmSize when OOM occurs
VmSize debugging information is added to quickly identify whether
the process address space or the system memory is insufficient
Test: 1 Manually trigger an OOM exception
2 Checking whether the keyword VmSize exists in the OOM
exception log
3 art/test.py --host --64 -r
Signed-off-by: Wei Li <sirius.liwei@huawei.com>
Signed-off-by: Jinguang Dong <dongjinguang@huawei.com>
Change-Id: I0ea53f5136c06aba27712f95335ca722e7d30d95
diff --git a/libartbase/base/utils.h b/libartbase/base/utils.h
index e6a0459..9c71055 100644
--- a/libartbase/base/utils.h
+++ b/libartbase/base/utils.h
@@ -216,6 +216,11 @@
}
}
+// Lookup value for a given key in /proc/self/status. Keys and values are separated by a ':' in
+// the status file. Returns value found on success and "<unknown>" if the key is not found or
+// there is an I/O error.
+std::string GetProcessStatus(const char* key);
+
} // namespace art
#endif // ART_LIBARTBASE_BASE_UTILS_H_