diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2018-04-27 03:04:49 +0200 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-04-27 03:39:58 +0200 |
commit | dcf234577cd31fa16874e828b90659166ad6b80d (patch) | |
tree | 34dc3ae4434369feb26c4572eca34c64cd71575e /kernel/tracepoint.c | |
parent | tracing: Add field parsing hist error for hist triggers (diff) | |
download | linux-dcf234577cd31fa16874e828b90659166ad6b80d.tar.xz linux-dcf234577cd31fa16874e828b90659166ad6b80d.zip |
tracing: Add field modifier parsing hist error for hist triggers
If the user specifies an invalid field modifier for a hist trigger,
the current code correctly flags that as an error, but doesn't tell
the user what happened.
Fix this by invoking hist_err() with an appropriate message when
invalid modifiers are specified.
Before:
# echo 'hist:keys=pid:ts0=common_timestamp.junkusecs' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger
-su: echo: write error: Invalid argument
# cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist
After:
# echo 'hist:keys=pid:ts0=common_timestamp.junkusecs' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger
-su: echo: write error: Invalid argument
# cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist
ERROR: Invalid field modifier: junkusecs
Last command: keys=pid:ts0=common_timestamp.junkusecs
Link: http://lkml.kernel.org/r/b043c59fa79acd06a5f14a1d44dee9e5a3cd1248.1524790601.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 'kernel/tracepoint.c')
0 files changed, 0 insertions, 0 deletions