Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285068
b: refs/heads/master
c: d2d45c7
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Dec 21, 2011
1 parent a4c00fe commit f2002ec
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 69a3083c4a7df0322d97bb2b43a33cb12af8131a
refs/heads/master: d2d45c7a03a2b1a14159cbb665e9dd60991a7d4f
19 changes: 18 additions & 1 deletion trunk/kernel/trace/trace_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ stack_trace_call(unsigned long ip, unsigned long parent_ip)
static struct ftrace_ops trace_ops __read_mostly =
{
.func = stack_trace_call,
.flags = FTRACE_OPS_FL_GLOBAL,
};

static ssize_t
Expand Down Expand Up @@ -311,6 +310,21 @@ static const struct file_operations stack_trace_fops = {
.release = seq_release,
};

static int
stack_trace_filter_open(struct inode *inode, struct file *file)
{
return ftrace_regex_open(&trace_ops, FTRACE_ITER_FILTER,
inode, file);
}

static const struct file_operations stack_trace_filter_fops = {
.open = stack_trace_filter_open,
.read = seq_read,
.write = ftrace_filter_write,
.llseek = ftrace_regex_lseek,
.release = ftrace_regex_release,
};

int
stack_trace_sysctl(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp,
Expand Down Expand Up @@ -358,6 +372,9 @@ static __init int stack_trace_init(void)
trace_create_file("stack_trace", 0444, d_tracer,
NULL, &stack_trace_fops);

trace_create_file("stack_trace_filter", 0444, d_tracer,
NULL, &stack_trace_filter_fops);

if (stack_tracer_enabled)
register_ftrace_function(&trace_ops);

Expand Down

0 comments on commit f2002ec

Please sign in to comment.