diff options
author | jolsa@redhat.com <jolsa@redhat.com> | 2009-10-13 16:33:52 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-14 02:13:53 -0400 |
commit | 756d17ee7ee4fbc8238bdf97100af63e6ac441ef (patch) | |
tree | d0b794f4964be5689fc1bd64302969405000e18b /kernel/trace/trace.h | |
parent | 194ec34184869f0de1cf255c924fc5299e1b3d27 (diff) |
tracing: Support multiple pids in set_pid_ftrace file
Adding the possibility to set more than 1 pid in the set_pid_ftrace
file, thus allowing to trace more than 1 independent processes.
Usage:
sh-4.0# echo 284 > ./set_ftrace_pid
sh-4.0# cat ./set_ftrace_pid
284
sh-4.0# echo 1 >> ./set_ftrace_pid
sh-4.0# echo 0 >> ./set_ftrace_pid
sh-4.0# cat ./set_ftrace_pid
swapper tasks
1
284
sh-4.0# echo 4 > ./set_ftrace_pid
sh-4.0# cat ./set_ftrace_pid
4
sh-4.0# echo > ./set_ftrace_pid
sh-4.0# cat ./set_ftrace_pid
no pid
sh-4.0#
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20091013203425.565454612@goodmis.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index f22a7ac32380..acef8b4636f0 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -496,12 +496,12 @@ print_graph_function(struct trace_iterator *iter) | |||
496 | } | 496 | } |
497 | #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ | 497 | #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ |
498 | 498 | ||
499 | extern struct pid *ftrace_pid_trace; | 499 | extern struct list_head ftrace_pids; |
500 | 500 | ||
501 | #ifdef CONFIG_FUNCTION_TRACER | 501 | #ifdef CONFIG_FUNCTION_TRACER |
502 | static inline int ftrace_trace_task(struct task_struct *task) | 502 | static inline int ftrace_trace_task(struct task_struct *task) |
503 | { | 503 | { |
504 | if (!ftrace_pid_trace) | 504 | if (list_empty(&ftrace_pids)) |
505 | return 1; | 505 | return 1; |
506 | 506 | ||
507 | return test_tsk_trace_trace(task); | 507 | return test_tsk_trace_trace(task); |