Add start time to LmkKillOccurred
This is to measure an application's behavior with respect to being LMKed
(the longer an app lives before being LMKed, the better).
Bug: 119854389
Test: Manual
Change-Id: I4ef6433391c8758626334731d2b5de038e4468ae
Merged-In: I4ef6433391c8758626334731d2b5de038e4468ae
(cherry picked from I4ef6433391c8758626334731d2b5de038e4468ae)
diff --git a/lmkd/statslog.h b/lmkd/statslog.h
index 8458480..f3abe11 100644
--- a/lmkd/statslog.h
+++ b/lmkd/statslog.h
@@ -64,6 +64,7 @@
int64_t rss_in_bytes;
int64_t cache_in_bytes;
int64_t swap_in_bytes;
+ int64_t process_start_time_ns;
};
#define MEMCG_PROCESS_MEMORY_STAT_PATH "/dev/memcg/apps/uid_%u/pid_%u/memory.stat"
@@ -87,7 +88,7 @@
stats_write_lmk_kill_occurred(android_log_context ctx, int32_t code, int32_t uid,
char const* process_name, int32_t oom_score, int64_t pgfault,
int64_t pgmajfault, int64_t rss_in_bytes, int64_t cache_in_bytes,
- int64_t swap_in_bytes);
+ int64_t swap_in_bytes, int64_t process_start_time_ns);
__END_DECLS