提交 0bf43f15 编写于 作者: R Ruchi Kandoi 提交者: John Stultz

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: NRuchi Kandoi <kandoiruchi@google.com>
[jstultz: Tweaked commit message]
Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
上级 36374583
...@@ -75,5 +75,7 @@ void tk_debug_account_sleep_time(struct timespec64 *t) ...@@ -75,5 +75,7 @@ void tk_debug_account_sleep_time(struct timespec64 *t)
int bin = min(fls(t->tv_sec), NUM_BINS-1); int bin = min(fls(t->tv_sec), NUM_BINS-1);
sleep_time_bin[bin]++; sleep_time_bin[bin]++;
pr_info("Suspended for %lld.%03lu seconds\n", (s64)t->tv_sec,
t->tv_nsec / NSEC_PER_MSEC);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册