]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
tracing: Add some documentation about set_event_pid
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Tue, 3 Nov 2015 21:37:15 +0000 (16:37 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 3 Nov 2015 21:37:15 +0000 (16:37 -0500)
Update Documentation to include some comments about how to use
set_event_pid.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Documentation/trace/events.txt
Documentation/trace/ftrace.txt

index 75d25a1d6e42e7ba96677a40b336b2091e489b2e..c010be8c85d7668547459badcc964e822b494e30 100644 (file)
@@ -288,6 +288,24 @@ prev_pid == 0
 # cat sched_wakeup/filter
 common_pid == 0
 
+5.4 PID filtering
+-----------------
+
+The set_event_pid file in the same directory as the top events directory
+exists, will filter all events from tracing any task that does not have the
+PID listed in the set_event_pid file.
+
+# cd /sys/kernel/debug/tracing
+# echo $$ > set_event_pid
+# echo 1 > events/enabled
+
+Will only trace events for the current task.
+
+To add more PIDs without losing the PIDs already included, use '>>'.
+
+# echo 123 244 1 >> set_event_pid
+
+
 6. Event triggers
 =================
 
index db18362c14f3a276e107db8ff563ec2d464f02c7..f52f297cb40627a7d5855f04399977f304272e51 100644 (file)
@@ -204,6 +204,12 @@ of ftrace. Here is a list of some of the key files:
 
        Have the function tracer only trace a single thread.
 
+  set_event_pid:
+
+       Have the events only trace a task with a PID listed in this file.
+       Note, sched_switch and sched_wake_up will also trace events
+       listed in this file.
+
   set_graph_function:
 
        Set a "trigger" function where tracing should start