tracing: Support multiple pids in set_pid_ftrace file
authorjolsa@redhat.com <jolsa@redhat.com>
Tue, 13 Oct 2009 20:33:52 +0000 (16:33 -0400)
committerIngo Molnar <mingo@elte.hu>
Wed, 14 Oct 2009 06:13:53 +0000 (08:13 +0200)
commit756d17ee7ee4fbc8238bdf97100af63e6ac441ef
treed0b794f4964be5689fc1bd64302969405000e18b
parent194ec34184869f0de1cf255c924fc5299e1b3d27
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>
kernel/trace/ftrace.c
kernel/trace/trace.h