Skip to content

Commit e3b3e2e

Browse files
committed
ftrace: Pass in global_ops for use with filtering files
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>
1 parent f20a580 commit e3b3e2e

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎kernel/trace/ftrace.c‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2870,15 +2870,19 @@ ftrace_regex_open(struct ftrace_ops *ops, int flag,
28702870
static int
28712871
ftrace_filter_open(struct inode *inode, struct file *file)
28722872
{
2873-
return ftrace_regex_open(&global_ops,
2873+
struct ftrace_ops *ops = inode->i_private;
2874+
2875+
return ftrace_regex_open(ops,
28742876
FTRACE_ITER_FILTER | FTRACE_ITER_DO_HASH,
28752877
inode, file);
28762878
}
28772879

28782880
static int
28792881
ftrace_notrace_open(struct inode *inode, struct file *file)
28802882
{
2881-
return ftrace_regex_open(&global_ops, FTRACE_ITER_NOTRACE,
2883+
struct ftrace_ops *ops = inode->i_private;
2884+
2885+
return ftrace_regex_open(ops, FTRACE_ITER_NOTRACE,
28822886
inode, file);
28832887
}
28842888

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

41204124
trace_create_file("set_ftrace_filter", 0644, d_tracer,
4121-
NULL, &ftrace_filter_fops);
4125+
&global_ops, &ftrace_filter_fops);
41224126

41234127
trace_create_file("set_ftrace_notrace", 0644, d_tracer,
4124-
NULL, &ftrace_notrace_fops);
4128+
&global_ops, &ftrace_notrace_fops);
41254129

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

0 commit comments

Comments
 (0)