Skip to contentSkip to conversation

timekeeping: Prints the amounts of time spent during suspend

PATCH In review Ruchi Kandoi 2 participants 2 messages Aug 11, 2016 – Aug 17, 2016 Timekeeping, clocksource core, NTP, alarmtimer

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 timekeeping: Prints the amounts of time spent during suspend

This helps to keep track of real time while debugging using kernel logs.

---
Changelog since v1:
- removed cross platform warnings.

 kernel/time/timekeeping_debug.c | 2 ++
 1 file changed, 2 insertions(+)
kernel/time/timekeeping_debug.c +2 -0
index f6bd652..7fdb34f 100644
@@ -70,5 +70,7 @@ late_initcall(tk_debug_sleep_time_init);
 void tk_debug_account_sleep_time(struct timespec64 *t)
 {
 	sleep_time_bin[fls(t->tv_sec)]++;
+	pr_info("Suspended for %lld.%03lu seconds\n", (s64)t->tv_sec,
+			t->tv_nsec / NSEC_PER_MSEC);
 }
 
Signature · 1 line
2.8.0.rc3.226.g39d4020