+#undef __field
+#define __field(_type, _item) \
+ __field_full(_type, _item, __BYTE_ORDER, 10)
+
+#undef __field_ext
+#define __field_ext(_type, _item, _filter_type) \
+ __field(_type, _item)
+
+#undef __field_hex
+#define __field_hex(_type, _item) \
+ __field_full(_type, _item, __BYTE_ORDER, 16)
+
+#undef __field_network
+#define __field_network(_type, _item) \
+ __field_full(_type, _item, __BIG_ENDIAN, 10)
+
+#undef __field_network_hex
+#define __field_network_hex(_type, _item) \
+ __field_full(_type, _item, __BIG_ENDIAN, 16)
+
+#undef __array_enc_ext
+#define __array_enc_ext(_type, _item, _length, _order, _base, _encoding)\
+ { \
+ .name = #_item, \
+ .type = \
+ { \
+ .atype = atype_array, \
+ .u.array = \
+ { \
+ .length = _length, \
+ .elem_type = __type_integer(_type, _order, _base, _encoding), \
+ }, \
+ }, \
+ },
+
+#undef __array
+#define __array(_type, _item, _length) \
+ __array_enc_ext(_type, _item, _length, __BYTE_ORDER, 10, none)
+
+#undef __array_text
+#define __array_text(_type, _item, _length) \
+ __array_enc_ext(_type, _item, _length, __BYTE_ORDER, 10, UTF8)
+
+#undef __array_hex
+#define __array_hex(_type, _item, _length) \
+ __array_enc_ext(_type, _item, _length, __BYTE_ORDER, 16, none)
+
+#undef __dynamic_array_enc_ext
+#define __dynamic_array_enc_ext(_type, _item, _length, _order, _base, _encoding) \
+ { \
+ .name = #_item, \
+ .type = \
+ { \
+ .atype = atype_sequence, \
+ .u.sequence = \
+ { \
+ .length_type = __type_integer(u32, __BYTE_ORDER, 10, none), \
+ .elem_type = __type_integer(_type, _order, _base, _encoding), \
+ }, \
+ }, \
+ },
+
+#undef __dynamic_array
+#define __dynamic_array(_type, _item, _length) \
+ __dynamic_array_enc_ext(_type, _item, _length, __BYTE_ORDER, 10, none)
+
+#undef __dynamic_array_text
+#define __dynamic_array_text(_type, _item, _length) \
+ __dynamic_array_enc_ext(_type, _item, _length, __BYTE_ORDER, 10, UTF8)
+
+#undef __dynamic_array_hex
+#define __dynamic_array_hex(_type, _item, _length) \
+ __dynamic_array_enc_ext(_type, _item, _length, __BYTE_ORDER, 16, none)
+
+#undef __string
+#define __string(_item, _src) \
+ { \
+ .name = #_item, \
+ .type = \
+ { \
+ .atype = atype_string, \
+ .u.basic.string.encoding = lttng_encode_UTF8, \
+ }, \
+ },
+
+#undef __string_from_user
+#define __string_from_user(_item, _src) \
+ __string(_item, _src)
+
+#undef TP_STRUCT__entry
+#define TP_STRUCT__entry(args...) args /* Only one used in this phase */
+
+#undef DECLARE_EVENT_CLASS_NOARGS
+#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
+ static const struct lttng_event_field __event_fields___##_name[] = { \
+ _tstruct \
+ };
+
+#undef DECLARE_EVENT_CLASS
+#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
+ DECLARE_EVENT_CLASS_NOARGS(_name, PARAMS(_tstruct), PARAMS(_assign), \
+ PARAMS(_print))