ftrace: use struct pid

Impact: clean up, extend PID filtering to PID namespaces

Eric Biederman suggested using the struct pid for filtering on
pids in the kernel. This patch is based off of a demonstration
of an implementation that Eric sent me in an email.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Steven Rostedt
2008-12-04 00:26:40 -05:00
committed by Ingo Molnar
parent 5ef6476190
commit 978f3a45d9
2 changed files with 46 additions and 34 deletions

View File

@@ -541,11 +541,11 @@ print_graph_function(struct trace_iterator *iter)
}
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
extern int ftrace_pid_trace;
extern struct pid *ftrace_pid_trace;
static inline int ftrace_trace_task(struct task_struct *task)
{
if (ftrace_pid_trace < 0)
if (ftrace_pid_trace)
return 1;
return test_tsk_trace_trace(task);