Re: [RFC PATCH] power: Add option to log time spent in suspend

2013-05-02 Thread Colin Cross
On Thu, May 2, 2013 at 11:58 AM, John Stultz wrote: > On 05/02/2013 11:29 AM, Colin Cross wrote: >> >> On Thu, May 2, 2013 at 5:27 AM, Pavel Machek wrote: >>> >>> dmesg is not the solution, it's not a stable api, it would require constant parsing to make sure you didn't miss data

Re: [RFC PATCH] power: Add option to log time spent in suspend

2013-05-02 Thread John Stultz
On 05/02/2013 11:29 AM, Colin Cross wrote: On Thu, May 2, 2013 at 5:27 AM, Pavel Machek wrote: dmesg is not the solution, it's not a stable api, it would require constant parsing to make sure you didn't miss data before it fell out of the ringbuffer, and sched_clock often does not (and

Re: [RFC PATCH] power: Add option to log time spent in suspend

2013-05-02 Thread Colin Cross
On Thu, May 2, 2013 at 5:27 AM, Pavel Machek wrote: > Hi! > >> >> +#include >> >> +#include >> >> +#include >> >> +#include >> >> +#include >> >> +#include >> >> +#include >> >> + >> >> +static struct timespec suspend_time_before; >> >> +static unsigned int time_in_suspend_bins[32]; >> >>

Re: [RFC PATCH] power: Add option to log time spent in suspend

2013-05-02 Thread Pavel Machek
Hi! > >> +#include > >> +#include > >> +#include > >> +#include > >> +#include > >> +#include > >> +#include > >> + > >> +static struct timespec suspend_time_before; > >> +static unsigned int time_in_suspend_bins[32]; > >> + > >> +#ifdef CONFIG_DEBUG_FS > >> +static int

Re: [RFC PATCH] power: Add option to log time spent in suspend

2013-05-02 Thread Pavel Machek
Hi! +#include linux/debugfs.h +#include linux/err.h +#include linux/init.h +#include linux/kernel.h +#include linux/seq_file.h +#include linux/syscore_ops.h +#include linux/time.h + +static struct timespec suspend_time_before; +static unsigned int time_in_suspend_bins[32]; +

Re: [RFC PATCH] power: Add option to log time spent in suspend

2013-05-02 Thread Colin Cross
On Thu, May 2, 2013 at 5:27 AM, Pavel Machek pa...@ucw.cz wrote: Hi! +#include linux/debugfs.h +#include linux/err.h +#include linux/init.h +#include linux/kernel.h +#include linux/seq_file.h +#include linux/syscore_ops.h +#include linux/time.h + +static struct timespec

Re: [RFC PATCH] power: Add option to log time spent in suspend

2013-05-02 Thread John Stultz
On 05/02/2013 11:29 AM, Colin Cross wrote: On Thu, May 2, 2013 at 5:27 AM, Pavel Machek pa...@ucw.cz wrote: dmesg is not the solution, it's not a stable api, it would require constant parsing to make sure you didn't miss data before it fell out of the ringbuffer, and sched_clock often does

Re: [RFC PATCH] power: Add option to log time spent in suspend

2013-05-02 Thread Colin Cross
On Thu, May 2, 2013 at 11:58 AM, John Stultz john.stu...@linaro.org wrote: On 05/02/2013 11:29 AM, Colin Cross wrote: On Thu, May 2, 2013 at 5:27 AM, Pavel Machek pa...@ucw.cz wrote: dmesg is not the solution, it's not a stable api, it would require constant parsing to make sure you didn't

Re: [RFC PATCH] power: Add option to log time spent in suspend

2013-04-30 Thread Colin Cross
On Tue, Apr 30, 2013 at 5:29 PM, Pavel Machek wrote: > Hi! > >> From: Colin Cross >> >> Below is a patch from android kernel that maintains a histogram of >> suspend times. Please review and provide feedback. >> >> Prints the time spent in suspend in the kernel log, and keeps statistics >> on

Re: [RFC PATCH] power: Add option to log time spent in suspend

2013-04-30 Thread Pavel Machek
Hi! > From: Colin Cross > > Below is a patch from android kernel that maintains a histogram of > suspend times. Please review and provide feedback. > > Prints the time spent in suspend in the kernel log, and keeps statistics > on the time spent in suspend in /sys/kernel/debug/suspend_time > >

[RFC PATCH] power: Add option to log time spent in suspend

2013-04-30 Thread Zoran Markovic
From: Colin Cross Below is a patch from android kernel that maintains a histogram of suspend times. Please review and provide feedback. Prints the time spent in suspend in the kernel log, and keeps statistics on the time spent in suspend in /sys/kernel/debug/suspend_time Cc: Android Kernel

[RFC PATCH] power: Add option to log time spent in suspend

2013-04-30 Thread Zoran Markovic
From: Colin Cross ccr...@android.com Below is a patch from android kernel that maintains a histogram of suspend times. Please review and provide feedback. Prints the time spent in suspend in the kernel log, and keeps statistics on the time spent in suspend in /sys/kernel/debug/suspend_time Cc:

Re: [RFC PATCH] power: Add option to log time spent in suspend

2013-04-30 Thread Pavel Machek
Hi! From: Colin Cross ccr...@android.com Below is a patch from android kernel that maintains a histogram of suspend times. Please review and provide feedback. Prints the time spent in suspend in the kernel log, and keeps statistics on the time spent in suspend in

Re: [RFC PATCH] power: Add option to log time spent in suspend

2013-04-30 Thread Colin Cross
On Tue, Apr 30, 2013 at 5:29 PM, Pavel Machek pa...@ucw.cz wrote: Hi! From: Colin Cross ccr...@android.com Below is a patch from android kernel that maintains a histogram of suspend times. Please review and provide feedback. Prints the time spent in suspend in the kernel log, and keeps