From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760455AbcHaVug (ORCPT ); Wed, 31 Aug 2016 17:50:36 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:33366 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759960AbcHaVu3 (ORCPT ); Wed, 31 Aug 2016 17:50:29 -0400 From: John Stultz To: lkml Cc: Ruchi Kandoi , Thomas Gleixner , Ingo Molnar , Richard Cochran , Prarit Bhargava , John Stultz Subject: [PATCH 3/6] timekeeping: Prints the amounts of time spent during suspend Date: Wed, 31 Aug 2016 14:50:19 -0700 Message-Id: <1472680222-21060-4-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1472680222-21060-1-git-send-email-john.stultz@linaro.org> References: <1472680222-21060-1-git-send-email-john.stultz@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ruchi Kandoi 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 Cc: Ingo Molnar Cc: Richard Cochran Cc: Prarit Bhargava Signed-off-by: Ruchi Kandoi [jstultz: Tweaked commit message] Signed-off-by: John Stultz --- kernel/time/timekeeping_debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/timekeeping_debug.c b/kernel/time/timekeeping_debug.c index 107310a6..ca9fb80 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); } -- 1.9.1