Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121254
b: refs/heads/master
c: 804a685
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Dec 4, 2008
1 parent fa085a1 commit 8f0fd85
Show file tree
Hide file tree
Showing 4 changed files with 15 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: 0ef8cde56ab92ab3f65221246dc1622c6b5068b3
refs/heads/master: 804a685162a7080386714166776f57255a75238e
2 changes: 1 addition & 1 deletion trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int ftrace_enabled __read_mostly;
static int last_ftrace_enabled;

/* set when tracing only a pid */
static int ftrace_pid_trace = -1;
int ftrace_pid_trace = -1;

/* Quick disabling of function tracer. */
int function_trace_stop;
Expand Down
3 changes: 3 additions & 0 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,9 @@ int trace_graph_entry(struct ftrace_graph_ent *trace)
int cpu;
int pc;

if (!ftrace_trace_task(current))
return 0;

if (!ftrace_graph_addr(trace->func))
return 0;

Expand Down
10 changes: 10 additions & 0 deletions trunk/kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,16 @@ print_graph_function(struct trace_iterator *iter)
}
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */

extern int ftrace_pid_trace;

static inline int ftrace_trace_task(struct task_struct *task)
{
if (ftrace_pid_trace < 0)
return 1;

return test_tsk_trace_trace(task);
}

/*
* trace_iterator_flags is an enumeration that defines bit
* positions into trace_flags that controls the output.
Expand Down

0 comments on commit 8f0fd85

Please sign in to comment.