Implement dynamic types, and application context provider support
[deliverable/lttng-ust.git] / include / lttng / ust-tracepoint-event.h
index aa8b50f86e5a44aa055a72f3e89e46772efe8c10..f96239e0a9844262f1d767415eeca87e9a00fc89 100644 (file)
@@ -663,9 +663,10 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args));      \
 static                                                                       \
 void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args))              \
 {                                                                            \
-       struct lttng_event *__event = (struct lttng_event *) __tp_data;                       \
+       struct lttng_event *__event = (struct lttng_event *) __tp_data;       \
        struct lttng_channel *__chan = __event->chan;                         \
        struct lttng_ust_lib_ring_buffer_ctx __ctx;                           \
+       struct lttng_stack_ctx __lttng_ctx;                                   \
        size_t __event_len, __event_align;                                    \
        size_t __dynamic_len_idx = 0;                                         \
        union {                                                               \
@@ -703,8 +704,12 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args))          \
        __event_len = __event_get_size__##_provider##___##_name(__stackvar.__dynamic_len, \
                 _TP_ARGS_DATA_VAR(_args));                                   \
        __event_align = __event_get_align__##_provider##___##_name(_TP_ARGS_VAR(_args)); \
+       memset(&__lttng_ctx, 0, sizeof(__lttng_ctx));                         \
+       __lttng_ctx.event = __event;                                          \
+       __lttng_ctx.chan_ctx = tp_rcu_dereference_bp(__chan->ctx);            \
+       __lttng_ctx.event_ctx = tp_rcu_dereference_bp(__event->ctx);          \
        lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len,  \
-                                __event_align, -1, __chan->handle);          \
+                                __event_align, -1, __chan->handle, &__lttng_ctx); \
        __ctx.ip = _TP_IP_PARAM(TP_IP_PARAM);                                 \
        __ret = __chan->ops->event_reserve(&__ctx, __event->id);              \
        if (__ret < 0)                                                        \
This page took 0.0278 seconds and 5 git commands to generate.