提交 26a94491 编写于 作者: T Tom Zanussi 提交者: Steven Rostedt (VMware)

tracing: Add tracing/error_log Documentation

Move most of the hist trigger extended error documentation to
ftrace.rst and expand on it to fully document tracing/error_log.

Link: http://lkml.kernel.org/r/c5d53c8f643ef6844d6ad8d0200c116936730b01.1554072478.git.tom.zanussi@linux.intel.comAcked-by: NMasami Hiramatsu <mhiramat@kernel.org>
Acked-by: NNamhyung Kim <namhyung@kernel.org>
Signed-off-by: NTom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
上级 4eab1cc4
...@@ -765,6 +765,37 @@ Here is the list of current tracers that may be configured. ...@@ -765,6 +765,37 @@ Here is the list of current tracers that may be configured.
tracers from tracing simply echo "nop" into tracers from tracing simply echo "nop" into
current_tracer. current_tracer.
Error conditions
----------------
For most ftrace commands, failure modes are obvious and communicated
using standard return codes.
For other more involved commands, extended error information may be
available via the tracing/error_log file. For the commands that
support it, reading the tracing/error_log file after an error will
display more detailed information about what went wrong, if
information is available. The tracing/error_log file is a circular
error log displaying a small number (currently, 8) of ftrace errors
for the last (8) failed commands.
The extended error information and usage takes the form shown in
this example::
# echo xxx > /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger
echo: write error: Invalid argument
# cat /sys/kernel/debug/tracing/error_log
[ 5348.887237] location: error: Couldn't yyy: zzz
Command: xxx
^
[ 7517.023364] location: error: Bad rrr: sss
Command: ppp qqq
^
To clear the error log, echo the empty string into it::
# echo > /sys/kernel/debug/tracing/error_log
Examples of using the tracer Examples of using the tracer
---------------------------- ----------------------------
......
...@@ -199,20 +199,8 @@ Extended error information ...@@ -199,20 +199,8 @@ Extended error information
For some error conditions encountered when invoking a hist trigger For some error conditions encountered when invoking a hist trigger
command, extended error information is available via the command, extended error information is available via the
corresponding event's 'hist' file. Reading the hist file after an tracing/error_log file. See Error Conditions in
error will display more detailed information about what went wrong, :file:`Documentation/trace/ftrace.rst` for details.
if information is available. This extended error information will
be available until the next hist trigger command for that event.
If available for a given error condition, the extended error
information and usage takes the following form::
# echo xxx > /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger
echo: write error: Invalid argument
# cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist
ERROR: Couldn't yyy: zzz
Last command: xxx
6.2 'hist' trigger examples 6.2 'hist' trigger examples
--------------------------- ---------------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册