aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-01-23 00:10:04 -0500
committerSteven Rostedt <rostedt@goodmis.org>2014-01-23 00:10:04 -0500
commit71485c45891b8a0fcc4ce22d87251424ab51e096 (patch)
tree3d616ff76f65747963bd2612db14fa0d9036c02e /kernel/trace/trace.c
parent26f255646e0ca6fde0e994e2a815ba2b31770dce (diff)
tracing: Fix formatting of trace README file
Fix the formatting of the README file in the trace debugfs to fit in an 80 character window. Also add a comment about the event trigger counter with regards to traceon and traceoff. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c116
1 files changed, 64 insertions, 52 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 2ced5e5931b9..7857ea9b3b9c 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3519,91 +3519,103 @@ static const char readme_msg[] =
3519 " instances\t\t- Make sub-buffers with: mkdir instances/foo\n" 3519 " instances\t\t- Make sub-buffers with: mkdir instances/foo\n"
3520 "\t\t\t Remove sub-buffer with rmdir\n" 3520 "\t\t\t Remove sub-buffer with rmdir\n"
3521 " trace_options\t\t- Set format or modify how tracing happens\n" 3521 " trace_options\t\t- Set format or modify how tracing happens\n"
3522 "\t\t\t Disable an option by adding a suffix 'no' to the option name\n" 3522 "\t\t\t Disable an option by adding a suffix 'no' to the\n"
3523 "\t\t\t option name\n"
3523#ifdef CONFIG_DYNAMIC_FTRACE 3524#ifdef CONFIG_DYNAMIC_FTRACE
3524 "\n available_filter_functions - list of functions that can be filtered on\n" 3525 "\n available_filter_functions - list of functions that can be filtered on\n"
3525 " set_ftrace_filter\t- echo function name in here to only trace these functions\n" 3526 " set_ftrace_filter\t- echo function name in here to only trace these\n"
3526 " accepts: func_full_name, *func_end, func_begin*, *func_middle*\n" 3527 "\t\t\t functions\n"
3527 " modules: Can select a group via module\n" 3528 "\t accepts: func_full_name, *func_end, func_begin*, *func_middle*\n"
3528 " Format: :mod:<module-name>\n" 3529 "\t modules: Can select a group via module\n"
3529 " example: echo :mod:ext3 > set_ftrace_filter\n" 3530 "\t Format: :mod:<module-name>\n"
3530 " triggers: a command to perform when function is hit\n" 3531 "\t example: echo :mod:ext3 > set_ftrace_filter\n"
3531 " Format: <function>:<trigger>[:count]\n" 3532 "\t triggers: a command to perform when function is hit\n"
3532 " trigger: traceon, traceoff\n" 3533 "\t Format: <function>:<trigger>[:count]\n"
3533 " enable_event:<system>:<event>\n" 3534 "\t trigger: traceon, traceoff\n"
3534 " disable_event:<system>:<event>\n" 3535 "\t\t enable_event:<system>:<event>\n"
3536 "\t\t disable_event:<system>:<event>\n"
3535#ifdef CONFIG_STACKTRACE 3537#ifdef CONFIG_STACKTRACE
3536 " stacktrace\n" 3538 "\t\t stacktrace\n"
3537#endif 3539#endif
3538#ifdef CONFIG_TRACER_SNAPSHOT 3540#ifdef CONFIG_TRACER_SNAPSHOT
3539 " snapshot\n" 3541 "\t\t snapshot\n"
3540#endif 3542#endif
3541 " example: echo do_fault:traceoff > set_ftrace_filter\n" 3543 "\t example: echo do_fault:traceoff > set_ftrace_filter\n"
3542 " echo do_trap:traceoff:3 > set_ftrace_filter\n" 3544 "\t echo do_trap:traceoff:3 > set_ftrace_filter\n"
3543 " The first one will disable tracing every time do_fault is hit\n" 3545 "\t The first one will disable tracing every time do_fault is hit\n"
3544 " The second will disable tracing at most 3 times when do_trap is hit\n" 3546 "\t The second will disable tracing at most 3 times when do_trap is hit\n"
3545 " The first time do trap is hit and it disables tracing, the counter\n" 3547 "\t The first time do trap is hit and it disables tracing, the\n"
3546 " will decrement to 2. If tracing is already disabled, the counter\n" 3548 "\t counter will decrement to 2. If tracing is already disabled,\n"
3547 " will not decrement. It only decrements when the trigger did work\n" 3549 "\t the counter will not decrement. It only decrements when the\n"
3548 " To remove trigger without count:\n" 3550 "\t trigger did work\n"
3549 " echo '!<function>:<trigger> > set_ftrace_filter\n" 3551 "\t To remove trigger without count:\n"
3550 " To remove trigger with a count:\n" 3552 "\t echo '!<function>:<trigger> > set_ftrace_filter\n"
3551 " echo '!<function>:<trigger>:0 > set_ftrace_filter\n" 3553 "\t To remove trigger with a count:\n"
3554 "\t echo '!<function>:<trigger>:0 > set_ftrace_filter\n"
3552 " set_ftrace_notrace\t- echo function name in here to never trace.\n" 3555 " set_ftrace_notrace\t- echo function name in here to never trace.\n"
3553 " accepts: func_full_name, *func_end, func_begin*, *func_middle*\n" 3556 "\t accepts: func_full_name, *func_end, func_begin*, *func_middle*\n"
3554 " modules: Can select a group via module command :mod:\n" 3557 "\t modules: Can select a group via module command :mod:\n"
3555 " Does not accept triggers\n" 3558 "\t Does not accept triggers\n"
3556#endif /* CONFIG_DYNAMIC_FTRACE */ 3559#endif /* CONFIG_DYNAMIC_FTRACE */
3557#ifdef CONFIG_FUNCTION_TRACER 3560#ifdef CONFIG_FUNCTION_TRACER
3558 " set_ftrace_pid\t- Write pid(s) to only function trace those pids (function)\n" 3561 " set_ftrace_pid\t- Write pid(s) to only function trace those pids\n"
3562 "\t\t (function)\n"
3559#endif 3563#endif
3560#ifdef CONFIG_FUNCTION_GRAPH_TRACER 3564#ifdef CONFIG_FUNCTION_GRAPH_TRACER
3561 " set_graph_function\t- Trace the nested calls of a function (function_graph)\n" 3565 " set_graph_function\t- Trace the nested calls of a function (function_graph)\n"
3562 " max_graph_depth\t- Trace a limited depth of nested calls (0 is unlimited)\n" 3566 " max_graph_depth\t- Trace a limited depth of nested calls (0 is unlimited)\n"
3563#endif 3567#endif
3564#ifdef CONFIG_TRACER_SNAPSHOT 3568#ifdef CONFIG_TRACER_SNAPSHOT
3565 "\n snapshot\t\t- Like 'trace' but shows the content of the static snapshot buffer\n" 3569 "\n snapshot\t\t- Like 'trace' but shows the content of the static\n"
3566 "\t\t\t Read the contents for more information\n" 3570 "\t\t\t snapshot buffer. Read the contents for more\n"
3571 "\t\t\t information\n"
3567#endif 3572#endif
3568#ifdef CONFIG_STACK_TRACER 3573#ifdef CONFIG_STACK_TRACER
3569 " stack_trace\t\t- Shows the max stack trace when active\n" 3574 " stack_trace\t\t- Shows the max stack trace when active\n"
3570 " stack_max_size\t- Shows current max stack size that was traced\n" 3575 " stack_max_size\t- Shows current max stack size that was traced\n"
3571 "\t\t\t Write into this file to reset the max size (trigger a new trace)\n" 3576 "\t\t\t Write into this file to reset the max size (trigger a\n"
3577 "\t\t\t new trace)\n"
3572#ifdef CONFIG_DYNAMIC_FTRACE 3578#ifdef CONFIG_DYNAMIC_FTRACE
3573 " stack_trace_filter\t- Like set_ftrace_filter but limits what stack_trace traces\n" 3579 " stack_trace_filter\t- Like set_ftrace_filter but limits what stack_trace\n"
3580 "\t\t\t traces\n"
3574#endif 3581#endif
3575#endif /* CONFIG_STACK_TRACER */ 3582#endif /* CONFIG_STACK_TRACER */
3576 " events/\t\t- Directory containing all trace event subsystems:\n" 3583 " 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" 3584 " 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" 3585 " 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" 3586 " enable\t\t- Write 0/1 to enable/disable tracing of all <system>\n"
3587 "\t\t\t events\n"
3580 " filter\t\t- If set, only events passing filter are traced\n" 3588 " filter\t\t- If set, only events passing filter are traced\n"
3581 " events/<system>/<event>/\t- Directory containing control files for <event>:\n" 3589 " events/<system>/<event>/\t- Directory containing control files for\n"
3590 "\t\t\t <event>:\n"
3582 " enable\t\t- Write 0/1 to enable/disable tracing of <event>\n" 3591 " 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" 3592 " 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" 3593 " trigger\t\t- If set, a command to perform when event is hit\n"
3585 " Format: <trigger>[:count][if <filter>]\n" 3594 "\t Format: <trigger>[:count][if <filter>]\n"
3586 " trigger: traceon, traceoff\n" 3595 "\t trigger: traceon, traceoff\n"
3587 " enable_event:<system>:<event>\n" 3596 "\t enable_event:<system>:<event>\n"
3588 " disable_event:<system>:<event>\n" 3597 "\t disable_event:<system>:<event>\n"
3589#ifdef CONFIG_STACKTRACE 3598#ifdef CONFIG_STACKTRACE
3590 " stacktrace\n" 3599 "\t\t stacktrace\n"
3591#endif 3600#endif
3592#ifdef CONFIG_TRACER_SNAPSHOT 3601#ifdef CONFIG_TRACER_SNAPSHOT
3593 " snapshot\n" 3602 "\t\t snapshot\n"
3594#endif 3603#endif
3595 " example: echo traceoff > events/block/block_unplug/trigger\n" 3604 "\t example: echo traceoff > events/block/block_unplug/trigger\n"
3596 " echo traceoff:3 > events/block/block_unplug/trigger\n" 3605 "\t 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" 3606 "\t echo 'enable_event:kmem:kmalloc:3 if nr_rq > 1' > \\\n"
3598 " The first disables tracing every time block_unplug is hit.\n" 3607 "\t events/block/block_unplug/trigger\n"
3599 " The second disables tracing the first 3 times block_unplug is hit.\n" 3608 "\t The first disables tracing every time block_unplug is hit.\n"
3600 " The third enables the kmalloc event the first 3 times block_unplug\n" 3609 "\t The second disables tracing the first 3 times block_unplug is hit.\n"
3601 " is hit and has value of greater than 1 for the 'nr_rq' event field.\n" 3610 "\t The third enables the kmalloc event the first 3 times block_unplug\n"
3602 " To remove a trigger without a count:\n" 3611 "\t is hit and has value of greater than 1 for the 'nr_rq' event field.\n"
3603 " echo '!<trigger> > <system>/<event>/trigger\n" 3612 "\t Like function triggers, the counter is only decremented if it\n"
3604 " To remove a trigger with a count:\n" 3613 "\t enabled or disabled tracing.\n"
3605 " echo '!<trigger>:0 > <system>/<event>/trigger\n" 3614 "\t To remove a trigger without a count:\n"
3606 " Filters can be ignored when removing a trigger.\n" 3615 "\t echo '!<trigger> > <system>/<event>/trigger\n"
3616 "\t To remove a trigger with a count:\n"
3617 "\t echo '!<trigger>:0 > <system>/<event>/trigger\n"
3618 "\t Filters can be ignored when removing a trigger.\n"
3607; 3619;
3608 3620
3609static ssize_t 3621static ssize_t