__chan->ops->event_write(&__ctx, _src, \
sizeof(_type) * __get_dynamic_len(dest));
-/*
- * __chan->ops->u.has_strcpy is a flag letting us know if the LTTng-UST
- * tracepoint provider ABI implements event_strcpy. This dynamic check
- * can be removed when the tracepoint provider ABI moves to 2.
- */
-#if (LTTNG_UST_PROVIDER_MAJOR > 1)
-#error "Tracepoint probe provider major version has changed. Please remove dynamic check for has_strcpy."
-#endif
-
#undef _ctf_string
#define _ctf_string(_item, _src, _nowrite) \
{ \
((_src) ? (_src) : __LTTNG_UST_NULL_STRING); \
lib_ring_buffer_align_ctx(&__ctx, \
lttng_alignof(*__ctf_tmp_string)); \
- if (__chan->ops->u.has_strcpy) \
- __chan->ops->event_strcpy(&__ctx, __ctf_tmp_string, \
- __get_dynamic_len(dest)); \
- else \
- __chan->ops->event_write(&__ctx, __ctf_tmp_string, \
- __get_dynamic_len(dest)); \
+ __chan->ops->event_strcpy(&__ctx, __ctf_tmp_string, \
+ __get_dynamic_len(dest)); \
}
struct lttng_stack_ctx __lttng_ctx; \
size_t __event_len, __event_align; \
size_t __dynamic_len_idx = 0; \
+ const size_t __num_fields = _TP_ARRAY_SIZE(__event_fields___##_provider##___##_name) - 1; \
union { \
- size_t __dynamic_len[_TP_ARRAY_SIZE(__event_fields___##_provider##___##_name) - 1]; \
- char __filter_stack_data[2 * sizeof(unsigned long) * (_TP_ARRAY_SIZE(__event_fields___##_provider##___##_name) - 1)]; \
+ size_t __dynamic_len[__num_fields]; \
+ char __filter_stack_data[2 * sizeof(unsigned long) * __num_fields]; \
} __stackvar; \
int __ret; \
\
_TP_ARGS_DATA_VAR(_args)); \
tp_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \
if (caa_unlikely(bc_runtime->filter(bc_runtime, \
- __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) \
+ __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) { \
__filter_record = 1; \
+ break; \
+ } \
} \
if (caa_likely(!__filter_record)) \
return; \