From: Colin Cross <ccross@xxxxxxxxxxx>
Below is a patch from android kernel that maintains a histogram of
suspend times. Please review and provide feedback.
Statistices on the time spent in suspend are kept in
/sys/kernel/debug/sleep_time.
Cc: Android Kernel Team <kernel-team@xxxxxxxxxxx>
Cc: Colin Cross <ccross@xxxxxxxxxxx>
Cc: Todd Poynor <toddpoynor@xxxxxxxxxx>
Cc: San Mehat <san@xxxxxxxxxx>
Cc: Benoit Goby <benoit@xxxxxxxxxxx>
Cc: John Stultz <john.stultz@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Colin Cross <ccross@xxxxxxxxxxx>
Signed-off-by: Todd Poynor <toddpoynor@xxxxxxxxxx>
[zoran.markovic@xxxxxxxxxx: Re-formatted suspend time table to better fit
expected values. Moved accounting of suspend time into timekeeping core.
Removed CONFIG_SUSPEND_TIME flag and made the feature conditional on
CONFIG_DEBUG_FS. Changed the file name to sleep_time to better fit terminology
in timekeeping core. Changed seq_printf to seq_puts. Tweaked commit message]
Signed-off-by: Zoran Markovic <zoran.markovic@xxxxxxxxxx>