diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-04-05 13:12:55 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-04-20 22:06:45 -0400 |
commit | 04ec7bb642b77374b53731b795b5654b5aff1c00 (patch) | |
tree | d1207b1237a6ba31feb057130af1279e43d962c1 /kernel/trace/trace.h | |
parent | 8d70725e452cac9796e9025ccd79c45ffcc4d109 (diff) | |
download | linux-04ec7bb642b77374b53731b795b5654b5aff1c00.tar.bz2 |
tracing: Have the trace_array hold the list of registered func probes
Add a link list to the trace_array to hold func probes that are registered.
Currently, all function probes are the same for all instances as it was
before, that is, only the top level trace_array holds the function probes.
But this lays the ground work to have function probes be attached to
individual instances, and having the event trigger only affect events in the
given instance. But that work is still to be done.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index d457addcc224..68ff25e4cb19 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -262,6 +262,9 @@ struct trace_array { #ifdef CONFIG_FUNCTION_TRACER struct ftrace_ops *ops; struct trace_pid_list __rcu *function_pids; +#ifdef CONFIG_DYNAMIC_FTRACE + struct list_head func_probes; +#endif /* function tracing enabled */ int function_enabled; #endif @@ -696,6 +699,9 @@ extern void trace_event_follow_fork(struct trace_array *tr, bool enable); #ifdef CONFIG_DYNAMIC_FTRACE extern unsigned long ftrace_update_tot_cnt; +void ftrace_init_trace_array(struct trace_array *tr); +#else +static inline void ftrace_init_trace_array(struct trace_array *tr) { } #endif #define DYN_FTRACE_TEST_NAME trace_selftest_dynamic_test_func extern int DYN_FTRACE_TEST_NAME(void); @@ -883,7 +889,8 @@ extern struct list_head ftrace_pids; struct ftrace_func_command { struct list_head list; char *name; - int (*func)(struct ftrace_hash *hash, + int (*func)(struct trace_array *tr, + struct ftrace_hash *hash, char *func, char *cmd, char *params, int enable); }; @@ -963,8 +970,8 @@ void free_ftrace_func_mapper(struct ftrace_func_mapper *mapper, ftrace_mapper_func free_func); extern int -register_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops, - void *data); +register_ftrace_function_probe(char *glob, struct trace_array *tr, + struct ftrace_probe_ops *ops, void *data); extern int unregister_ftrace_function_probe_func(char *glob, struct ftrace_probe_ops *ops); |