Re: [for-next][PATCH 9/9] tracing: Update debugfs README file
Here's the new version of the patch. The diff between versions is: diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 83ad596..829b2be 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -3311,7 +3311,7 @@ static const char readme_msg[] = " buffer_size_kb\t- view and modify size of per cpu buffer\n" " buffer_total_size_kb - view total size of all cpu buffers\n\n" " trace_clock\t\t-change the clock used to order events\n" - " local: Per cpu clock but may not be synced across CPUS\n" + " local: Per cpu clock but may not be synced across CPUs\n" " global: Synced across CPUs but slows tracing down.\n" " counter: Not a clock, but just an increment\n" " uptime: Jiffy counter from time of boot\n" @@ -3345,8 +3345,11 @@ static const char readme_msg[] = #endif " example: echo do_fault:traceoff > set_ftrace_filter\n" " echo do_trap:traceoff:3 > set_ftrace_filter\n" - " The first one will disable tracing everytime do_fault is hit\n" - " The second will disable tracing at most 3 times whne do_trap is hit\n" + " The first one will disable tracing every time do_fault is hit\n" + " The second will disable tracing at most 3 times when do_trap is hit\n" + " The first time do trap is hit and it disables tracing, the counter\n" + " will decrement to 2. If tracing is already disabled, the counter\n" + " will not decrement. It only decrements when the trigger did work\n" " To remove trigger without count:\n" " echo '!: > set_ftrace_filter\n" " To remove trigger with a count:\n" @@ -3364,8 +3367,8 @@ static const char readme_msg[] = " max_graph_depth\t- Trace a limited depth of nested calls (0 is unlimited)\n" #endif #ifdef CONFIG_TRACER_SNAPSHOT - "\n snashot\t\t- Like 'trace' but shows the content of the static snapshot buffer\n" - "\t\t\t Read the contents for more infromation\n" + "\n snapshot\t\t- Like 'trace' but shows the content of the static snapshot buffer\n" + "\t\t\t Read the contents for more information\n" #endif #ifdef CONFIG_STACKTRACE " stack_trace\t\t- Shows the max stack trace when active\n" And here's the real patch: tracing: Update debugfs README file Update the README file in debugfs/tracing to something more useful. What's currently in the file is very old and what it shows doesn't have much use. Heck, it tells you how to mount debugfs! But to read this file you would have already needed to mount it. Replace the file with current up-to-date information. It's rather limited, but what do you expect from a pseudo README file. Signed-off-by: Steven Rostedt --- kernel/trace/trace.c | 92 ++ 1 file changed, 78 insertions(+), 14 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 3dc7999..829b2be 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -3300,20 +3300,84 @@ static const struct file_operations tracing_iter_fops = { static const char readme_msg[] = "tracing mini-HOWTO:\n\n" - "# mount -t debugfs nodev /sys/kernel/debug\n\n" - "# cat /sys/kernel/debug/tracing/available_tracers\n" - "wakeup wakeup_rt preemptirqsoff preemptoff irqsoff function nop\n\n" - "# cat /sys/kernel/debug/tracing/current_tracer\n" - "nop\n" - "# echo wakeup > /sys/kernel/debug/tracing/current_tracer\n" - "# cat /sys/kernel/debug/tracing/current_tracer\n" - "wakeup\n" - "# cat /sys/kernel/debug/tracing/trace_options\n" - "noprint-parent nosym-offset nosym-addr noverbose\n" - "# echo print-parent > /sys/kernel/debug/tracing/trace_options\n" - "# echo 1 > /sys/kernel/debug/tracing/tracing_on\n" - "# cat /sys/kernel/debug/tracing/trace > /tmp/trace.txt\n" - "# echo 0 > /sys/kernel/debug/tracing/tracing_on\n" + "# echo 0 > tracing_on : quick way to disable tracing\n" + "# echo 1 > tracing_on : quick way to re-enable tracing\n\n" + " Important files:\n" + " trace\t\t\t- The static contents of the buffer\n" + "\t\t\t To clear the buffer write into this file: echo > trace\n" + " trace_pipe\t\t- A consuming read to see the contents of the buffer\n" + " current_tracer\t- function and latency tracers\n" + " available_tracers\t- list of configured tracers for current_tracer\n" + " buffer_size_kb\t- view and modify size of per cpu buffer\n" + " buffer_total_size_kb - view total size of all cpu buffers\n\n" + " trace_clock\t\t-change the clock used to order events\n" + " local: Per cpu clock but may not be synced across CPUs\n" + " global:
Re: [for-next][PATCH 9/9] tracing: Update debugfs README file
On Mon, 2013-03-18 at 18:03 +0900, Keun-O Park wrote: > >> +#endif > >> +#ifdef CONFIG_TRACER_SNAPSHOT > >> + "\n snashot\t\t- Like 'trace' but shows the content of the static > >> snapshot buffer\n" > >> + "\t\t\t Read the contents for more infromation\n" > >> +#endif > > There're two more typos. > s/snashot/snapshot/ > s/infromation/information/ > spellcheck doesn't work well for patches. Thanks, -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [for-next][PATCH 9/9] tracing: Update debugfs README file
On Mon, 2013-03-18 at 17:22 +0900, Namhyung Kim wrote: > > + " example: echo do_fault:traceoff > set_ftrace_filter\n" > > + " echo do_trap:traceoff:3 > set_ftrace_filter\n" > > + " The first one will disable tracing everytime do_fault is > > hit\n" > > + " The second will disable tracing at most 3 times whne > > do_trap is hit\n" > > s/whne/when/ > > It's slightly confusing for me to read the "at most" part. Did you mean > it by "The second will disable tracing after do_trace is hit 3 times"? Yeah, I wrote this on little sleep. I'll revise it a little. Thanks! -- Steve > > > + " To remove trigger without count:\n" > > + " echo '!: > set_ftrace_filter\n" > > + " To remove trigger with a count:\n" > > + " echo '!::0 > set_ftrace_filter\n" > > + " set_ftrace_notrace\t- echo function name in here to never trace.\n" > > + "accepts: func_full_name, *func_end, func_begin*, > > *func_middle*\n" > > + "modules: Can select a group via module command :mod:\n" > > + "Does not accept triggers\n" > > +#endif /* CONFIG_DYNAMIC_FTRACE */ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [for-next][PATCH 9/9] tracing: Update debugfs README file
On Mon, Mar 18, 2013 at 5:22 PM, Namhyung Kim wrote: > Hi Steve, > > On Fri, 15 Mar 2013 23:24:21 -0400, Steven Rostedt wrote: >> From: "Steven Rostedt (Red Hat)" >> >> Update the README file in debugfs/tracing to something more useful. >> What's currently in the file is very old and what it shows doesn't >> have much use. Heck, it tells you how to mount debugfs! But to read >> this file you would have already needed to mount it. >> >> Replace the file with current up-to-date information. It's rather >> limited, but what do you expect from a pseudo README file. >> >> Signed-off-by: Steven Rostedt >> --- >> kernel/trace/trace.c | 89 >> ++ >> 1 file changed, 75 insertions(+), 14 deletions(-) >> >> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c >> index 3dc7999..83ad596 100644 >> --- a/kernel/trace/trace.c >> +++ b/kernel/trace/trace.c >> @@ -3300,20 +3300,81 @@ static const struct file_operations >> tracing_iter_fops = { >> >> static const char readme_msg[] = >> "tracing mini-HOWTO:\n\n" >> - "# mount -t debugfs nodev /sys/kernel/debug\n\n" >> - "# cat /sys/kernel/debug/tracing/available_tracers\n" >> - "wakeup wakeup_rt preemptirqsoff preemptoff irqsoff function nop\n\n" >> - "# cat /sys/kernel/debug/tracing/current_tracer\n" >> - "nop\n" >> - "# echo wakeup > /sys/kernel/debug/tracing/current_tracer\n" >> - "# cat /sys/kernel/debug/tracing/current_tracer\n" >> - "wakeup\n" >> - "# cat /sys/kernel/debug/tracing/trace_options\n" >> - "noprint-parent nosym-offset nosym-addr noverbose\n" >> - "# echo print-parent > /sys/kernel/debug/tracing/trace_options\n" >> - "# echo 1 > /sys/kernel/debug/tracing/tracing_on\n" >> - "# cat /sys/kernel/debug/tracing/trace > /tmp/trace.txt\n" >> - "# echo 0 > /sys/kernel/debug/tracing/tracing_on\n" >> + "# echo 0 > tracing_on : quick way to disable tracing\n" >> + "# echo 1 > tracing_on : quick way to re-enable tracing\n\n" >> + " Important files:\n" >> + " trace\t\t\t- The static contents of the buffer\n" >> + "\t\t\t To clear the buffer write into this file: echo > trace\n" >> + " trace_pipe\t\t- A consuming read to see the contents of the >> buffer\n" >> + " current_tracer\t- function and latency tracers\n" >> + " available_tracers\t- list of configured tracers for >> current_tracer\n" >> + " buffer_size_kb\t- view and modify size of per cpu buffer\n" >> + " buffer_total_size_kb - view total size of all cpu buffers\n\n" >> + " trace_clock\t\t-change the clock used to order events\n" >> + " local: Per cpu clock but may not be synced across CPUS\n" >> + " global: Synced across CPUs but slows tracing down.\n" >> + " counter: Not a clock, but just an increment\n" >> + " uptime: Jiffy counter from time of boot\n" >> + "perf: Same clock that perf events use\n" >> +#ifdef CONFIG_X86_64 >> + " x86-tsc: TSC cycle counter\n" >> +#endif >> + "\n trace_marker\t\t- Writes into this file writes into the kernel >> buffer\n" >> + " tracing_cpumask\t- Limit which CPUs to trace\n" >> + " instances\t\t- Make sub-buffers with: mkdir instances/foo\n" >> + "\t\t\t Remove sub-buffer with rmdir\n" >> + " trace_options\t\t- Set format or modify how tracing happens\n" >> + "\t\t\t Disable an option by adding a suffix 'no' to the option >> name\n" >> +#ifdef CONFIG_DYNAMIC_FTRACE >> + "\n available_filter_functions - list of functions that can be >> filtered on\n" >> + " set_ftrace_filter\t- echo function name in here to only trace these >> functions\n" >> + "accepts: func_full_name, *func_end, func_begin*, >> *func_middle*\n" >> + "modules: Can select a group via module\n" >> + " Format: :mod:\n" >> + " example: echo :mod:ext3 > set_ftrace_filter\n" >> + "triggers: a command to perform when function is hit\n" >> + " Format: :[:count]\n" >> + " trigger: traceon, traceoff\n" >> + " enable_event::\n" >> + " disable_event::\n" >> +#ifdef CONFIG_STACKTRACE >> + " stacktrace\n" >> +#endif >> +#ifdef CONFIG_TRACER_SNAPSHOT >> + " snapshot\n" >> +#endif >> + " example: echo do_fault:traceoff > set_ftrace_filter\n" >> + " echo do_trap:traceoff:3 > set_ftrace_filter\n" >> + " The first one will disable tracing everytime do_fault is >> hit\n" >> + " The second will disable tracing at most 3 times whne >> do_trap is hit\n" > > s/whne/when/ > > It's slightly confusing for me to read the "at most" part. Did you mean > it by "The second will disable tracing after do_trace is hit 3 times"? > > Thanks, > Namhyung > > >> + "
Re: [for-next][PATCH 9/9] tracing: Update debugfs README file
Hi Steve, On Fri, 15 Mar 2013 23:24:21 -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Red Hat)" > > Update the README file in debugfs/tracing to something more useful. > What's currently in the file is very old and what it shows doesn't > have much use. Heck, it tells you how to mount debugfs! But to read > this file you would have already needed to mount it. > > Replace the file with current up-to-date information. It's rather > limited, but what do you expect from a pseudo README file. > > Signed-off-by: Steven Rostedt > --- > kernel/trace/trace.c | 89 > ++ > 1 file changed, 75 insertions(+), 14 deletions(-) > > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c > index 3dc7999..83ad596 100644 > --- a/kernel/trace/trace.c > +++ b/kernel/trace/trace.c > @@ -3300,20 +3300,81 @@ static const struct file_operations tracing_iter_fops > = { > > static const char readme_msg[] = > "tracing mini-HOWTO:\n\n" > - "# mount -t debugfs nodev /sys/kernel/debug\n\n" > - "# cat /sys/kernel/debug/tracing/available_tracers\n" > - "wakeup wakeup_rt preemptirqsoff preemptoff irqsoff function nop\n\n" > - "# cat /sys/kernel/debug/tracing/current_tracer\n" > - "nop\n" > - "# echo wakeup > /sys/kernel/debug/tracing/current_tracer\n" > - "# cat /sys/kernel/debug/tracing/current_tracer\n" > - "wakeup\n" > - "# cat /sys/kernel/debug/tracing/trace_options\n" > - "noprint-parent nosym-offset nosym-addr noverbose\n" > - "# echo print-parent > /sys/kernel/debug/tracing/trace_options\n" > - "# echo 1 > /sys/kernel/debug/tracing/tracing_on\n" > - "# cat /sys/kernel/debug/tracing/trace > /tmp/trace.txt\n" > - "# echo 0 > /sys/kernel/debug/tracing/tracing_on\n" > + "# echo 0 > tracing_on : quick way to disable tracing\n" > + "# echo 1 > tracing_on : quick way to re-enable tracing\n\n" > + " Important files:\n" > + " trace\t\t\t- The static contents of the buffer\n" > + "\t\t\t To clear the buffer write into this file: echo > trace\n" > + " trace_pipe\t\t- A consuming read to see the contents of the buffer\n" > + " current_tracer\t- function and latency tracers\n" > + " available_tracers\t- list of configured tracers for current_tracer\n" > + " buffer_size_kb\t- view and modify size of per cpu buffer\n" > + " buffer_total_size_kb - view total size of all cpu buffers\n\n" > + " trace_clock\t\t-change the clock used to order events\n" > + " local: Per cpu clock but may not be synced across CPUS\n" > + " global: Synced across CPUs but slows tracing down.\n" > + " counter: Not a clock, but just an increment\n" > + " uptime: Jiffy counter from time of boot\n" > + "perf: Same clock that perf events use\n" > +#ifdef CONFIG_X86_64 > + " x86-tsc: TSC cycle counter\n" > +#endif > + "\n trace_marker\t\t- Writes into this file writes into the kernel > buffer\n" > + " tracing_cpumask\t- Limit which CPUs to trace\n" > + " instances\t\t- Make sub-buffers with: mkdir instances/foo\n" > + "\t\t\t Remove sub-buffer with rmdir\n" > + " trace_options\t\t- Set format or modify how tracing happens\n" > + "\t\t\t Disable an option by adding a suffix 'no' to the option name\n" > +#ifdef CONFIG_DYNAMIC_FTRACE > + "\n available_filter_functions - list of functions that can be > filtered on\n" > + " set_ftrace_filter\t- echo function name in here to only trace these > functions\n" > + "accepts: func_full_name, *func_end, func_begin*, > *func_middle*\n" > + "modules: Can select a group via module\n" > + " Format: :mod:\n" > + " example: echo :mod:ext3 > set_ftrace_filter\n" > + "triggers: a command to perform when function is hit\n" > + " Format: :[:count]\n" > + " trigger: traceon, traceoff\n" > + " enable_event::\n" > + " disable_event::\n" > +#ifdef CONFIG_STACKTRACE > + " stacktrace\n" > +#endif > +#ifdef CONFIG_TRACER_SNAPSHOT > + " snapshot\n" > +#endif > + " example: echo do_fault:traceoff > set_ftrace_filter\n" > + " echo do_trap:traceoff:3 > set_ftrace_filter\n" > + " The first one will disable tracing everytime do_fault is > hit\n" > + " The second will disable tracing at most 3 times whne > do_trap is hit\n" s/whne/when/ It's slightly confusing for me to read the "at most" part. Did you mean it by "The second will disable tracing after do_trace is hit 3 times"? Thanks, Namhyung > + " To remove trigger without count:\n" > + " echo '!: > set_ftrace_filter\n" > + " To remove trigger with a count:\n" > + " echo