Re: [PATCH][RESEND] tracing/ftrace: Introduce the big kernel lock tracer

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Steven Rostedt
Date: Wednesday, October 22, 2008 - 11:39 am

On Wed, 22 Oct 2008, Frederic Weisbecker wrote:

We recommend the 

  /*
   * Multi line
   * comment style.
   */



I think you want these as "static inline"


You don't need FTRACE for this.


Again, you don't need ftrace for this. You should just be able to trace 
the latencies and report the places that are big. If FTRACE is configured 
in, then you can also get the function trace.  We have patches to replace
FTRACE with FUNCTION_TRACER to eliminate this confusion.



Could you use the trace_assign_type(field, entry) instead.
See trace.c for examples.



Same here.


You might want to make this into a switch instead.


data is unused.


data is unused here too.


Note, the cpu retuned here may not be the same as the above processor id.


The above looks a bit ugly. Could you do something perhaps at the 
beginning of the file like:

#ifdef CONFIG_BKL_TRACER
static void lock_kernel_trace(void) {
	struct bkl_trace_acquire trace;

	preempt_disable();
	trace.acquire_req_time = cpu_clock(raw_smp_processor_id());
	preempt_enable();
	 __lock_kernel();
	trace.acquire_time = cpu_clock(raw_smp_processor_id());
	trace_bkl_acquire(&trace);
}
#else
# define lock_kernel_trace() __lock_kernel();
#endif

And then just add the lock_kernel_trace within the code.


Same here. Have an unlock_kernel_trace();


-- Steve

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH][RESEND] tracing/ftrace: Introduce the big kernel l ..., Frederic Weisbecker, (Wed Oct 22, 10:09 am)
Re: [PATCH][RESEND] tracing/ftrace: Introduce the big kern ..., Frédéric Weisbecker, (Wed Oct 22, 10:44 am)
Re: [PATCH][RESEND] tracing/ftrace: Introduce the big kern ..., Steven Rostedt, (Wed Oct 22, 11:39 am)
Re: [PATCH][RESEND] tracing/ftrace: Introduce the big kern ..., Frédéric Weisbecker, (Wed Oct 22, 11:54 am)