aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2008-12-04 17:49:47 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-05 08:47:43 -0500
commit77d683f3e0258d522c5506e7b5fd05c9411184d9 (patch)
treedefa7451b5218e7cfdd3a92117fca96368791425 /kernel
parentff32504fdc56407654584ef187b20022c94a3486 (diff)
tracing/ftrace: fix the check of ftrace_trace_task
Impact: fix default empty traces on function-graph-tracer The actual ftrace_trace_task() checks if ftrace_pid_trace is allocated and return 1 if it is true. If it is NULL, it will check the bit of pid tracing flag for the current task (which are not set by default). So by default, a task is not traced. Actually all tasks should be traced by default and filter_by_pid when ftrace_pid_trace is allocated. The appropriate condition should be to return 1 if filter_by_pid is set. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Acke-dby: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index a71bbe0a3631..5ac697065a48 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -551,7 +551,7 @@ extern struct pid *ftrace_pid_trace;
551 551
552static inline int ftrace_trace_task(struct task_struct *task) 552static inline int ftrace_trace_task(struct task_struct *task)
553{ 553{
554 if (ftrace_pid_trace) 554 if (!ftrace_pid_trace)
555 return 1; 555 return 1;
556 556
557 return test_tsk_trace_trace(task); 557 return test_tsk_trace_trace(task);