diff options
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r-- | include/linux/ftrace.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 166a2070ef65..f1af1aab00e6 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -25,6 +25,17 @@ struct ftrace_ops { | |||
25 | 25 | ||
26 | extern int function_trace_stop; | 26 | extern int function_trace_stop; |
27 | 27 | ||
28 | /* | ||
29 | * Type of the current tracing. | ||
30 | */ | ||
31 | enum ftrace_tracing_type_t { | ||
32 | FTRACE_TYPE_ENTER = 0, /* Hook the call of the function */ | ||
33 | FTRACE_TYPE_RETURN, /* Hook the return of the function */ | ||
34 | }; | ||
35 | |||
36 | /* Current tracing type, default is FTRACE_TYPE_ENTER */ | ||
37 | extern enum ftrace_tracing_type_t ftrace_tracing_type; | ||
38 | |||
28 | /** | 39 | /** |
29 | * ftrace_stop - stop function tracer. | 40 | * ftrace_stop - stop function tracer. |
30 | * | 41 | * |
@@ -104,6 +115,9 @@ extern int ftrace_update_ftrace_func(ftrace_func_t func); | |||
104 | extern void ftrace_caller(void); | 115 | extern void ftrace_caller(void); |
105 | extern void ftrace_call(void); | 116 | extern void ftrace_call(void); |
106 | extern void mcount_call(void); | 117 | extern void mcount_call(void); |
118 | #ifdef CONFIG_FUNCTION_RET_TRACER | ||
119 | extern void ftrace_return_caller(void); | ||
120 | #endif | ||
107 | 121 | ||
108 | /** | 122 | /** |
109 | * ftrace_make_nop - convert code into top | 123 | * ftrace_make_nop - convert code into top |
@@ -310,7 +324,7 @@ struct ftrace_retfunc { | |||
310 | /* Type of a callback handler of tracing return function */ | 324 | /* Type of a callback handler of tracing return function */ |
311 | typedef void (*trace_function_return_t)(struct ftrace_retfunc *); | 325 | typedef void (*trace_function_return_t)(struct ftrace_retfunc *); |
312 | 326 | ||
313 | extern void register_ftrace_return(trace_function_return_t func); | 327 | extern int register_ftrace_return(trace_function_return_t func); |
314 | /* The current handler in use */ | 328 | /* The current handler in use */ |
315 | extern trace_function_return_t ftrace_function_return; | 329 | extern trace_function_return_t ftrace_function_return; |
316 | extern void unregister_ftrace_return(void); | 330 | extern void unregister_ftrace_return(void); |