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.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index f4233b195dab..ef1607ed7044 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -105,11 +105,23 @@ enum {
105 FTRACE_OPS_FL_INITIALIZED = 1 << 8, 105 FTRACE_OPS_FL_INITIALIZED = 1 << 8,
106}; 106};
107 107
108/*
109 * Note, ftrace_ops can be referenced outside of RCU protection.
110 * (Although, for perf, the control ops prevent that). If ftrace_ops is
111 * allocated and not part of kernel core data, the unregistering of it will
112 * perform a scheduling on all CPUs to make sure that there are no more users.
113 * Depending on the load of the system that may take a bit of time.
114 *
115 * Any private data added must also take care not to be freed and if private
116 * data is added to a ftrace_ops that is in core code, the user of the
117 * ftrace_ops must perform a schedule_on_each_cpu() before freeing it.
118 */
108struct ftrace_ops { 119struct ftrace_ops {
109 ftrace_func_t func; 120 ftrace_func_t func;
110 struct ftrace_ops *next; 121 struct ftrace_ops *next;
111 unsigned long flags; 122 unsigned long flags;
112 int __percpu *disabled; 123 int __percpu *disabled;
124 void *private;
113#ifdef CONFIG_DYNAMIC_FTRACE 125#ifdef CONFIG_DYNAMIC_FTRACE
114 struct ftrace_hash *notrace_hash; 126 struct ftrace_hash *notrace_hash;
115 struct ftrace_hash *filter_hash; 127 struct ftrace_hash *filter_hash;