diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2019-03-31 19:48:24 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-04-08 09:22:50 -0400 |
commit | 26a944917989d57c0dddec284b3088fa31127717 (patch) | |
tree | f00b6bbbc91e2b7634d8bc6c44574faf2cbd9a93 /Documentation/trace | |
parent | 4eab1cc461a6e820eddf88ac63eed98793c96a7c (diff) |
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.com
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'Documentation/trace')
-rw-r--r-- | Documentation/trace/ftrace.rst | 31 | ||||
-rw-r--r-- | Documentation/trace/histogram.rst | 16 |
2 files changed, 33 insertions, 14 deletions
diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst index 7c5e6d6ab5d1..809b39d066ee 100644 --- a/Documentation/trace/ftrace.rst +++ b/Documentation/trace/ftrace.rst | |||
@@ -765,6 +765,37 @@ Here is the list of current tracers that may be configured. | |||
765 | tracers from tracing simply echo "nop" into | 765 | tracers from tracing simply echo "nop" into |
766 | current_tracer. | 766 | current_tracer. |
767 | 767 | ||
768 | Error conditions | ||
769 | ---------------- | ||
770 | |||
771 | For most ftrace commands, failure modes are obvious and communicated | ||
772 | using standard return codes. | ||
773 | |||
774 | For other more involved commands, extended error information may be | ||
775 | available via the tracing/error_log file. For the commands that | ||
776 | support it, reading the tracing/error_log file after an error will | ||
777 | display more detailed information about what went wrong, if | ||
778 | information is available. The tracing/error_log file is a circular | ||
779 | error log displaying a small number (currently, 8) of ftrace errors | ||
780 | for the last (8) failed commands. | ||
781 | |||
782 | The extended error information and usage takes the form shown in | ||
783 | this example:: | ||
784 | |||
785 | # echo xxx > /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger | ||
786 | echo: write error: Invalid argument | ||
787 | |||
788 | # cat /sys/kernel/debug/tracing/error_log | ||
789 | [ 5348.887237] location: error: Couldn't yyy: zzz | ||
790 | Command: xxx | ||
791 | ^ | ||
792 | [ 7517.023364] location: error: Bad rrr: sss | ||
793 | Command: ppp qqq | ||
794 | ^ | ||
795 | |||
796 | To clear the error log, echo the empty string into it:: | ||
797 | |||
798 | # echo > /sys/kernel/debug/tracing/error_log | ||
768 | 799 | ||
769 | Examples of using the tracer | 800 | Examples of using the tracer |
770 | ---------------------------- | 801 | ---------------------------- |
diff --git a/Documentation/trace/histogram.rst b/Documentation/trace/histogram.rst index 0ea59d45aef1..7612c7ad5715 100644 --- a/Documentation/trace/histogram.rst +++ b/Documentation/trace/histogram.rst | |||
@@ -199,20 +199,8 @@ Extended error information | |||
199 | 199 | ||
200 | For some error conditions encountered when invoking a hist trigger | 200 | For some error conditions encountered when invoking a hist trigger |
201 | command, extended error information is available via the | 201 | command, extended error information is available via the |
202 | corresponding event's 'hist' file. Reading the hist file after an | 202 | tracing/error_log file. See Error Conditions in |
203 | error will display more detailed information about what went wrong, | 203 | :file:`Documentation/trace/ftrace.rst` for details. |
204 | if information is available. This extended error information will | ||
205 | be available until the next hist trigger command for that event. | ||
206 | |||
207 | If available for a given error condition, the extended error | ||
208 | information and usage takes the following form:: | ||
209 | |||
210 | # echo xxx > /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger | ||
211 | echo: write error: Invalid argument | ||
212 | |||
213 | # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist | ||
214 | ERROR: Couldn't yyy: zzz | ||
215 | Last command: xxx | ||
216 | 204 | ||
217 | 6.2 'hist' trigger examples | 205 | 6.2 'hist' trigger examples |
218 | --------------------------- | 206 | --------------------------- |