tools lib traceevent: Add builtin handler for trace_marker_raw
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 2 Jul 2020 18:53:57 +0000 (14:53 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 6 Jul 2020 12:01:54 +0000 (09:01 -0300)
commit9b8179b38ba29c0c8fbfa09b2fe685edca0f6061
treeb0d7a756b9b7388dcf80633a8bf501f411d6af2b
parent0dfceeffae187ace521333f2986673690a810fc6
tools lib traceevent: Add builtin handler for trace_marker_raw

When something is written into trace_marker_raw, it goes in as a binary.
But the printk_fmt() of the event that is created (raw_data)'s format
file only prints the first byte of data:

  print fmt: "id:%04x %08x", REC->id, (int)REC->buf[0]

This is not very useful if we want to see the full data output.

Implement the processing of the raw_data event like it is in the kernel.

Link: http://lore.kernel.org/linux-trace-devel/20200702174950.123454-5-tz.stoyanov@gmail.com
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
[ Ported from trace-cmd.git ]
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lore.kernel.org/lkml/20200702185705.445969275@goodmis.org
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/plugins/plugin_function.c