Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1262354 > unrolled thread

[for-next][PATCH 11/13] tracing: Add some documentation about set_event_pid

Started bySteven Rostedt <rostedt@goodmis.org>
First post2015-11-04 16:40 +0100
Last post2015-11-04 16:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [for-next][PATCH 11/13] tracing: Add some documentation about set_event_pid Steven Rostedt <rostedt@goodmis.org> - 2015-11-04 16:40 +0100

#1262354 — [for-next][PATCH 11/13] tracing: Add some documentation about set_event_pid

FromSteven Rostedt <rostedt@goodmis.org>
Date2015-11-04 16:40 +0100
Subject[for-next][PATCH 11/13] tracing: Add some documentation about set_event_pid
Message-ID<qr8kh-2go-1@gated-at.bofh.it>
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

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 | 18 ++++++++++++++++++
 Documentation/trace/ftrace.txt |  6 ++++++
 2 files changed, 24 insertions(+)

diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt
index 75d25a1d6e42..c010be8c85d7 100644
--- a/Documentation/trace/events.txt
+++ b/Documentation/trace/events.txt
@@ -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
 =================
 
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index db18362c14f3..f52f297cb406 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -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
-- 
2.6.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web