Skip to content

Commit

Permalink
ftrace: Pass in global_ops for use with filtering files
Browse files Browse the repository at this point in the history
In preparation for having the function tracing instances be able to
filter on functions, the generic filter functions must first be
converted to take in the global_ops as a parameter.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt (Red Hat) committed Feb 20, 2014
1 parent f20a580 commit e3b3e2e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
@@ -2870,15 +2870,19 @@ ftrace_regex_open(struct ftrace_ops *ops, int flag,
static int
ftrace_filter_open(struct inode *inode, struct file *file)
{
return ftrace_regex_open(&global_ops,
struct ftrace_ops *ops = inode->i_private;

return ftrace_regex_open(ops,
FTRACE_ITER_FILTER | FTRACE_ITER_DO_HASH,
inode, file);
}

static int
ftrace_notrace_open(struct inode *inode, struct file *file)
{
return ftrace_regex_open(&global_ops, FTRACE_ITER_NOTRACE,
struct ftrace_ops *ops = inode->i_private;

return ftrace_regex_open(ops, FTRACE_ITER_NOTRACE,
inode, file);
}

@@ -4118,10 +4122,10 @@ static __init int ftrace_init_dyn_debugfs(struct dentry *d_tracer)
d_tracer, NULL, &ftrace_enabled_fops);

trace_create_file("set_ftrace_filter", 0644, d_tracer,
NULL, &ftrace_filter_fops);
&global_ops, &ftrace_filter_fops);

trace_create_file("set_ftrace_notrace", 0644, d_tracer,
NULL, &ftrace_notrace_fops);
&global_ops, &ftrace_notrace_fops);

#ifdef CONFIG_FUNCTION_GRAPH_TRACER
trace_create_file("set_graph_function", 0444, d_tracer,

0 comments on commit e3b3e2e

Please sign in to comment.