#define tp_assign(dest, src) \
lib_ring_buffer_align_ctx(config, &ctx, sizeof(src)); \
lib_ring_buffer_write(config, &ctx, &src, sizeof(src));
#define tp_assign(dest, src) \
lib_ring_buffer_align_ctx(config, &ctx, sizeof(src)); \
lib_ring_buffer_write(config, &ctx, &src, sizeof(src));
#define tp_memcpy(dest, src, len) \
lib_ring_buffer_align_ctx(config, &ctx, sizeof(*(src))); \
lib_ring_buffer_write(config, &ctx, &src, len);
/* TODO */
#define tp_memcpy(dest, src, len) \
lib_ring_buffer_align_ctx(config, &ctx, sizeof(*(src))); \
lib_ring_buffer_write(config, &ctx, &src, len);
/* TODO */
PARAMS(print)); \
DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));
PARAMS(print)); \
DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));
-#define __array(type, item, len) \
- type { parent = array; length = len; elem_type = type; } item;
-
-/* TODO */
+#define __array(_type, _item, _len) \
+ "type { parent = array; length = " #_len "; elem_type = " #_type "; } " #_item";\n"
-#define __dynamic_array(type, item, len) u32 __data_loc_##item;
+#define __dynamic_array(_type, _item, _len) \
+ "type { parent = sequence; length_type = u32; elem_type = " #_type "; } " #_item ";\n"
-#define __string(item, src) __dynamic_array(char, item, -1)
+#define __string(_item, _src) \
+ "type { parent = string; encoding = UTF8; } " #_item ";\n"
+
+#undef TP_PROTO
+#define TP_PROTO(args...)
+
+#undef TP_ARGS
+#define TP_ARGS(args...)
#undef DECLARE_EVENT_CLASS
#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print) \
#undef DECLARE_EVENT_CLASS
#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print) \
-#define DEFINE_EVENT(template, name, proto, args) \
- static struct ftrace_event_call __used \
- __attribute__((__aligned__(4))) event_##name
+#define DEFINE_EVENT(template, name, proto, args)
#undef DEFINE_EVENT_PRINT
#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
#undef DEFINE_EVENT_PRINT
#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
#undef TRACE_EVENT_FN
#define TRACE_EVENT_FN(name, proto, args, tstruct, \
assign, print, reg, unreg) \
TRACE_EVENT(name, PARAMS(proto), PARAMS(args), \
PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \
#undef TRACE_EVENT_FN
#define TRACE_EVENT_FN(name, proto, args, tstruct, \
assign, print, reg, unreg) \
TRACE_EVENT(name, PARAMS(proto), PARAMS(args), \
PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \