Reorder swap field in killinfo
Some tools might parse killinfo entries based on the field order. Move the newly added swap field to the end to ensure compatibility. Test: build Change-Id: Id6dad850beba6835f061da95e84190d00a1b26a0
This commit is contained in:
parent
bd6991af02
commit
282437fbbe
|
|
@ -35,4 +35,4 @@
|
|||
# TODO: generate ".java" and ".h" files with integer constants from this file.
|
||||
|
||||
# for killinfo logs
|
||||
10195355 killinfo (Pid|1|5),(Uid|1|5),(OomAdj|1),(MinOomAdj|1),(TaskSize|1),(TaskSwapSize|1),(enum kill_reasons|1|5),(MemFree|1),(Cached|1),(SwapCached|1),(Buffers|1),(Shmem|1),(Unevictable|1),(SwapTotal|1),(SwapFree|1),(ActiveAnon|1),(InactiveAnon|1),(ActiveFile|1),(InactiveFile|1),(SReclaimable|1),(SUnreclaim|1),(KernelStack|1),(PageTables|1),(IonHeap|1),(IonHeapPool|1),(CmaFree|1),(MsSinceEvent|1),(MsSincePrevWakeup|1),(WakeupsSinceEvent|1),(SkippedWakeups|1)
|
||||
10195355 killinfo (Pid|1|5),(Uid|1|5),(OomAdj|1),(MinOomAdj|1),(TaskSize|1),(enum kill_reasons|1|5),(MemFree|1),(Cached|1),(SwapCached|1),(Buffers|1),(Shmem|1),(Unevictable|1),(SwapTotal|1),(SwapFree|1),(ActiveAnon|1),(InactiveAnon|1),(ActiveFile|1),(InactiveFile|1),(SReclaimable|1),(SUnreclaim|1),(KernelStack|1),(PageTables|1),(IonHeap|1),(IonHeapPool|1),(CmaFree|1),(MsSinceEvent|1),(MsSincePrevWakeup|1),(WakeupsSinceEvent|1),(SkippedWakeups|1),(TaskSwapSize|1)
|
||||
|
|
|
|||
2
lmkd.cpp
2
lmkd.cpp
|
|
@ -1873,7 +1873,6 @@ static void killinfo_log(struct proc* procp, int min_oom_score, int rss_kb,
|
|||
android_log_write_int32(ctx, procp->oomadj);
|
||||
android_log_write_int32(ctx, min_oom_score);
|
||||
android_log_write_int32(ctx, (int32_t)min(rss_kb, INT32_MAX));
|
||||
android_log_write_int32(ctx, (int32_t)min(swap_kb, INT32_MAX));
|
||||
android_log_write_int32(ctx, kill_reason);
|
||||
|
||||
/* log meminfo fields */
|
||||
|
|
@ -1886,6 +1885,7 @@ static void killinfo_log(struct proc* procp, int min_oom_score, int rss_kb,
|
|||
android_log_write_int32(ctx, (int32_t)get_time_diff_ms(&wi->prev_wakeup_tm, tm));
|
||||
android_log_write_int32(ctx, wi->wakeups_since_event);
|
||||
android_log_write_int32(ctx, wi->skipped_wakeups);
|
||||
android_log_write_int32(ctx, (int32_t)min(swap_kb, INT32_MAX));
|
||||
|
||||
android_log_write_list(ctx, LOG_ID_EVENTS);
|
||||
android_log_reset(ctx);
|
||||
|
|
|
|||
Loading…
Reference in New Issue