Skip to content

Commit f404da6

Browse files
tzanussirostedt
authored andcommitted
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>
1 parent 7e8b88a commit f404da6

2 files changed

Lines changed: 170 additions & 14 deletions

File tree

‎Documentation/trace/histogram.txt‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,26 @@
188188
interpreted as microseconds.
189189
cpu int - the cpu on which the event occurred.
190190

191+
Extended error information
192+
--------------------------
193+
194+
For some error conditions encountered when invoking a hist trigger
195+
command, extended error information is available via the
196+
corresponding event's 'hist' file. Reading the hist file after an
197+
error will display more detailed information about what went wrong,
198+
if information is available. This extended error information will
199+
be available until the next hist trigger command for that event.
200+
201+
If available for a given error condition, the extended error
202+
information and usage takes the following form:
203+
204+
# echo xxx > /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger
205+
echo: write error: Invalid argument
206+
207+
# cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist
208+
ERROR: Couldn't yyy: zzz
209+
Last command: xxx
210+
191211
6.2 'hist' trigger examples
192212
---------------------------
193213

0 commit comments

Comments
 (0)