aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
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.h
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.h')
-rw-r--r--kernel/trace/trace.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 41f026bfc9ed..95fff37ed970 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -541,6 +541,16 @@ print_graph_function(struct trace_iterator *iter)
541} 541}
542#endif /* CONFIG_FUNCTION_GRAPH_TRACER */ 542#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
543 543
544extern int ftrace_pid_trace;
545
546static inline int ftrace_trace_task(struct task_struct *task)
547{
548 if (ftrace_pid_trace < 0)
549 return 1;
550
551 return test_tsk_trace_trace(task);
552}
553
544/* 554/*
545 * trace_iterator_flags is an enumeration that defines bit 555 * trace_iterator_flags is an enumeration that defines bit
546 * positions into trace_flags that controls the output. 556 * positions into trace_flags that controls the output.