X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Flttng%2Fust-tracepoint-event.h;h=380593b04d3fa8c1f6ade28056bbdb17fb8fedd6;hb=7edfc1722684982b9df894c054d69808dc588a6a;hp=0360bb6c6226ec0e81e780bb0c40b15b0da1fb9d;hpb=fb31eb73d8a4a6d9784ed5c335b7fa3b9684108c;p=lttng-ust.git diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index 0360bb6c..380593b0 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -781,9 +781,10 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args)) \ 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; \ \ @@ -807,8 +808,10 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args)) \ _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; \