diff options
author | Ruchi Kandoi <kandoiruchi@google.com> | 2016-08-11 23:35:01 +0200 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2016-08-31 23:43:34 +0200 |
commit | 0bf43f15db857e83daf4134aa062c8b157a80ee0 (patch) | |
tree | 5a632667392b9e47f75a6bd5f0ded329bcc7976d | |
parent | clocksource: Defer override invalidation unless clock is unstable (diff) | |
download | linux-0bf43f15db857e83daf4134aa062c8b157a80ee0.tar.xz linux-0bf43f15db857e83daf4134aa062c8b157a80ee0.zip |
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 <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
[jstultz: Tweaked commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r-- | kernel/time/timekeeping_debug.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/time/timekeeping_debug.c b/kernel/time/timekeeping_debug.c index 107310a6f36f..ca9fb800336b 100644 --- a/kernel/time/timekeeping_debug.c +++ b/kernel/time/timekeeping_debug.c @@ -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); } |