summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_entries.h
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2016-07-06 22:25:08 +0300
committerSteven Rostedt <rostedt@goodmis.org>2016-11-15 23:13:59 +0300
commitfa32e8557b470f5ff90babc6cbacc61535a81a0f (patch)
treefa3fdc74436987c4832e2941659efa1b6f22d874 /kernel/trace/trace_entries.h
parent9648dc15772d77b5431cd5c11675d90eee1a4c2f (diff)
downloadlinux-fa32e8557b470f5ff90babc6cbacc61535a81a0f.tar.xz
tracing: Add new trace_marker_raw
A new file is created: /sys/kernel/debug/tracing/trace_marker_raw This allows for appications to create data structures and write the binary data directly into it, and then read the trace data out from trace_pipe_raw into the same type of data structure. This saves on converting numbers into ASCII that would be required by trace_marker. Suggested-by: Olof Johansson <olof@lixom.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_entries.h')
-rw-r--r--kernel/trace/trace_entries.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/trace/trace_entries.h b/kernel/trace/trace_entries.h
index d1cc37e78f99..eb7396b7e7c3 100644
--- a/kernel/trace/trace_entries.h
+++ b/kernel/trace/trace_entries.h
@@ -244,6 +244,21 @@ FTRACE_ENTRY(print, print_entry,
FILTER_OTHER
);
+FTRACE_ENTRY(raw_data, raw_data_entry,
+
+ TRACE_RAW_DATA,
+
+ F_STRUCT(
+ __field( unsigned int, id )
+ __dynamic_array( char, buf )
+ ),
+
+ F_printk("id:%04x %08x",
+ __entry->id, (int)__entry->buf[0]),
+
+ FILTER_OTHER
+);
+
FTRACE_ENTRY(bputs, bputs_entry,
TRACE_BPUTS,