Skip to content

Commit

Permalink
timekeeping: Prints the amounts of time spent during suspend
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Ruchi Kandoi authored and johnstultz-work committed Aug 31, 2016
1 parent 3637458 commit 0bf43f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/time/timekeeping_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,7 @@ void tk_debug_account_sleep_time(struct timespec64 *t)
int bin = min(fls(t->tv_sec), NUM_BINS-1);

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

0 comments on commit 0bf43f1

Please sign in to comment.