Re: [RFC PATCH] drivers: char: Add a dynamic clock for the trace clock

2013-12-11 Thread Steven Rostedt
On Wed, 11 Dec 2013 18:06:06 -0800 Sonny Rao wrote: > > ftrace has several clocks that it uses: > > > > o local - basically sched_clock() > > o global - something like hpet that is monotonic across CPUs but slower > > o counter - a simple atomic counter (no time associated to it) > > o uptime -

Re: [RFC PATCH] drivers: char: Add a dynamic clock for the trace clock

2013-12-11 Thread Sonny Rao
On Wed, Dec 11, 2013 at 5:49 PM, Steven Rostedt wrote: > On Wed, 11 Dec 2013 17:17:30 -0800 > Sonny Rao wrote: > >> On Wed, Dec 11, 2013 at 11:30 AM, Stephane Eranian >> wrote: >> > Sonny, >> > >> > Your patch has a couple of problems for me: >> > - requires CONFIG_TRACING >> > >> > You should

Re: [RFC PATCH] drivers: char: Add a dynamic clock for the trace clock

2013-12-11 Thread Steven Rostedt
On Wed, 11 Dec 2013 17:17:30 -0800 Sonny Rao wrote: > On Wed, Dec 11, 2013 at 11:30 AM, Stephane Eranian wrote: > > Sonny, > > > > Your patch has a couple of problems for me: > > - requires CONFIG_TRACING > > > > You should directly invoke getrawmonotonic() > > and inline the code from trace_c

Re: [RFC PATCH] drivers: char: Add a dynamic clock for the trace clock

2013-12-11 Thread Sonny Rao
On Wed, Dec 11, 2013 at 11:30 AM, Stephane Eranian wrote: > Sonny, > > Your patch has a couple of problems for me: > - requires CONFIG_TRACING > > You should directly invoke getrawmonotonic() > and inline the code from trace_clock_getres(). > > That's how I managed to compile your kernel module

Re: [RFC PATCH] drivers: char: Add a dynamic clock for the trace clock

2013-12-11 Thread Stephane Eranian
Sonny, Your patch has a couple of problems for me: - requires CONFIG_TRACING You should directly invoke getrawmonotonic() and inline the code from trace_clock_getres(). That's how I managed to compile your kernel module on my system. On Mon, Dec 9, 2013 at 8:49 AM, Josh Triplett wrote: > On

Re: [RFC PATCH] drivers: char: Add a dynamic clock for the trace clock

2013-12-08 Thread Josh Triplett
On Fri, Dec 06, 2013 at 04:34:11PM -0800, Sonny Rao wrote: > Based on a suggestion from John Stultz. > > This adds a dynamic clock device which can be used with clock_gettime > to sample the clock source used for time stamping trace events in the > kernel. The only use for this clock source is to

[RFC PATCH] drivers: char: Add a dynamic clock for the trace clock

2013-12-06 Thread Sonny Rao
Based on a suggestion from John Stultz. This adds a dynamic clock device which can be used with clock_gettime to sample the clock source used for time stamping trace events in the kernel. The only use for this clock source is to associate user space events with kernel events on a given kernel. I