Skip to content

Commit 0bf43f1

Browse files
Ruchi Kandoijohnstultz-work
Ruchi Kandoi
authored andcommitted
timekeeping: Prints the amounts of time spent during suspend
In addition to keeping a histogram of suspend times, also print out the time spent in suspend to dmesg. This helps to keep track of suspend time while debugging using kernel logs. Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Richard Cochran <[email protected]> Cc: Prarit Bhargava <[email protected]> Signed-off-by: Ruchi Kandoi <[email protected]> [jstultz: Tweaked commit message] Signed-off-by: John Stultz <[email protected]>
1 parent 3637458 commit 0bf43f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/time/timekeeping_debug.c

+2
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,7 @@ void tk_debug_account_sleep_time(struct timespec64 *t)
7575
int bin = min(fls(t->tv_sec), NUM_BINS-1);
7676

7777
sleep_time_bin[bin]++;
78+
pr_info("Suspended for %lld.%03lu seconds\n", (s64)t->tv_sec,
79+
t->tv_nsec / NSEC_PER_MSEC);
7880
}
7981

0 commit comments

Comments
 (0)