aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2008-12-03 15:36:59 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-04 03:09:36 -0500
commit804a685162a7080386714166776f57255a75238e (patch)
treef7b79000146532c0ad6571440652368e2521119a /kernel/trace/trace.c
parent0ef8cde56ab92ab3f65221246dc1622c6b5068b3 (diff)
ftrace: trace single pid for function graph tracer
Impact: New feature This patch makes the changes to set_ftrace_pid apply to the function graph tracer. # echo $$ > /debugfs/tracing/set_ftrace_pid # echo function_graph > /debugfs/tracing/current_tracer Will cause only the current task to be traced. Note, the trace flags are also inherited by child processes, so the children of the shell will also be traced. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 710b39acd81b..1bd9574404e5 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1209,6 +1209,9 @@ int trace_graph_entry(struct ftrace_graph_ent *trace)
1209 int cpu; 1209 int cpu;
1210 int pc; 1210 int pc;
1211 1211
1212 if (!ftrace_trace_task(current))
1213 return 0;
1214
1212 if (!ftrace_graph_addr(trace->func)) 1215 if (!ftrace_graph_addr(trace->func))
1213 return 0; 1216 return 0;
1214 1217