#define ctf_integer_ext(_type, _item, _src, _byte_order, _base) \
{ \
_type __tmp = (_src); \
- lib_ring_buffer_align_ctx(&ctx, lttng_alignof(__tmp)); \
- __chan->ops->event_write(&ctx, &__tmp, sizeof(__tmp)); \
+ lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__tmp));\
+ __chan->ops->event_write(&__ctx, &__tmp, sizeof(__tmp));\
}
#undef ctf_float
#define ctf_float(_type, _item, _src) \
{ \
_type __tmp = (_src); \
- lib_ring_buffer_align_ctx(&ctx, lttng_alignof(__tmp)); \
- __chan->ops->event_write(&ctx, &__tmp, sizeof(__tmp)); \
+ lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__tmp));\
+ __chan->ops->event_write(&__ctx, &__tmp, sizeof(__tmp));\
}
#undef ctf_array_encoded
#define ctf_array_encoded(_type, _item, _src, _length, _encoding) \
- lib_ring_buffer_align_ctx(&ctx, lttng_alignof(_type)); \
- __chan->ops->event_write(&ctx, _src, sizeof(_type) * (_length));
+ lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type)); \
+ __chan->ops->event_write(&__ctx, _src, sizeof(_type) * (_length));
#undef ctf_sequence_encoded
#define ctf_sequence_encoded(_type, _item, _src, _length_type, \
_src_length, _encoding) \
{ \
_length_type __tmpl = __dynamic_len[__dynamic_len_idx]; \
- lib_ring_buffer_align_ctx(&ctx, lttng_alignof(_length_type)); \
- __chan->ops->event_write(&ctx, &__tmpl, sizeof(_length_type)); \
+ lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_length_type));\
+ __chan->ops->event_write(&__ctx, &__tmpl, sizeof(_length_type));\
} \
- lib_ring_buffer_align_ctx(&ctx, lttng_alignof(_type)); \
- __chan->ops->event_write(&ctx, _src, \
+ lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type)); \
+ __chan->ops->event_write(&__ctx, _src, \
sizeof(_type) * __get_dynamic_len(dest));
#undef ctf_string
#define ctf_string(_item, _src) \
- lib_ring_buffer_align_ctx(&ctx, lttng_alignof(*(_src))); \
- __chan->ops->event_write(&ctx, _src, __get_dynamic_len(dest));
+ lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(*(_src))); \
+ __chan->ops->event_write(&__ctx, _src, __get_dynamic_len(dest));
/* Beware: this get len actually consumes the len value */
#undef __get_dynamic_len
{ \
struct ltt_event *__event = __data; \
struct ltt_channel *__chan = __event->chan; \
- struct lib_ring_buffer_ctx ctx; \
+ struct lib_ring_buffer_ctx __ctx; \
size_t __event_len, __event_align; \
size_t __dynamic_len_idx = 0; \
size_t __dynamic_len[_TP_ARRAY_SIZE(__event_fields___##_name)]; \
return; \
__event_len = __event_get_size__##_name(__dynamic_len, _args); \
__event_align = __event_get_align__##_name(_args); \
- lib_ring_buffer_ctx_init(&ctx, __chan->chan, __event, __event_len, \
+ lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \
__event_align, -1, __chan->handle); \
- __ret = __chan->ops->event_reserve(&ctx, __event->id); \
+ __ret = __chan->ops->event_reserve(&__ctx, __event->id); \
if (__ret < 0) \
return; \
_fields \
- __chan->ops->event_commit(&ctx); \
+ __chan->ops->event_commit(&__ctx); \
}
#undef TRACEPOINT_EVENT_CLASS_NOARGS
{ \
struct ltt_event *__event = __data; \
struct ltt_channel *__chan = __event->chan; \
- struct lib_ring_buffer_ctx ctx; \
+ struct lib_ring_buffer_ctx __ctx; \
size_t __event_len, __event_align; \
int __ret; \
\
return; \
__event_len = 0; \
__event_align = 1; \
- lib_ring_buffer_ctx_init(&ctx, __chan->chan, __event, __event_len, \
+ lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \
__event_align, -1, __chan->handle); \
- __ret = __chan->ops->event_reserve(&ctx, __event->id); \
+ __ret = __chan->ops->event_reserve(&__ctx, __event->id); \
if (__ret < 0) \
return; \
_fields \
- __chan->ops->event_commit(&ctx); \
+ __chan->ops->event_commit(&__ctx); \
}
#include TRACEPOINT_INCLUDE(TRACEPOINT_INCLUDE_FILE)