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

Liu Yuan namei.unix at gmail.com
Fri Aug 9 06:58:52 CEST 2013


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

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

Thanks
Yuan



More information about the sheepdog mailing list