aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ftrace.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index b4ac734ad8d6..fc2d54987198 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -313,26 +313,39 @@ ftrace_init_module(struct module *mod,
313 313
314 314
315/* 315/*
316 * Structure that defines an entry function trace.
317 */
318struct ftrace_graph_ent {
319 unsigned long func; /* Current function */
320 int depth;
321};
322
323/*
316 * Structure that defines a return function trace. 324 * Structure that defines a return function trace.
317 */ 325 */
318struct ftrace_graph_ret { 326struct ftrace_graph_ret {
319 unsigned long ret; /* Return address */
320 unsigned long func; /* Current function */ 327 unsigned long func; /* Current function */
321 unsigned long long calltime; 328 unsigned long long calltime;
322 unsigned long long rettime; 329 unsigned long long rettime;
323 /* Number of functions that overran the depth limit for current task */ 330 /* Number of functions that overran the depth limit for current task */
324 unsigned long overrun; 331 unsigned long overrun;
332 int depth;
325}; 333};
326 334
327#ifdef CONFIG_FUNCTION_GRAPH_TRACER 335#ifdef CONFIG_FUNCTION_GRAPH_TRACER
328#define FTRACE_RETFUNC_DEPTH 50 336#define FTRACE_RETFUNC_DEPTH 50
329#define FTRACE_RETSTACK_ALLOC_SIZE 32 337#define FTRACE_RETSTACK_ALLOC_SIZE 32
330/* Type of a callback handler of tracing return function */ 338/* Type of the callback handlers for tracing function graph*/
331typedef void (*trace_function_graph_t)(struct ftrace_graph_ret *); 339typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); /* return */
340typedef void (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */
341
342extern int register_ftrace_graph(trace_func_graph_ret_t retfunc,
343 trace_func_graph_ent_t entryfunc);
344
345/* The current handlers in use */
346extern trace_func_graph_ret_t ftrace_graph_return;
347extern trace_func_graph_ent_t ftrace_graph_entry;
332 348
333extern int register_ftrace_graph(trace_function_graph_t func);
334/* The current handler in use */
335extern trace_function_graph_t ftrace_graph_function;
336extern void unregister_ftrace_graph(void); 349extern void unregister_ftrace_graph(void);
337 350
338extern void ftrace_graph_init_task(struct task_struct *t); 351extern void ftrace_graph_init_task(struct task_struct *t);