},
#undef _ctf_sequence_encoded
-#define _ctf_sequence_encoded(_type, _item, _src, \
- _length_type, _src_length, _encoding, _nowrite) \
+#define _ctf_sequence_encoded(_type, _item, _src, \
+ _length_type, _src_length, _encoding, _nowrite, \
+ _elem_type_base) \
{ \
.name = #_item, \
.type = \
.sequence = \
{ \
.length_type = __type_integer(_length_type, BYTE_ORDER, 10, none), \
- .elem_type = __type_integer(_type, BYTE_ORDER, 10, _encoding), \
+ .elem_type = __type_integer(_type, BYTE_ORDER, _elem_type_base, _encoding), \
}, \
}, \
}, \
__event_len += sizeof(_type) * (_length);
#undef _ctf_sequence_encoded
-#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \
- _src_length, _encoding, _nowrite) \
+#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \
+ _src_length, _encoding, _nowrite, _elem_type_base) \
__event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_length_type)); \
__event_len += sizeof(_length_type); \
__event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \
#undef _ctf_sequence_encoded
#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \
- _src_length, _encoding, _nowrite) \
+ _src_length, _encoding, _nowrite, _elem_type_base) \
{ \
unsigned long __ctf_tmp_ulong = (unsigned long) (_src_length); \
const void *__ctf_tmp_ptr = (_src); \
__event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
#undef _ctf_sequence_encoded
-#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \
- _src_length, _encoding, _nowrite) \
+#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \
+ _src_length, _encoding, _nowrite, _elem_type_base) \
__event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_length_type)); \
__event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
#undef _ctf_sequence_encoded
#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \
- _src_length, _encoding, _nowrite) \
+ _src_length, _encoding, _nowrite, _elem_type_base) \
{ \
_length_type __tmpl = __stackvar.__dynamic_len[__dynamic_len_idx]; \
lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_length_type));\
#define _TP_SESSION_CHECK(session, csession) 1
#endif /* TP_SESSION_CHECK */
+#undef _TP_IP_PARAM
+#ifdef TP_IP_PARAM
+#define _TP_IP_PARAM(x) (x)
+#else /* TP_IP_PARAM */
+#define _TP_IP_PARAM(x) __builtin_return_address(0)
+#endif /* TP_IP_PARAM */
+
/*
* Using twice size for filter stack data to hold size and pointer for
* each field (worse case). For integers, max size required is 64-bit.
__event_align = __event_get_align__##_provider##___##_name(_TP_ARGS_VAR(_args)); \
lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \
__event_align, -1, __chan->handle); \
- __ctx.ip = __builtin_return_address(0); \
+ __ctx.ip = _TP_IP_PARAM(TP_IP_PARAM); \
__ret = __chan->ops->event_reserve(&__ctx, __event->id); \
if (__ret < 0) \
return; \