Skip to content

Commit 26f2556

Browse files
tzanussirostedt
authored andcommitted
tracing/README: Add event file usage to tracing mini-HOWTO
It would be useful to have a cheat-sheet for everything under tracing/events/ alongside the existing text describing the other files in the tracing/ dir. Add short descriptions of the directories and files under events/ along with examples, similar to the existing text for the other files in tracing/. Also clean up a few minor alignment problems noticed when adding the new text. Link: http://lkml.kernel.org/r/1389993104.3040.445.camel@empanada Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 parent 92fdd98 commit 26f2556

1 file changed

Lines changed: 34 additions & 3 deletions

File tree

‎kernel/trace/trace.c‎

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3523,9 +3523,9 @@ static const char readme_msg[] =
35233523
#ifdef CONFIG_DYNAMIC_FTRACE
35243524
"\n available_filter_functions - list of functions that can be filtered on\n"
35253525
" set_ftrace_filter\t- echo function name in here to only trace these functions\n"
3526-
" accepts: func_full_name, *func_end, func_begin*, *func_middle*\n"
3527-
" modules: Can select a group via module\n"
3528-
" Format: :mod:<module-name>\n"
3526+
" accepts: func_full_name, *func_end, func_begin*, *func_middle*\n"
3527+
" modules: Can select a group via module\n"
3528+
" Format: :mod:<module-name>\n"
35293529
" example: echo :mod:ext3 > set_ftrace_filter\n"
35303530
" triggers: a command to perform when function is hit\n"
35313531
" Format: <function>:<trigger>[:count]\n"
@@ -3573,6 +3573,37 @@ static const char readme_msg[] =
35733573
" stack_trace_filter\t- Like set_ftrace_filter but limits what stack_trace traces\n"
35743574
#endif
35753575
#endif /* CONFIG_STACK_TRACER */
3576+
" events/\t\t- Directory containing all trace event subsystems:\n"
3577+
" enable\t\t- Write 0/1 to enable/disable tracing of all events\n"
3578+
" events/<system>/\t- Directory containing all trace events for <system>:\n"
3579+
" enable\t\t- Write 0/1 to enable/disable tracing of all <system> events\n"
3580+
" filter\t\t- If set, only events passing filter are traced\n"
3581+
" events/<system>/<event>/\t- Directory containing control files for <event>:\n"
3582+
" enable\t\t- Write 0/1 to enable/disable tracing of <event>\n"
3583+
" filter\t\t- If set, only events passing filter are traced\n"
3584+
" trigger\t\t- If set, a command to perform when event is hit\n"
3585+
" Format: <trigger>[:count][if <filter>]\n"
3586+
" trigger: traceon, traceoff\n"
3587+
" enable_event:<system>:<event>\n"
3588+
" disable_event:<system>:<event>\n"
3589+
#ifdef CONFIG_STACKTRACE
3590+
" stacktrace\n"
3591+
#endif
3592+
#ifdef CONFIG_TRACER_SNAPSHOT
3593+
" snapshot\n"
3594+
#endif
3595+
" example: echo traceoff > events/block/block_unplug/trigger\n"
3596+
" echo traceoff:3 > events/block/block_unplug/trigger\n"
3597+
" echo 'enable_event:kmem:kmalloc:3 if nr_rq > 1' > events/block/block_unplug/trigger\n"
3598+
" The first disables tracing every time block_unplug is hit.\n"
3599+
" The second disables tracing the first 3 times block_unplug is hit.\n"
3600+
" The third enables the kmalloc event the first 3 times block_unplug\n"
3601+
" is hit and has value of greater than 1 for the 'nr_rq' event field.\n"
3602+
" To remove a trigger without a count:\n"
3603+
" echo '!<trigger> > <system>/<event>/trigger\n"
3604+
" To remove a trigger with a count:\n"
3605+
" echo '!<trigger>:0 > <system>/<event>/trigger\n"
3606+
" Filters can be ignored when removing a trigger.\n"
35763607
;
35773608

35783609
static ssize_t

0 commit comments

Comments
 (0)