WSL2-Linux-Kernel/tools/lib/traceevent
Steven Rostedt 3a3ffa2e82 tools lib traceevent: Report better error message on bad function args
When Jiri Olsa was writing a function callback for
scsi_trace_parse_cdb(), he thought that the traceevent library had a
bug in it because he was getting this error:

  Error: expected ')' but read ','
  Error: expected ')' but read ','
  Error: expected ')' but read ','
  Error: expected ')' but read ','

But in truth, he didn't have the write number of arguments for the
function callback, and the error was the library detecting the
discrepancy. A better error message would have prevented the confusion:

  Error: function 'scsi_trace_parse_cdb()' only expects 2 arguments but event scsi_dispatch_cmd_timeout has more
  Error: function 'scsi_trace_parse_cdb()' only expects 2 arguments but event scsi_dispatch_cmd_start has more
  Error: function 'scsi_trace_parse_cdb()' only expects 2 arguments but event scsi_dispatch_cmd_error has more
  Error: function 'scsi_trace_parse_cdb()' only expects 2 arguments but event scsi_dispatch_cmd_done has more

Or

  Error: function 'scsi_trace_parse_cdb()' expects 4 arguments but event scsi_dispatch_cmd_timeout only uses 3
  Error: function 'scsi_trace_parse_cdb()' expects 4 arguments but event scsi_dispatch_cmd_start only uses 3
  Error: function 'scsi_trace_parse_cdb()' expects 4 arguments but event scsi_dispatch_cmd_error only uses 3
  Error: function 'scsi_trace_parse_cdb()' expects 4 arguments but event scsi_dispatch_cmd_done only uses 3

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-a4c34w62vl0diitvxb7bt3er@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-12-06 10:39:54 -03:00
..
.gitignore tools lib traceevent: Ignore TRACEEVENT-CFLAGS file 2012-07-25 11:54:44 -03:00
Makefile tools lib traceevent: Add cfg80211 plugin 2013-12-04 15:35:27 -03:00
event-parse.c tools lib traceevent: Report better error message on bad function args 2013-12-06 10:39:54 -03:00
event-parse.h tools lib traceevent: Change pevent_parse_format to include pevent handle 2013-12-04 15:18:42 -03:00
event-plugin.c tools lib traceevent: Remove malloc_or_die from event-plugin.c 2013-12-04 15:35:48 -03:00
event-utils.h tools lib traceevent: Update FSF postal address to be URL's. 2013-01-24 16:40:17 -03:00
kbuffer-parse.c tools lib traceevent: Port kbuffer parser routines 2013-07-12 13:52:16 -03:00
kbuffer.h tools lib traceevent: Port kbuffer parser routines 2013-07-12 13:52:16 -03:00
parse-filter.c tools lib traceevent: Update FSF postal address to be URL's. 2013-01-24 16:40:17 -03:00
parse-utils.c tools lib traceevent: Add copyright header 2013-01-24 16:40:17 -03:00
plugin_cfg80211.c tools lib traceevent: Add cfg80211 plugin 2013-12-04 15:35:27 -03:00
plugin_function.c tools lib traceevent: Remove malloc_or_die from plugin_function.c 2013-12-04 15:37:58 -03:00
plugin_hrtimer.c tools lib traceevent: Use pevent_print_func_field in hrtimer_start handler 2013-12-04 15:36:50 -03:00
plugin_jbd2.c tools lib traceevent: Use static functions in jbd2 plugin 2013-12-04 15:36:24 -03:00
plugin_kmem.c tools lib traceevent: Add kmem plugin 2013-12-04 15:26:05 -03:00
plugin_kvm.c tools lib traceevent: Update kvm plugin with is_writable_pte helper 2013-12-04 15:38:14 -03:00
plugin_mac80211.c tools lib traceevent: Add mac80211 plugin 2013-12-04 15:30:36 -03:00
plugin_sched_switch.c tools lib traceevent: Add sched_switch plugin 2013-12-04 15:31:11 -03:00
plugin_scsi.c tools lib traceevent: Add scsi plugin 2013-12-04 15:34:51 -03:00
plugin_xen.c tools lib traceevent: Add xen plugin 2013-12-04 15:34:04 -03:00
trace-seq.c tools lib traceevent: Add trace_seq_reset() 2013-07-12 13:52:12 -03:00