WSL2-Linux-Kernel/tools/lib/traceevent
Steven Rostedt 0497a9ebaf tools lib traceevent: Add direct access to dynamic arrays
Jiri Olsa was writing a plugin for the cfg80211_tx_mlme_mgmt trace
event, and was not able to get the implemented function working.
The event's print fmt looks like:

   "netdev:%s(%d), ftype:0x%.2x", REC->name, REC->ifindex,
            __le16_to_cpup((__le16 *)__get_dynamic_array(frame))

As there's no helper function for __le16_to_cpup(), Jiri was creating one
with a plugin. But unfortunately, it would not work even though he set
up the plugin correctly.

The problem is that the function parameters do not handle the helper
function "__get_dynamic_array()", and that passes in a NULL pointer.

Adding PRINT_DYNAMIC_ARRAY direct support to eval_num_arg() allows the
use of __get_dynamic_array() in function parameters.

Reported-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Tested-by: Jiri Olsa <jolsa@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20131111160810.0ba9df7d@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-11-12 17:23:44 -03:00
..
.gitignore tools lib traceevent: Ignore TRACEEVENT-CFLAGS file 2012-07-25 11:54:44 -03:00
Makefile tools: Harmonize the various build messages in perf, lib-traceevent, lib-lk 2013-10-11 12:18:08 -03:00
event-parse.c tools lib traceevent: Add direct access to dynamic arrays 2013-11-12 17:23:44 -03:00
event-parse.h tools lib traceevent: Add pevent_print_func_field() helper function 2013-11-04 14:36:49 -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
trace-seq.c tools lib traceevent: Add trace_seq_reset() 2013-07-12 13:52:12 -03:00