summaryrefslogtreecommitdiffstats
path: root/Documentation/trace
diff options
context:
space:
mode:
authorTom Zanussi2018-01-16 03:52:05 +0100
committerSteven Rostedt (VMware)2018-03-10 22:06:02 +0100
commitf404da6e1d46ced7d3b53377f1e140c486ea7350 (patch)
tree32a170bc8d274e206dc090548a599c072bc591bc /Documentation/trace
parenttracing: Add hist trigger support for variable reference aliases (diff)
downloadkernel-qcow2-linux-f404da6e1d46ced7d3b53377f1e140c486ea7350.tar.gz
kernel-qcow2-linux-f404da6e1d46ced7d3b53377f1e140c486ea7350.tar.xz
kernel-qcow2-linux-f404da6e1d46ced7d3b53377f1e140c486ea7350.zip
tracing: Add 'last error' error facility for hist triggers
With the addition of variables and actions, it's become necessary to provide more detailed error information to users about syntax errors. Add a 'last error' facility accessible via the erroring 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. # 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 Also add specific error messages for variable and action errors. Link: http://lkml.kernel.org/r/64e9c422fc8aeafcc2f7a3b4328c0cffe7969129.1516069914.git.tom.zanussi@linux.intel.com 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/histogram.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/Documentation/trace/histogram.txt b/Documentation/trace/histogram.txt
index be612ca79455..0aec2d8e166b 100644
--- a/Documentation/trace/histogram.txt
+++ b/Documentation/trace/histogram.txt
@@ -188,6 +188,26 @@
interpreted as microseconds.
cpu int - the cpu on which the event occurred.
+ 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
+
6.2 'hist' trigger examples
---------------------------