diff options
| author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2015-11-03 16:37:15 -0500 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2015-11-03 16:37:15 -0500 |
| commit | 627645fdb657dfae5fcf26bbf6a6e1b63751dbc8 (patch) | |
| tree | 7c8d356aa5ba5d77def07dd5859d848c94172131 | |
| parent | 54ed1444052467044e9e01334ac8123dd6345211 (diff) | |
tracing: Add some documentation about set_event_pid
Update Documentation to include some comments about how to use
set_event_pid.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| -rw-r--r-- | Documentation/trace/events.txt | 18 | ||||
| -rw-r--r-- | Documentation/trace/ftrace.txt | 6 |
2 files changed, 24 insertions, 0 deletions
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 | |||
| 288 | # cat sched_wakeup/filter | 288 | # cat sched_wakeup/filter |
| 289 | common_pid == 0 | 289 | common_pid == 0 |
| 290 | 290 | ||
| 291 | 5.4 PID filtering | ||
| 292 | ----------------- | ||
| 293 | |||
| 294 | The set_event_pid file in the same directory as the top events directory | ||
| 295 | exists, will filter all events from tracing any task that does not have the | ||
| 296 | PID listed in the set_event_pid file. | ||
| 297 | |||
| 298 | # cd /sys/kernel/debug/tracing | ||
| 299 | # echo $$ > set_event_pid | ||
| 300 | # echo 1 > events/enabled | ||
| 301 | |||
| 302 | Will only trace events for the current task. | ||
| 303 | |||
| 304 | To add more PIDs without losing the PIDs already included, use '>>'. | ||
| 305 | |||
| 306 | # echo 123 244 1 >> set_event_pid | ||
| 307 | |||
| 308 | |||
| 291 | 6. Event triggers | 309 | 6. Event triggers |
| 292 | ================= | 310 | ================= |
| 293 | 311 | ||
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: | |||
| 204 | 204 | ||
| 205 | Have the function tracer only trace a single thread. | 205 | Have the function tracer only trace a single thread. |
| 206 | 206 | ||
| 207 | set_event_pid: | ||
| 208 | |||
| 209 | Have the events only trace a task with a PID listed in this file. | ||
| 210 | Note, sched_switch and sched_wake_up will also trace events | ||
| 211 | listed in this file. | ||
| 212 | |||
| 207 | set_graph_function: | 213 | set_graph_function: |
| 208 | 214 | ||
| 209 | Set a "trigger" function where tracing should start | 215 | Set a "trigger" function where tracing should start |
