From: Tom Zanussi <zanussi@kernel.org>
To: rostedt@goodmis.org
Cc: tglx@linutronix.de, mhiramat@kernel.org, namhyung@kernel.org,
bigeasy@linutronix.de, joel@joelfernandes.org,
linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: [PATCH v5 10/11] tracing: Add tracing/error_log Documentation
Date: Sun, 31 Mar 2019 18:48:24 -0500 [thread overview]
Message-ID: <c5d53c8f643ef6844d6ad8d0200c116936730b01.1554072478.git.tom.zanussi@linux.intel.com> (raw)
In-Reply-To: <cover.1554072478.git.tom.zanussi@linux.intel.com>
In-Reply-To: <cover.1554072478.git.tom.zanussi@linux.intel.com>
From: Tom Zanussi <tom.zanussi@linux.intel.com>
Move most of the hist trigger extended error documentation to
ftrace.rst and expand on it to fully document tracing/error_log.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
---
Documentation/trace/ftrace.rst | 31 +++++++++++++++++++++++++++++++
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.
tracers from tracing simply echo "nop" into
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
----------------------------
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
For some error conditions encountered when invoking a hist trigger
command, extended error information is available via the
- corresponding event's 'hist' file. Reading the hist file after an
- error will display more detailed information about what went wrong,
- 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
+ tracing/error_log file. See Error Conditions in
+ :file:`Documentation/trace/ftrace.rst` for details.
6.2 'hist' trigger examples
---------------------------
--
2.14.1
next prev parent reply other threads:[~2019-03-31 23:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-31 23:48 [PATCH v5 00/11] tracing: common error_log for ftrace Tom Zanussi
2019-03-31 23:48 ` [PATCH v5 01/11] tracing: Add tracing error log Tom Zanussi
2019-03-31 23:48 ` [PATCH v5 02/11] tracing: Save the last hist command's associated event name Tom Zanussi
2019-03-31 23:48 ` [PATCH v5 03/11] tracing: Use tracing error_log with hist triggers Tom Zanussi
2019-03-31 23:48 ` [PATCH v5 04/11] tracing: Use tracing error_log with trace event filters Tom Zanussi
2019-03-31 23:48 ` [PATCH v5 05/11] tracing: Use tracing error_log with probe events Tom Zanussi
2019-03-31 23:48 ` [PATCH v5 06/11] selftests/ftrace: Add error_log testcase for probe errors Tom Zanussi
2019-03-31 23:48 ` [PATCH v5 07/11] selftests/ftrace: Move kprobe/uprobe check_error() to test.d/functions Tom Zanussi
2019-03-31 23:48 ` [PATCH v5 08/11] selftests/ftrace: Remove trigger-extended-error-support testcase Tom Zanussi
2019-03-31 23:48 ` [PATCH v5 09/11] selftests/ftrace: Add tracing/error_log testcase Tom Zanussi
2019-03-31 23:48 ` Tom Zanussi [this message]
2019-03-31 23:48 ` [PATCH v5 11/11] tracing: Add error_log to README Tom Zanussi
2019-04-01 2:19 ` [PATCH v5 00/11] tracing: common error_log for ftrace Masami Hiramatsu
2019-04-01 13:31 ` Tom Zanussi
2019-04-01 23:59 ` Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c5d53c8f643ef6844d6ad8d0200c116936730b01.1554072478.git.tom.zanussi@linux.intel.com \
--to=zanussi@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®