X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Fust%2Flttng-tracepoint-event.h;h=46d8b93374304e451f893a8c76a318cf55713bbe;hb=d4419b81b243bc3a6bdd4a09b3ca2216d044a1c7;hp=4c63ad533c1140f0ea03fe72e9bc733b19a516a5;hpb=69851cf5017c8c8cd2d6ff67592d59387510d7a7;p=lttng-ust.git diff --git a/include/ust/lttng-tracepoint-event.h b/include/ust/lttng-tracepoint-event.h index 4c63ad53..46d8b933 100644 --- a/include/ust/lttng-tracepoint-event.h +++ b/include/ust/lttng-tracepoint-event.h @@ -388,39 +388,39 @@ static inline size_t __event_get_align__##_name(_proto) \ #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 @@ -441,7 +441,7 @@ static void __event_probe__##_name(void *__data, _proto) \ { \ struct ltt_event *__event = __data; \ struct ltt_channel *__chan = __event->chan; \ - struct lib_ring_buffer_ctx ctx; \ + struct lttng_ust_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)]; \ @@ -449,21 +449,21 @@ static void __event_probe__##_name(void *__data, _proto) \ \ if (0) \ (void) __dynamic_len_idx; /* don't warn if unused */ \ - if (unlikely(!CMM_ACCESS_ONCE(__chan->session->active))) \ + if (caa_unlikely(!CMM_ACCESS_ONCE(__chan->session->active))) \ return; \ - if (unlikely(!CMM_ACCESS_ONCE(__chan->enabled))) \ + if (caa_unlikely(!CMM_ACCESS_ONCE(__chan->enabled))) \ return; \ - if (unlikely(!CMM_ACCESS_ONCE(__event->enabled))) \ + if (caa_unlikely(!CMM_ACCESS_ONCE(__event->enabled))) \ 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 @@ -472,25 +472,25 @@ static void __event_probe__##_name(void *__data) \ { \ struct ltt_event *__event = __data; \ struct ltt_channel *__chan = __event->chan; \ - struct lib_ring_buffer_ctx ctx; \ + struct lttng_ust_lib_ring_buffer_ctx __ctx; \ size_t __event_len, __event_align; \ int __ret; \ \ - if (unlikely(!CMM_ACCESS_ONCE(__chan->session->active))) \ + if (caa_unlikely(!CMM_ACCESS_ONCE(__chan->session->active))) \ return; \ - if (unlikely(!CMM_ACCESS_ONCE(__chan->enabled))) \ + if (caa_unlikely(!CMM_ACCESS_ONCE(__chan->enabled))) \ return; \ - if (unlikely(!CMM_ACCESS_ONCE(__event->enabled))) \ + if (caa_unlikely(!CMM_ACCESS_ONCE(__event->enabled))) \ 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)