diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-03-31 19:21:41 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-04-20 22:06:33 -0400 |
commit | 92a68fa047ca5b8e1991af2d50b23ad9452613cd (patch) | |
tree | 2528b86a5b31c1beb708f9a837f9e08556f4b807 /kernel/trace | |
parent | ec19b85913486993d7d6f747beed1a711afd47d8 (diff) | |
download | linux-92a68fa047ca5b8e1991af2d50b23ad9452613cd.tar.gz linux-92a68fa047ca5b8e1991af2d50b23ad9452613cd.tar.bz2 linux-92a68fa047ca5b8e1991af2d50b23ad9452613cd.zip |
ftrace: Move the function commands into the tracing directory
As nothing outside the tracing directory uses the function command mechanism,
I'm moving the prototypes out of the include/linux/ftrace.h and into the
local kernel/trace/trace.h header. I plan on making them hook to the
trace_array structure which is local to kernel/trace, and I do not want to
expose it to the rest of the kernel. This requires that the command functions
must also be local to tracing. But luckily nothing else uses them.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 2ff6d49fa5ca..a63411c53c5e 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -880,6 +880,13 @@ print_graph_function_flags(struct trace_iterator *iter, u32 flags) extern struct list_head ftrace_pids; #ifdef CONFIG_FUNCTION_TRACER +struct ftrace_func_command { + struct list_head list; + char *name; + int (*func)(struct ftrace_hash *hash, + char *func, char *cmd, + char *params, int enable); +}; extern bool ftrace_filter_param __initdata; static inline int ftrace_trace_task(struct trace_array *tr) { @@ -948,10 +955,23 @@ extern void unregister_ftrace_function_probe_func(char *glob, struct ftrace_probe_ops *ops); extern void unregister_ftrace_function_probe_all(char *glob); +int register_ftrace_command(struct ftrace_func_command *cmd); +int unregister_ftrace_command(struct ftrace_func_command *cmd); + void ftrace_create_filter_files(struct ftrace_ops *ops, struct dentry *parent); void ftrace_destroy_filter_files(struct ftrace_ops *ops); #else +struct ftrace_func_command; + +static inline __init int register_ftrace_command(struct ftrace_func_command *cmd) +{ + return -EINVAL; +} +static inline __init int unregister_ftrace_command(char *cmd_name) +{ + return -EINVAL; +} /* * The ops parameter passed in is usually undefined. * This must be a macro. |