2 * Stage 2 of the trace events.
4 * Override the macros in <trace/trace_event_types.h> to include the following:
7 * ftrace_raw_output_<call>(struct trace_iterator *iter, int flags)
9 * struct trace_seq *s = &iter->seq;
10 * struct ftrace_raw_<call> *field; <-- defined in stage 1
11 * struct trace_entry *entry;
16 * if (entry->type != event_<call>.id) {
18 * return TRACE_TYPE_UNHANDLED;
21 * field = (typeof(field))entry;
23 * ret = trace_seq_printf(s, <TP_RAW_FMT> "%s", <ARGS> "\n");
25 * return TRACE_TYPE_PARTIAL_LINE;
27 * return TRACE_TYPE_HANDLED;
30 * This is the method used to print the raw event to the trace
31 * output format. Note, this is not needed if the data is read
36 #define TRACE_STRUCT(args...) args
39 #define TRACE_FIELD(type, item, assign) \
42 #undef TRACE_FIELD_SPECIAL
43 #define TRACE_FIELD_SPECIAL(type_item, item, cmd) \
48 #define TP_RAW_FMT(args...) args
50 #undef TRACE_EVENT_FORMAT
51 #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \
53 ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
55 struct trace_seq *s = &iter->seq; \
56 struct ftrace_raw_##call *field; \
57 struct trace_entry *entry; \
62 if (entry->type != event_##call.id) { \
64 return TRACE_TYPE_UNHANDLED; \
67 field = (typeof(field))entry; \
69 ret = trace_seq_printf(s, tpfmt "%s", tstruct "\n"); \
71 return TRACE_TYPE_PARTIAL_LINE; \
73 return TRACE_TYPE_HANDLED; \
76 #include <trace/trace_event_types.h>
78 #include "trace_format.h"
79 #include <trace/trace_event_types.h>