LTTNG_UST__TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, LTTNG_UST__TP_PARAMS(_args))
/* Helpers */
-#define _TP_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+#define LTTNG_UST__TP_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-#define _tp_max_t(type, x, y) \
+#define lttng_ust__tp_max_t(type, x, y) \
({ \
- type __max1 = (x); \
- type __max2 = (y); \
- __max1 > __max2 ? __max1: __max2; \
+ type lttng_ust__max1 = (x); \
+ type lttng_ust__max2 = (y); \
+ lttng_ust__max1 > lttng_ust__max2 ? lttng_ust__max1: lttng_ust__max2; \
})
/*
.struct_size = sizeof(struct lttng_ust_enum_desc), \
.name = #_provider "_" #_name, \
.entries = __enum_values__##_provider##_##_name, \
- .nr_entries = _TP_ARRAY_SIZE(__enum_values__##_provider##_##_name) - 1, \
+ .nr_entries = LTTNG_UST__TP_ARRAY_SIZE(__enum_values__##_provider##_##_name) - 1, \
};
#include LTTNG_UST_TRACEPOINT_INCLUDE
#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \
if (0) \
(void) (_src); /* Unused */ \
- __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
+ __event_align = lttng_ust__tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
#undef _ctf_float
#define _ctf_float(_type, _item, _src, _nowrite) \
if (0) \
(void) (_src); /* Unused */ \
- __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
+ __event_align = lttng_ust__tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
#undef _ctf_array_encoded
#define _ctf_array_encoded(_type, _item, _src, _byte_order, _length, \
_encoding, _nowrite, _elem_type_base) \
if (0) \
(void) (_src); /* Unused */ \
- __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
+ __event_align = lttng_ust__tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
#undef _ctf_sequence_encoded
#define _ctf_sequence_encoded(_type, _item, _src, _byte_order, _length_type, \
(void) (_src); /* Unused */ \
if (0) \
(void) (_src_length); /* Unused */ \
- __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_length_type)); \
- __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
+ __event_align = lttng_ust__tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_length_type)); \
+ __event_align = lttng_ust__tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
#undef _ctf_string
#define _ctf_string(_item, _src, _nowrite) \
{ \
struct lttng_ust_event_common *__event = (struct lttng_ust_event_common *) __tp_data; \
size_t __dynamic_len_idx = 0; \
- const size_t __num_fields = _TP_ARRAY_SIZE(__event_fields___##_provider##___##_name) - 1; \
+ const size_t __num_fields = LTTNG_UST__TP_ARRAY_SIZE(__event_fields___##_provider##___##_name) - 1; \
union { \
size_t __dynamic_len[__num_fields]; \
char __interpreter_stack_data[2 * sizeof(unsigned long) * __num_fields]; \
.probe_desc = &__probe_desc___##_provider, \
.probe_callback = (void (*)(void)) &__event_probe__##_provider##___##_template, \
.fields = __event_fields___##_provider##___##_template, \
- .nr_fields = _TP_ARRAY_SIZE(__event_fields___##_provider##___##_template) - 1, \
+ .nr_fields = LTTNG_UST__TP_ARRAY_SIZE(__event_fields___##_provider##___##_template) - 1, \
.loglevel = &__ref_loglevel___##_provider##___##_name, \
.signature = __tp_event_signature___##_provider##___##_template, \
.model_emf_uri = &__ref_model_emf_uri___##_provider##___##_name, \
.struct_size = sizeof(struct lttng_ust_probe_desc),
.provider_name = __tp_stringify(LTTNG_UST_TRACEPOINT_PROVIDER),
.event_desc = LTTNG_UST__TP_COMBINE_TOKENS(__event_desc___, LTTNG_UST_TRACEPOINT_PROVIDER),
- .nr_events = _TP_ARRAY_SIZE(LTTNG_UST__TP_COMBINE_TOKENS(__event_desc___, LTTNG_UST_TRACEPOINT_PROVIDER)) - 1,
+ .nr_events = LTTNG_UST__TP_ARRAY_SIZE(LTTNG_UST__TP_COMBINE_TOKENS(__event_desc___, LTTNG_UST_TRACEPOINT_PROVIDER)) - 1,
.major = LTTNG_UST_PROVIDER_MAJOR,
.minor = LTTNG_UST_PROVIDER_MINOR,
};