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, <TPRAWFMT> "%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) \
44 #define TPRAWFMT(args...) args
46 #undef TRACE_EVENT_FORMAT
47 #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \
49 ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
51 struct trace_seq *s = &iter->seq; \
52 struct ftrace_raw_##call *field; \
53 struct trace_entry *entry; \
58 if (entry->type != event_##call.id) { \
60 return TRACE_TYPE_UNHANDLED; \
63 field = (typeof(field))entry; \
65 ret = trace_seq_printf(s, tpfmt "%s", tstruct "\n"); \
67 return TRACE_TYPE_PARTIAL_LINE; \
69 return TRACE_TYPE_HANDLED; \
72 #include <trace/trace_event_types.h>