aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r--include/linux/ftrace.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 4642959e5bda..794ab907dbfe 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -23,6 +23,34 @@ struct ftrace_ops {
23 struct ftrace_ops *next; 23 struct ftrace_ops *next;
24}; 24};
25 25
26extern int function_trace_stop;
27
28/**
29 * ftrace_stop - stop function tracer.
30 *
31 * A quick way to stop the function tracer. Note this an on off switch,
32 * it is not something that is recursive like preempt_disable.
33 * This does not disable the calling of mcount, it only stops the
34 * calling of functions from mcount.
35 */
36static inline void ftrace_stop(void)
37{
38 function_trace_stop = 1;
39}
40
41/**
42 * ftrace_start - start the function tracer.
43 *
44 * This function is the inverse of ftrace_stop. This does not enable
45 * the function tracing if the function tracer is disabled. This only
46 * sets the function tracer flag to continue calling the functions
47 * from mcount.
48 */
49static inline void ftrace_start(void)
50{
51 function_trace_stop = 0;
52}
53
26/* 54/*
27 * The ftrace_ops must be a static and should also 55 * The ftrace_ops must be a static and should also
28 * be read_mostly. These functions do modify read_mostly variables 56 * be read_mostly. These functions do modify read_mostly variables
@@ -41,6 +69,8 @@ extern void ftrace_stub(unsigned long a0, unsigned long a1);
41# define unregister_ftrace_function(ops) do { } while (0) 69# define unregister_ftrace_function(ops) do { } while (0)
42# define clear_ftrace_function(ops) do { } while (0) 70# define clear_ftrace_function(ops) do { } while (0)
43static inline void ftrace_kill(void) { } 71static inline void ftrace_kill(void) { }
72static inline void ftrace_stop(void) { }
73static inline void ftrace_start(void) { }
44#endif /* CONFIG_FUNCTION_TRACER */ 74#endif /* CONFIG_FUNCTION_TRACER */
45 75
46#ifdef CONFIG_DYNAMIC_FTRACE 76#ifdef CONFIG_DYNAMIC_FTRACE