diff options
author | Jim Blackler <jimblackler@google.com> | 2018-11-21 16:22:36 +0000 |
---|---|---|
committer | Jim Blackler <jimblackler@google.com> | 2019-01-04 11:36:54 +0000 |
commit | 1417cdbddbb2f0f290b4ad06231482a14c999edd (patch) | |
tree | 287dc3013670c090d3ecd4296038d471e4fd06b3 /lmkd/statslog.c | |
parent | 1476931e02877a99ae3e87274afcf4525ff2c5e6 (diff) | |
download | system_core-1417cdbddbb2f0f290b4ad06231482a14c999edd.tar.gz system_core-1417cdbddbb2f0f290b4ad06231482a14c999edd.tar.bz2 system_core-1417cdbddbb2f0f290b4ad06231482a14c999edd.zip |
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)
Diffstat (limited to 'lmkd/statslog.c')
-rw-r--r-- | lmkd/statslog.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lmkd/statslog.c b/lmkd/statslog.c index 66d11647b..689e8aebe 100644 --- a/lmkd/statslog.c +++ b/lmkd/statslog.c @@ -65,7 +65,7 @@ int 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) { assert(ctx != NULL); int ret = -EINVAL; if (!ctx) { @@ -113,5 +113,9 @@ stats_write_lmk_kill_occurred(android_log_context ctx, int32_t code, int32_t uid return ret; } + if ((ret = android_log_write_int64(ctx, process_start_time_ns)) < 0) { + return ret; + } + return write_to_logger(ctx, LOG_ID_STATS); } |