[sheepdog] [PATCH v2 06/10] add notrace to only entry point and exit point

MORITA Kazutaka morita.kazutaka at gmail.com
Fri Aug 9 10:57:22 CEST 2013


At Fri, 9 Aug 2013 12:58:52 +0800,
Liu Yuan wrote:
> 
> On Fri, Aug 09, 2013 at 12:22:00PM +0900, MORITA Kazutaka wrote:
> > From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> > 
> > It is difficult to know which function needs a notrace directive.  We
> > are using notrace to avoid starting tracer recursively while tracing,
> > but we can do the similar thing by using a thread local variable.
> > With this patch, notrace is necessary only to the entry point
> > (tracer_call) and the exit point (tracer_return_call).
> > 
> > This patch also allows us to use tracer with debug build.
> 
> Get following warning:
> 
> WARNING: storage class should be at the beginning of the declaration
> #183: FILE: sheep/trace/graph.c:26:
> +notrace static void graph_tracer_exit(const struct caller *this_fn, int depth)
> 
> We need to put notrace after 'static void'? I think maybe we'd better introduce

notrace should have been just after static.

> 
> typedef trace_func_t which handle notrace automatically and do the type check?

notrace is no longer necessary for each tracer after this patch.  Only
trace_function_enter() trace_function_exit() need notrace.  I think of
removing notrace from compiler.h so that we don't abuse the directive.

Thanks,

Kazutaka



More information about the sheepdog mailing list