Cleanup: implement dedicated file operations for events and enablers
[lttng-modules.git] / src / lttng-events.c
index 9df49fac55fe4ca60c62137b10dcde1e12386724..6676d5f715d873e7490a6422fbc6809d574ebda9 100644 (file)
@@ -36,6 +36,7 @@
 #include <wrapper/types.h>
 #include <lttng/kernel-version.h>
 #include <lttng/events.h>
+#include <lttng/events-internal.h>
 #include <lttng/lttng-bytecode.h>
 #include <lttng/tracer.h>
 #include <lttng/event-notifier-notification.h>
@@ -81,11 +82,12 @@ static
 void _lttng_metadata_channel_hangup(struct lttng_metadata_stream *stream);
 static
 int _lttng_type_statedump(struct lttng_session *session,
-               const struct lttng_type *type,
+               const struct lttng_kernel_type_common *type,
+               enum lttng_kernel_string_encoding parent_encoding,
                size_t nesting);
 static
 int _lttng_field_statedump(struct lttng_session *session,
-               const struct lttng_event_field *field,
+               const struct lttng_kernel_event_field *field,
                size_t nesting);
 
 void synchronize_trace(void)
@@ -614,22 +616,22 @@ int lttng_event_enable(struct lttng_event *event)
                goto end;
        }
        switch (event->instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:   /* Fall-through */
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_TRACEPOINT:       /* Fall-through */
+       case LTTNG_KERNEL_ABI_SYSCALL:
                ret = -EINVAL;
                break;
 
-       case LTTNG_KERNEL_KPROBE:       /* Fall-through */
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_KPROBE:           /* Fall-through */
+       case LTTNG_KERNEL_ABI_UPROBE:
                WRITE_ONCE(event->enabled, 1);
                break;
 
-       case LTTNG_KERNEL_KRETPROBE:
+       case LTTNG_KERNEL_ABI_KRETPROBE:
                ret = lttng_kretprobes_event_enable_state(event, 1);
                break;
 
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
                ret = -EINVAL;
@@ -653,23 +655,23 @@ int lttng_event_disable(struct lttng_event *event)
                goto end;
        }
        switch (event->instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:   /* Fall-through */
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_TRACEPOINT:       /* Fall-through */
+       case LTTNG_KERNEL_ABI_SYSCALL:
                ret = -EINVAL;
                break;
 
-       case LTTNG_KERNEL_KPROBE:       /* Fall-through */
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_KPROBE:           /* Fall-through */
+       case LTTNG_KERNEL_ABI_UPROBE:
                WRITE_ONCE(event->enabled, 0);
                break;
 
-       case LTTNG_KERNEL_KRETPROBE:
+       case LTTNG_KERNEL_ABI_KRETPROBE:
 
                ret = lttng_kretprobes_event_enable_state(event, 0);
                break;
 
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
                ret = -EINVAL;
@@ -689,19 +691,19 @@ int lttng_event_notifier_enable(struct lttng_event_notifier *event_notifier)
                goto end;
        }
        switch (event_notifier->instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:   /* Fall-through */
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_TRACEPOINT:       /* Fall-through */
+       case LTTNG_KERNEL_ABI_SYSCALL:
                ret = -EINVAL;
                break;
 
-       case LTTNG_KERNEL_KPROBE:       /* Fall-through */
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_KPROBE:           /* Fall-through */
+       case LTTNG_KERNEL_ABI_UPROBE:
                WRITE_ONCE(event_notifier->enabled, 1);
                break;
 
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_KRETPROBE:    /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_KRETPROBE:        /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
                ret = -EINVAL;
@@ -721,19 +723,19 @@ int lttng_event_notifier_disable(struct lttng_event_notifier *event_notifier)
                goto end;
        }
        switch (event_notifier->instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:   /* Fall-through */
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_TRACEPOINT:       /* Fall-through */
+       case LTTNG_KERNEL_ABI_SYSCALL:
                ret = -EINVAL;
                break;
 
-       case LTTNG_KERNEL_KPROBE:       /* Fall-through */
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_KPROBE:           /* Fall-through */
+       case LTTNG_KERNEL_ABI_UPROBE:
                WRITE_ONCE(event_notifier->enabled, 0);
                break;
 
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_KRETPROBE:    /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_KRETPROBE:        /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
                ret = -EINVAL;
@@ -813,7 +815,7 @@ void _lttng_channel_destroy(struct lttng_channel *chan)
        chan->ops->channel_destroy(chan->chan);
        module_put(chan->transport->owner);
        list_del(&chan->list);
-       lttng_destroy_context(chan->ctx);
+       lttng_kernel_destroy_context(chan->ctx);
        kfree(chan);
 }
 
@@ -841,10 +843,10 @@ void _lttng_metadata_channel_hangup(struct lttng_metadata_stream *stream)
  * Needs to be called with sessions mutex held.
  */
 struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
-                               struct lttng_kernel_event *event_param,
+                               struct lttng_kernel_abi_event *event_param,
                                void *filter,
-                               const struct lttng_event_desc *event_desc,
-                               enum lttng_kernel_instrumentation itype)
+                               const struct lttng_kernel_event_desc *event_desc,
+                               enum lttng_kernel_abi_instrumentation itype)
 {
        struct lttng_session *session = chan->session;
        struct lttng_event *event;
@@ -858,19 +860,19 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
        }
 
        switch (itype) {
-       case LTTNG_KERNEL_TRACEPOINT:
-               event_name = event_desc->name;
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
+               event_name = event_desc->event_name;
                break;
 
-       case LTTNG_KERNEL_KPROBE:       /* Fall-through */
-       case LTTNG_KERNEL_UPROBE:       /* Fall-through */
-       case LTTNG_KERNEL_KRETPROBE:    /* Fall-through */
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_KPROBE:           /* Fall-through */
+       case LTTNG_KERNEL_ABI_UPROBE:           /* Fall-through */
+       case LTTNG_KERNEL_ABI_KRETPROBE:        /* Fall-through */
+       case LTTNG_KERNEL_ABI_SYSCALL:
                event_name = event_param->name;
                break;
 
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
                ret = -EINVAL;
@@ -881,8 +883,8 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
                LTTNG_EVENT_HT_SIZE, event_name);
        lttng_hlist_for_each_entry(event, head, hlist) {
                WARN_ON_ONCE(!event->desc);
-               if (!strncmp(event->desc->name, event_name,
-                                       LTTNG_KERNEL_SYM_NAME_LEN - 1)
+               if (!strncmp(event->desc->event_name, event_name,
+                                       LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1)
                                && chan == event->chan) {
                        ret = -EEXIST;
                        goto exist;
@@ -898,12 +900,11 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
        event->filter = filter;
        event->id = chan->free_event_id++;
        event->instrumentation = itype;
-       event->evtype = LTTNG_TYPE_EVENT;
        INIT_LIST_HEAD(&event->filter_bytecode_runtime_head);
        INIT_LIST_HEAD(&event->enablers_ref_head);
 
        switch (itype) {
-       case LTTNG_KERNEL_TRACEPOINT:
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
                /* Event will be enabled by enabler sync. */
                event->enabled = 0;
                event->registered = 0;
@@ -916,7 +917,7 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
                smp_wmb();
                break;
 
-       case LTTNG_KERNEL_KPROBE:
+       case LTTNG_KERNEL_ABI_KPROBE:
                /*
                 * Needs to be explicitly enabled after creation, since
                 * we may want to apply filters.
@@ -941,7 +942,7 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
                WARN_ON_ONCE(!ret);
                break;
 
-       case LTTNG_KERNEL_KRETPROBE:
+       case LTTNG_KERNEL_ABI_KRETPROBE:
        {
                struct lttng_event *event_return;
 
@@ -998,7 +999,7 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
                break;
        }
 
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_SYSCALL:
                /*
                 * Needs to be explicitly enabled after creation, since
                 * we may want to apply filters.
@@ -1007,24 +1008,24 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
                event->registered = 0;
                event->desc = event_desc;
                switch (event_param->u.syscall.entryexit) {
-               case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
+               case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT:
                        ret = -EINVAL;
                        goto register_error;
-               case LTTNG_KERNEL_SYSCALL_ENTRY:
+               case LTTNG_KERNEL_ABI_SYSCALL_ENTRY:
                        event->u.syscall.entryexit = LTTNG_SYSCALL_ENTRY;
                        break;
-               case LTTNG_KERNEL_SYSCALL_EXIT:
+               case LTTNG_KERNEL_ABI_SYSCALL_EXIT:
                        event->u.syscall.entryexit = LTTNG_SYSCALL_EXIT;
                        break;
                }
                switch (event_param->u.syscall.abi) {
-               case LTTNG_KERNEL_SYSCALL_ABI_ALL:
+               case LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL:
                        ret = -EINVAL;
                        goto register_error;
-               case LTTNG_KERNEL_SYSCALL_ABI_NATIVE:
+               case LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE:
                        event->u.syscall.abi = LTTNG_SYSCALL_ABI_NATIVE;
                        break;
-               case LTTNG_KERNEL_SYSCALL_ABI_COMPAT:
+               case LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT:
                        event->u.syscall.abi = LTTNG_SYSCALL_ABI_COMPAT;
                        break;
                }
@@ -1034,7 +1035,7 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
                }
                break;
 
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_UPROBE:
                /*
                 * Needs to be explicitly enabled after creation, since
                 * we may want to apply filters.
@@ -1057,8 +1058,8 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
                WARN_ON_ONCE(!ret);
                break;
 
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
                ret = -EINVAL;
@@ -1085,11 +1086,11 @@ full:
 }
 
 struct lttng_event_notifier *_lttng_event_notifier_create(
-               const struct lttng_event_desc *event_desc,
+               const struct lttng_kernel_event_desc *event_desc,
                uint64_t token, uint64_t error_counter_index,
                struct lttng_event_notifier_group *event_notifier_group,
-               struct lttng_kernel_event_notifier *event_notifier_param,
-               void *filter, enum lttng_kernel_instrumentation itype)
+               struct lttng_kernel_abi_event_notifier *event_notifier_param,
+               void *filter, enum lttng_kernel_abi_instrumentation itype)
 {
        struct lttng_event_notifier *event_notifier;
        struct lttng_counter *error_counter;
@@ -1098,19 +1099,19 @@ struct lttng_event_notifier *_lttng_event_notifier_create(
        int ret;
 
        switch (itype) {
-       case LTTNG_KERNEL_TRACEPOINT:
-               event_name = event_desc->name;
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
+               event_name = event_desc->event_name;
                break;
 
-       case LTTNG_KERNEL_KPROBE:       /* Fall-through */
-       case LTTNG_KERNEL_UPROBE:       /* Fall-through */
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_KPROBE:           /* Fall-through */
+       case LTTNG_KERNEL_ABI_UPROBE:           /* Fall-through */
+       case LTTNG_KERNEL_ABI_SYSCALL:
                event_name = event_notifier_param->event.name;
                break;
 
-       case LTTNG_KERNEL_KRETPROBE:    /* Fall-through */
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_KRETPROBE:        /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
                ret = -EINVAL;
@@ -1121,8 +1122,8 @@ struct lttng_event_notifier *_lttng_event_notifier_create(
                LTTNG_EVENT_NOTIFIER_HT_SIZE, event_name);
        lttng_hlist_for_each_entry(event_notifier, head, hlist) {
                WARN_ON_ONCE(!event_notifier->desc);
-               if (!strncmp(event_notifier->desc->name, event_name,
-                                       LTTNG_KERNEL_SYM_NAME_LEN - 1)
+               if (!strncmp(event_notifier->desc->event_name, event_name,
+                                       LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1)
                                && event_notifier_group == event_notifier->group
                                && token == event_notifier->user_token) {
                        ret = -EEXIST;
@@ -1142,14 +1143,13 @@ struct lttng_event_notifier *_lttng_event_notifier_create(
        event_notifier->num_captures = 0;
        event_notifier->filter = filter;
        event_notifier->instrumentation = itype;
-       event_notifier->evtype = LTTNG_TYPE_EVENT;
        event_notifier->send_notification = lttng_event_notifier_notification_send;
        INIT_LIST_HEAD(&event_notifier->filter_bytecode_runtime_head);
        INIT_LIST_HEAD(&event_notifier->capture_bytecode_runtime_head);
        INIT_LIST_HEAD(&event_notifier->enablers_ref_head);
 
        switch (itype) {
-       case LTTNG_KERNEL_TRACEPOINT:
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
                /* Event will be enabled by enabler sync. */
                event_notifier->enabled = 0;
                event_notifier->registered = 0;
@@ -1162,7 +1162,7 @@ struct lttng_event_notifier *_lttng_event_notifier_create(
                smp_wmb();
                break;
 
-       case LTTNG_KERNEL_KPROBE:
+       case LTTNG_KERNEL_ABI_KPROBE:
                /*
                 * Needs to be explicitly enabled after creation, since
                 * we may want to apply filters.
@@ -1187,7 +1187,7 @@ struct lttng_event_notifier *_lttng_event_notifier_create(
                WARN_ON_ONCE(!ret);
                break;
 
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_SYSCALL:
                /*
                 * Needs to be explicitly enabled after creation, since
                 * we may want to apply filters.
@@ -1196,24 +1196,24 @@ struct lttng_event_notifier *_lttng_event_notifier_create(
                event_notifier->registered = 0;
                event_notifier->desc = event_desc;
                switch (event_notifier_param->event.u.syscall.entryexit) {
-               case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
+               case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT:
                        ret = -EINVAL;
                        goto register_error;
-               case LTTNG_KERNEL_SYSCALL_ENTRY:
+               case LTTNG_KERNEL_ABI_SYSCALL_ENTRY:
                        event_notifier->u.syscall.entryexit = LTTNG_SYSCALL_ENTRY;
                        break;
-               case LTTNG_KERNEL_SYSCALL_EXIT:
+               case LTTNG_KERNEL_ABI_SYSCALL_EXIT:
                        event_notifier->u.syscall.entryexit = LTTNG_SYSCALL_EXIT;
                        break;
                }
                switch (event_notifier_param->event.u.syscall.abi) {
-               case LTTNG_KERNEL_SYSCALL_ABI_ALL:
+               case LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL:
                        ret = -EINVAL;
                        goto register_error;
-               case LTTNG_KERNEL_SYSCALL_ABI_NATIVE:
+               case LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE:
                        event_notifier->u.syscall.abi = LTTNG_SYSCALL_ABI_NATIVE;
                        break;
-               case LTTNG_KERNEL_SYSCALL_ABI_COMPAT:
+               case LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT:
                        event_notifier->u.syscall.abi = LTTNG_SYSCALL_ABI_COMPAT;
                        break;
                }
@@ -1224,7 +1224,7 @@ struct lttng_event_notifier *_lttng_event_notifier_create(
                }
                break;
 
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_UPROBE:
                /*
                 * Needs to be explicitly enabled after creation, since
                 * we may want to apply filters.
@@ -1248,9 +1248,9 @@ struct lttng_event_notifier *_lttng_event_notifier_create(
                WARN_ON_ONCE(!ret);
                break;
 
-       case LTTNG_KERNEL_KRETPROBE:    /* Fall-through */
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_KRETPROBE:        /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
                ret = -EINVAL;
@@ -1322,10 +1322,10 @@ int lttng_kernel_counter_clear(struct lttng_counter *counter,
 }
 
 struct lttng_event *lttng_event_create(struct lttng_channel *chan,
-                               struct lttng_kernel_event *event_param,
+                               struct lttng_kernel_abi_event *event_param,
                                void *filter,
-                               const struct lttng_event_desc *event_desc,
-                               enum lttng_kernel_instrumentation itype)
+                               const struct lttng_kernel_event_desc *event_desc,
+                               enum lttng_kernel_abi_instrumentation itype)
 {
        struct lttng_event *event;
 
@@ -1337,11 +1337,11 @@ struct lttng_event *lttng_event_create(struct lttng_channel *chan,
 }
 
 struct lttng_event_notifier *lttng_event_notifier_create(
-               const struct lttng_event_desc *event_desc,
+               const struct lttng_kernel_event_desc *event_desc,
                uint64_t id, uint64_t error_counter_index,
                struct lttng_event_notifier_group *event_notifier_group,
-               struct lttng_kernel_event_notifier *event_notifier_param,
-               void *filter, enum lttng_kernel_instrumentation itype)
+               struct lttng_kernel_abi_event_notifier *event_notifier_param,
+               void *filter, enum lttng_kernel_abi_instrumentation itype)
 {
        struct lttng_event_notifier *event_notifier;
 
@@ -1357,7 +1357,7 @@ struct lttng_event_notifier *lttng_event_notifier_create(
 static
 void register_event(struct lttng_event *event)
 {
-       const struct lttng_event_desc *desc;
+       const struct lttng_kernel_event_desc *desc;
        int ret = -EINVAL;
 
        if (event->registered)
@@ -1365,24 +1365,24 @@ void register_event(struct lttng_event *event)
 
        desc = event->desc;
        switch (event->instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:
-               ret = lttng_wrapper_tracepoint_probe_register(desc->kname,
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
+               ret = lttng_wrapper_tracepoint_probe_register(desc->event_kname,
                                                  desc->probe_callback,
                                                  event);
                break;
 
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_SYSCALL:
                ret = lttng_syscall_filter_enable_event(event->chan, event);
                break;
 
-       case LTTNG_KERNEL_KPROBE:       /* Fall-through */
-       case LTTNG_KERNEL_UPROBE:       /* Fall-through */
-       case LTTNG_KERNEL_KRETPROBE:
+       case LTTNG_KERNEL_ABI_KPROBE:           /* Fall-through */
+       case LTTNG_KERNEL_ABI_UPROBE:           /* Fall-through */
+       case LTTNG_KERNEL_ABI_KRETPROBE:
                ret = 0;
                break;
 
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
        }
@@ -1395,7 +1395,7 @@ void register_event(struct lttng_event *event)
  */
 int _lttng_event_unregister(struct lttng_event *event)
 {
-       const struct lttng_event_desc *desc;
+       const struct lttng_kernel_event_desc *desc;
        int ret = -EINVAL;
 
        if (!event->registered)
@@ -1403,36 +1403,36 @@ int _lttng_event_unregister(struct lttng_event *event)
 
        desc = event->desc;
        switch (event->instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:
-               ret = lttng_wrapper_tracepoint_probe_unregister(event->desc->kname,
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
+               ret = lttng_wrapper_tracepoint_probe_unregister(event->desc->event_kname,
                                                  event->desc->probe_callback,
                                                  event);
                break;
 
-       case LTTNG_KERNEL_KPROBE:
+       case LTTNG_KERNEL_ABI_KPROBE:
                lttng_kprobes_unregister_event(event);
                ret = 0;
                break;
 
-       case LTTNG_KERNEL_KRETPROBE:
+       case LTTNG_KERNEL_ABI_KRETPROBE:
                lttng_kretprobes_unregister(event);
                ret = 0;
                break;
 
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_SYSCALL:
                ret = lttng_syscall_filter_disable_event(event->chan, event);
                break;
 
-       case LTTNG_KERNEL_NOOP:
+       case LTTNG_KERNEL_ABI_NOOP:
                ret = 0;
                break;
 
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_UPROBE:
                lttng_uprobes_unregister_event(event);
                ret = 0;
                break;
 
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
        default:
                WARN_ON_ONCE(1);
        }
@@ -1445,7 +1445,7 @@ int _lttng_event_unregister(struct lttng_event *event)
 static
 void register_event_notifier(struct lttng_event_notifier *event_notifier)
 {
-       const struct lttng_event_desc *desc;
+       const struct lttng_kernel_event_desc *desc;
        int ret = -EINVAL;
 
        if (event_notifier->registered)
@@ -1453,24 +1453,24 @@ void register_event_notifier(struct lttng_event_notifier *event_notifier)
 
        desc = event_notifier->desc;
        switch (event_notifier->instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:
-               ret = lttng_wrapper_tracepoint_probe_register(desc->kname,
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
+               ret = lttng_wrapper_tracepoint_probe_register(desc->event_kname,
                                                  desc->event_notifier_callback,
                                                  event_notifier);
                break;
 
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_SYSCALL:
                ret = lttng_syscall_filter_enable_event_notifier(event_notifier);
                break;
 
-       case LTTNG_KERNEL_KPROBE:       /* Fall-through */
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_KPROBE:           /* Fall-through */
+       case LTTNG_KERNEL_ABI_UPROBE:
                ret = 0;
                break;
 
-       case LTTNG_KERNEL_KRETPROBE:    /* Fall-through */
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_KRETPROBE:        /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
        }
@@ -1482,7 +1482,7 @@ static
 int _lttng_event_notifier_unregister(
                struct lttng_event_notifier *event_notifier)
 {
-       const struct lttng_event_desc *desc;
+       const struct lttng_kernel_event_desc *desc;
        int ret = -EINVAL;
 
        if (!event_notifier->registered)
@@ -1490,29 +1490,29 @@ int _lttng_event_notifier_unregister(
 
        desc = event_notifier->desc;
        switch (event_notifier->instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:
-               ret = lttng_wrapper_tracepoint_probe_unregister(event_notifier->desc->kname,
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
+               ret = lttng_wrapper_tracepoint_probe_unregister(event_notifier->desc->event_kname,
                                                  event_notifier->desc->event_notifier_callback,
                                                  event_notifier);
                break;
 
-       case LTTNG_KERNEL_KPROBE:
+       case LTTNG_KERNEL_ABI_KPROBE:
                lttng_kprobes_unregister_event_notifier(event_notifier);
                ret = 0;
                break;
 
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_UPROBE:
                lttng_uprobes_unregister_event_notifier(event_notifier);
                ret = 0;
                break;
 
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_SYSCALL:
                ret = lttng_syscall_filter_disable_event_notifier(event_notifier);
                break;
 
-       case LTTNG_KERNEL_KRETPROBE:    /* Fall-through */
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_KRETPROBE:        /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
        }
@@ -1530,35 +1530,35 @@ void _lttng_event_destroy(struct lttng_event *event)
        struct lttng_enabler_ref *enabler_ref, *tmp_enabler_ref;
 
        switch (event->instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
                lttng_event_desc_put(event->desc);
                break;
 
-       case LTTNG_KERNEL_KPROBE:
+       case LTTNG_KERNEL_ABI_KPROBE:
                module_put(event->desc->owner);
                lttng_kprobes_destroy_event_private(event);
                break;
 
-       case LTTNG_KERNEL_KRETPROBE:
+       case LTTNG_KERNEL_ABI_KRETPROBE:
                module_put(event->desc->owner);
                lttng_kretprobes_destroy_private(event);
                break;
 
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_SYSCALL:
                break;
 
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_UPROBE:
                module_put(event->desc->owner);
                lttng_uprobes_destroy_event_private(event);
                break;
 
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
        }
        list_del(&event->list);
-       lttng_destroy_context(event->ctx);
+       lttng_kernel_destroy_context(event->ctx);
        lttng_free_event_filter_runtime(event);
        /* Free event enabler refs */
        list_for_each_entry_safe(enabler_ref, tmp_enabler_ref,
@@ -1576,26 +1576,26 @@ void _lttng_event_notifier_destroy(struct lttng_event_notifier *event_notifier)
        struct lttng_enabler_ref *enabler_ref, *tmp_enabler_ref;
 
        switch (event_notifier->instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
                lttng_event_desc_put(event_notifier->desc);
                break;
 
-       case LTTNG_KERNEL_KPROBE:
+       case LTTNG_KERNEL_ABI_KPROBE:
                module_put(event_notifier->desc->owner);
                lttng_kprobes_destroy_event_notifier_private(event_notifier);
                break;
 
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_SYSCALL:
                break;
 
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_UPROBE:
                module_put(event_notifier->desc->owner);
                lttng_uprobes_destroy_event_notifier_private(event_notifier);
                break;
 
-       case LTTNG_KERNEL_KRETPROBE:    /* Fall-through */
-       case LTTNG_KERNEL_FUNCTION:     /* Fall-through */
-       case LTTNG_KERNEL_NOOP:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_KRETPROBE:        /* Fall-through */
+       case LTTNG_KERNEL_ABI_FUNCTION:         /* Fall-through */
+       case LTTNG_KERNEL_ABI_NOOP:             /* Fall-through */
        default:
                WARN_ON_ONCE(1);
        }
@@ -1883,7 +1883,7 @@ int lttng_match_enabler_name(const char *desc_name,
        return 1;
 }
 
-int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
+int lttng_desc_match_enabler(const struct lttng_kernel_event_desc *desc,
                struct lttng_enabler *enabler)
 {
        const char *desc_name, *enabler_name;
@@ -1891,8 +1891,8 @@ int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
 
        enabler_name = enabler->event_param.name;
        switch (enabler->event_param.instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:
-               desc_name = desc->name;
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
+               desc_name = desc->event_name;
                switch (enabler->format_type) {
                case LTTNG_ENABLER_FORMAT_STAR_GLOB:
                        return lttng_match_enabler_star_glob(desc_name, enabler_name);
@@ -1903,8 +1903,8 @@ int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
                }
                break;
 
-       case LTTNG_KERNEL_SYSCALL:
-               desc_name = desc->name;
+       case LTTNG_KERNEL_ABI_SYSCALL:
+               desc_name = desc->event_name;
                if (!strncmp(desc_name, "compat_", strlen("compat_"))) {
                        desc_name += strlen("compat_");
                        compat = true;
@@ -1921,13 +1921,13 @@ int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
                        return -EINVAL;
                }
                switch (enabler->event_param.u.syscall.entryexit) {
-               case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
+               case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT:
                        break;
-               case LTTNG_KERNEL_SYSCALL_ENTRY:
+               case LTTNG_KERNEL_ABI_SYSCALL_ENTRY:
                        if (!entry)
                                return 0;
                        break;
-               case LTTNG_KERNEL_SYSCALL_EXIT:
+               case LTTNG_KERNEL_ABI_SYSCALL_EXIT:
                        if (entry)
                                return 0;
                        break;
@@ -1935,13 +1935,13 @@ int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
                        return -EINVAL;
                }
                switch (enabler->event_param.u.syscall.abi) {
-               case LTTNG_KERNEL_SYSCALL_ABI_ALL:
+               case LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL:
                        break;
-               case LTTNG_KERNEL_SYSCALL_ABI_NATIVE:
+               case LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE:
                        if (compat)
                                return 0;
                        break;
-               case LTTNG_KERNEL_SYSCALL_ABI_COMPAT:
+               case LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT:
                        if (!compat)
                                return 0;
                        break;
@@ -1949,7 +1949,7 @@ int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
                        return -EINVAL;
                }
                switch (enabler->event_param.u.syscall.match) {
-               case LTTNG_KERNEL_SYSCALL_MATCH_NAME:
+               case LTTNG_KERNEL_ABI_SYSCALL_MATCH_NAME:
                        switch (enabler->format_type) {
                        case LTTNG_ENABLER_FORMAT_STAR_GLOB:
                                return lttng_match_enabler_star_glob(desc_name, enabler_name);
@@ -1959,7 +1959,7 @@ int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
                                return -EINVAL;
                        }
                        break;
-               case LTTNG_KERNEL_SYSCALL_MATCH_NR:
+               case LTTNG_KERNEL_ABI_SYSCALL_MATCH_NR:
                        return -EINVAL; /* Not implemented. */
                default:
                        return -EINVAL;
@@ -2023,8 +2023,8 @@ static
 void lttng_create_tracepoint_event_if_missing(struct lttng_event_enabler *event_enabler)
 {
        struct lttng_session *session = event_enabler->chan->session;
-       struct lttng_probe_desc *probe_desc;
-       const struct lttng_event_desc *desc;
+       struct lttng_kernel_probe_desc *probe_desc;
+       const struct lttng_kernel_event_desc *desc;
        int i;
        struct list_head *probe_list;
 
@@ -2050,7 +2050,7 @@ void lttng_create_tracepoint_event_if_missing(struct lttng_event_enabler *event_
                         */
                        head = utils_borrow_hash_table_bucket(
                                session->events_ht.table, LTTNG_EVENT_HT_SIZE,
-                               desc->name);
+                               desc->event_name);
                        lttng_hlist_for_each_entry(event, head, hlist) {
                                if (event->desc == desc
                                                && event->chan == event_enabler->chan)
@@ -2065,10 +2065,10 @@ void lttng_create_tracepoint_event_if_missing(struct lttng_event_enabler *event_
                         */
                        event = _lttng_event_create(event_enabler->chan,
                                        NULL, NULL, desc,
-                                       LTTNG_KERNEL_TRACEPOINT);
+                                       LTTNG_KERNEL_ABI_TRACEPOINT);
                        if (!event) {
                                printk(KERN_INFO "LTTng: Unable to create event %s\n",
-                                       probe_desc->event_desc[i]->name);
+                                       probe_desc->event_desc[i]->event_name);
                        }
                }
        }
@@ -2078,8 +2078,8 @@ static
 void lttng_create_tracepoint_event_notifier_if_missing(struct lttng_event_notifier_enabler *event_notifier_enabler)
 {
        struct lttng_event_notifier_group *event_notifier_group = event_notifier_enabler->group;
-       struct lttng_probe_desc *probe_desc;
-       const struct lttng_event_desc *desc;
+       struct lttng_kernel_probe_desc *probe_desc;
+       const struct lttng_kernel_event_desc *desc;
        int i;
        struct list_head *probe_list;
 
@@ -2105,7 +2105,7 @@ void lttng_create_tracepoint_event_notifier_if_missing(struct lttng_event_notifi
                         */
                        head = utils_borrow_hash_table_bucket(
                                event_notifier_group->event_notifiers_ht.table,
-                               LTTNG_EVENT_NOTIFIER_HT_SIZE, desc->name);
+                               LTTNG_EVENT_NOTIFIER_HT_SIZE, desc->event_name);
                        lttng_hlist_for_each_entry(event_notifier, head, hlist) {
                                if (event_notifier->desc == desc
                                                && event_notifier->user_token == event_notifier_enabler->base.user_token)
@@ -2121,10 +2121,10 @@ void lttng_create_tracepoint_event_notifier_if_missing(struct lttng_event_notifi
                                event_notifier_enabler->base.user_token,
                                event_notifier_enabler->error_counter_index,
                                event_notifier_group, NULL, NULL,
-                               LTTNG_KERNEL_TRACEPOINT);
+                               LTTNG_KERNEL_ABI_TRACEPOINT);
                        if (IS_ERR(event_notifier)) {
                                printk(KERN_INFO "Unable to create event_notifier %s\n",
-                                       probe_desc->event_desc[i]->name);
+                                       probe_desc->event_desc[i]->event_name);
                        }
                }
        }
@@ -2159,11 +2159,11 @@ static
 void lttng_create_event_if_missing(struct lttng_event_enabler *event_enabler)
 {
        switch (event_enabler->base.event_param.instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
                lttng_create_tracepoint_event_if_missing(event_enabler);
                break;
 
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_SYSCALL:
                lttng_create_syscall_event_if_missing(event_enabler);
                break;
 
@@ -2186,17 +2186,17 @@ int lttng_event_enabler_ref_events(struct lttng_event_enabler *event_enabler)
        struct lttng_enabler *base_enabler = lttng_event_enabler_as_enabler(event_enabler);
        struct lttng_event *event;
 
-       if (base_enabler->event_param.instrumentation == LTTNG_KERNEL_SYSCALL &&
-                       base_enabler->event_param.u.syscall.abi == LTTNG_KERNEL_SYSCALL_ABI_ALL &&
-                       base_enabler->event_param.u.syscall.match == LTTNG_KERNEL_SYSCALL_MATCH_NAME &&
+       if (base_enabler->event_param.instrumentation == LTTNG_KERNEL_ABI_SYSCALL &&
+                       base_enabler->event_param.u.syscall.abi == LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL &&
+                       base_enabler->event_param.u.syscall.match == LTTNG_KERNEL_ABI_SYSCALL_MATCH_NAME &&
                        !strcmp(base_enabler->event_param.name, "*")) {
                int enabled = base_enabler->enabled;
-               enum lttng_kernel_syscall_entryexit entryexit = base_enabler->event_param.u.syscall.entryexit;
+               enum lttng_kernel_abi_syscall_entryexit entryexit = base_enabler->event_param.u.syscall.entryexit;
 
-               if (entryexit == LTTNG_KERNEL_SYSCALL_ENTRY || entryexit == LTTNG_KERNEL_SYSCALL_ENTRYEXIT)
+               if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRY || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT)
                        WRITE_ONCE(chan->syscall_all_entry, enabled);
 
-               if (entryexit == LTTNG_KERNEL_SYSCALL_EXIT || entryexit == LTTNG_KERNEL_SYSCALL_ENTRYEXIT)
+               if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_EXIT || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT)
                        WRITE_ONCE(chan->syscall_all_exit, enabled);
        }
 
@@ -2246,11 +2246,11 @@ static
 void lttng_create_event_notifier_if_missing(struct lttng_event_notifier_enabler *event_notifier_enabler)
 {
        switch (event_notifier_enabler->base.event_param.instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINT:
+       case LTTNG_KERNEL_ABI_TRACEPOINT:
                lttng_create_tracepoint_event_notifier_if_missing(event_notifier_enabler);
                break;
 
-       case LTTNG_KERNEL_SYSCALL:
+       case LTTNG_KERNEL_ABI_SYSCALL:
                lttng_create_syscall_event_notifier_if_missing(event_notifier_enabler);
                break;
 
@@ -2271,18 +2271,18 @@ int lttng_event_notifier_enabler_ref_event_notifiers(
        struct lttng_enabler *base_enabler = lttng_event_notifier_enabler_as_enabler(event_notifier_enabler);
        struct lttng_event_notifier *event_notifier;
 
-       if (base_enabler->event_param.instrumentation == LTTNG_KERNEL_SYSCALL &&
-                       base_enabler->event_param.u.syscall.abi == LTTNG_KERNEL_SYSCALL_ABI_ALL &&
-                       base_enabler->event_param.u.syscall.match == LTTNG_KERNEL_SYSCALL_MATCH_NAME &&
+       if (base_enabler->event_param.instrumentation == LTTNG_KERNEL_ABI_SYSCALL &&
+                       base_enabler->event_param.u.syscall.abi == LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL &&
+                       base_enabler->event_param.u.syscall.match == LTTNG_KERNEL_ABI_SYSCALL_MATCH_NAME &&
                        !strcmp(base_enabler->event_param.name, "*")) {
 
                int enabled = base_enabler->enabled;
-               enum lttng_kernel_syscall_entryexit entryexit = base_enabler->event_param.u.syscall.entryexit;
+               enum lttng_kernel_abi_syscall_entryexit entryexit = base_enabler->event_param.u.syscall.entryexit;
 
-               if (entryexit == LTTNG_KERNEL_SYSCALL_ENTRY || entryexit == LTTNG_KERNEL_SYSCALL_ENTRYEXIT)
+               if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRY || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT)
                        WRITE_ONCE(event_notifier_group->syscall_all_entry, enabled);
 
-               if (entryexit == LTTNG_KERNEL_SYSCALL_EXIT || entryexit == LTTNG_KERNEL_SYSCALL_ENTRYEXIT)
+               if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_EXIT || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT)
                        WRITE_ONCE(event_notifier_group->syscall_all_exit, enabled);
 
        }
@@ -2380,7 +2380,7 @@ int lttng_fix_pending_event_notifiers(void)
 
 struct lttng_event_enabler *lttng_event_enabler_create(
                enum lttng_enabler_format_type format_type,
-               struct lttng_kernel_event *event_param,
+               struct lttng_kernel_abi_event *event_param,
                struct lttng_channel *chan)
 {
        struct lttng_event_enabler *event_enabler;
@@ -2395,7 +2395,6 @@ struct lttng_event_enabler *lttng_event_enabler_create(
        event_enabler->chan = chan;
        /* ctx left NULL */
        event_enabler->base.enabled = 0;
-       event_enabler->base.evtype = LTTNG_TYPE_ENABLER;
        mutex_lock(&sessions_mutex);
        list_add(&event_enabler->node, &event_enabler->chan->session->enablers_head);
        lttng_session_lazy_sync_event_enablers(event_enabler->chan->session);
@@ -2423,7 +2422,7 @@ int lttng_event_enabler_disable(struct lttng_event_enabler *event_enabler)
 
 static
 int lttng_enabler_attach_filter_bytecode(struct lttng_enabler *enabler,
-               struct lttng_kernel_filter_bytecode __user *bytecode)
+               struct lttng_kernel_abi_filter_bytecode __user *bytecode)
 {
        struct lttng_bytecode_node *bytecode_node;
        uint32_t bytecode_len;
@@ -2455,7 +2454,7 @@ error_free:
 }
 
 int lttng_event_enabler_attach_filter_bytecode(struct lttng_event_enabler *event_enabler,
-               struct lttng_kernel_filter_bytecode __user *bytecode)
+               struct lttng_kernel_abi_filter_bytecode __user *bytecode)
 {
        int ret;
        ret = lttng_enabler_attach_filter_bytecode(
@@ -2471,23 +2470,17 @@ error:
 }
 
 int lttng_event_add_callsite(struct lttng_event *event,
-               struct lttng_kernel_event_callsite __user *callsite)
+               struct lttng_kernel_abi_event_callsite __user *callsite)
 {
 
        switch (event->instrumentation) {
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_UPROBE:
                return lttng_uprobes_event_add_callsite(event, callsite);
        default:
                return -EINVAL;
        }
 }
 
-int lttng_event_enabler_attach_context(struct lttng_event_enabler *event_enabler,
-               struct lttng_kernel_context *context_param)
-{
-       return -ENOSYS;
-}
-
 static
 void lttng_enabler_destroy(struct lttng_enabler *enabler)
 {
@@ -2506,7 +2499,7 @@ void lttng_event_enabler_destroy(struct lttng_event_enabler *event_enabler)
        lttng_enabler_destroy(lttng_event_enabler_as_enabler(event_enabler));
 
        /* Destroy contexts */
-       lttng_destroy_context(event_enabler->ctx);
+       lttng_kernel_destroy_context(event_enabler->ctx);
 
        list_del(&event_enabler->node);
        kfree(event_enabler);
@@ -2515,7 +2508,7 @@ void lttng_event_enabler_destroy(struct lttng_event_enabler *event_enabler)
 struct lttng_event_notifier_enabler *lttng_event_notifier_enabler_create(
                struct lttng_event_notifier_group *event_notifier_group,
                enum lttng_enabler_format_type format_type,
-               struct lttng_kernel_event_notifier *event_notifier_param)
+               struct lttng_kernel_abi_event_notifier *event_notifier_param)
 {
        struct lttng_event_notifier_enabler *event_notifier_enabler;
 
@@ -2532,7 +2525,6 @@ struct lttng_event_notifier_enabler *lttng_event_notifier_enabler_create(
 
        memcpy(&event_notifier_enabler->base.event_param, &event_notifier_param->event,
                sizeof(event_notifier_enabler->base.event_param));
-       event_notifier_enabler->base.evtype = LTTNG_TYPE_ENABLER;
 
        event_notifier_enabler->base.enabled = 0;
        event_notifier_enabler->base.user_token = event_notifier_param->event.token;
@@ -2569,7 +2561,7 @@ int lttng_event_notifier_enabler_disable(
 
 int lttng_event_notifier_enabler_attach_filter_bytecode(
                struct lttng_event_notifier_enabler *event_notifier_enabler,
-               struct lttng_kernel_filter_bytecode __user *bytecode)
+               struct lttng_kernel_abi_filter_bytecode __user *bytecode)
 {
        int ret;
 
@@ -2588,7 +2580,7 @@ error:
 
 int lttng_event_notifier_enabler_attach_capture_bytecode(
                struct lttng_event_notifier_enabler *event_notifier_enabler,
-               struct lttng_kernel_capture_bytecode __user *bytecode)
+               struct lttng_kernel_abi_capture_bytecode __user *bytecode)
 {
        struct lttng_bytecode_node *bytecode_node;
        struct lttng_enabler *enabler =
@@ -2629,11 +2621,11 @@ end:
 }
 
 int lttng_event_notifier_add_callsite(struct lttng_event_notifier *event_notifier,
-               struct lttng_kernel_event_callsite __user *callsite)
+               struct lttng_kernel_abi_event_callsite __user *callsite)
 {
 
        switch (event_notifier->instrumentation) {
-       case LTTNG_KERNEL_UPROBE:
+       case LTTNG_KERNEL_ABI_UPROBE:
                return lttng_uprobes_event_notifier_add_callsite(event_notifier,
                                callsite);
        default:
@@ -2641,13 +2633,6 @@ int lttng_event_notifier_add_callsite(struct lttng_event_notifier *event_notifie
        }
 }
 
-int lttng_event_notifier_enabler_attach_context(
-               struct lttng_event_notifier_enabler *event_notifier_enabler,
-               struct lttng_kernel_context *context_param)
-{
-       return -ENOSYS;
-}
-
 static
 void lttng_event_notifier_enabler_destroy(
                struct lttng_event_notifier_enabler *event_notifier_enabler)
@@ -2686,8 +2671,8 @@ void lttng_session_sync_event_enablers(struct lttng_session *session)
                int enabled = 0, has_enablers_without_bytecode = 0;
 
                switch (event->instrumentation) {
-               case LTTNG_KERNEL_TRACEPOINT:   /* Fall-through */
-               case LTTNG_KERNEL_SYSCALL:
+               case LTTNG_KERNEL_ABI_TRACEPOINT:       /* Fall-through */
+               case LTTNG_KERNEL_ABI_SYSCALL:
                        /* Enable events */
                        list_for_each_entry(enabler_ref,
                                        &event->enablers_ref_head, node) {
@@ -2774,8 +2759,8 @@ void lttng_event_notifier_group_sync_enablers(struct lttng_event_notifier_group
                int enabled = 0, has_enablers_without_bytecode = 0;
 
                switch (event_notifier->instrumentation) {
-               case LTTNG_KERNEL_TRACEPOINT:   /* Fall-through */
-               case LTTNG_KERNEL_SYSCALL:
+               case LTTNG_KERNEL_ABI_TRACEPOINT:       /* Fall-through */
+               case LTTNG_KERNEL_ABI_SYSCALL:
                        /* Enable event_notifiers */
                        list_for_each_entry(enabler_ref,
                                        &event_notifier->enablers_ref_head, node) {
@@ -3000,7 +2985,7 @@ int print_tabs(struct lttng_session *session, size_t nesting)
 
 static
 int lttng_field_name_statedump(struct lttng_session *session,
-               const struct lttng_event_field *field,
+               const struct lttng_kernel_event_field *field,
                size_t nesting)
 {
        return lttng_metadata_printf(session, " _%s;\n", field->name);
@@ -3008,30 +2993,30 @@ int lttng_field_name_statedump(struct lttng_session *session,
 
 static
 int _lttng_integer_type_statedump(struct lttng_session *session,
-               const struct lttng_type *type,
+               const struct lttng_kernel_type_integer *type,
+               enum lttng_kernel_string_encoding parent_encoding,
                size_t nesting)
 {
        int ret;
 
-       WARN_ON_ONCE(type->type != lttng_kernel_type_integer);
        ret = print_tabs(session, nesting);
        if (ret)
                return ret;
        ret = lttng_metadata_printf(session,
                "integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s }",
-               type->u.integer.size,
-               type->u.integer.alignment,
-               type->u.integer.signedness,
-               (type->u.integer.encoding == lttng_encode_none)
+               type->size,
+               type->alignment,
+               type->signedness,
+               (parent_encoding == lttng_kernel_string_encoding_none)
                        ? "none"
-                       : (type->u.integer.encoding == lttng_encode_UTF8)
+                       : (parent_encoding == lttng_kernel_string_encoding_UTF8)
                                ? "UTF8"
                                : "ASCII",
-               type->u.integer.base,
+               type->base,
 #if __BYTE_ORDER == __BIG_ENDIAN
-               type->u.integer.reverse_byte_order ? " byte_order = le;" : ""
+               type->reverse_byte_order ? " byte_order = le;" : ""
 #else
-               type->u.integer.reverse_byte_order ? " byte_order = be;" : ""
+               type->reverse_byte_order ? " byte_order = be;" : ""
 #endif
        );
        return ret;
@@ -3042,15 +3027,13 @@ int _lttng_integer_type_statedump(struct lttng_session *session,
  */
 static
 int _lttng_struct_type_statedump(struct lttng_session *session,
-               const struct lttng_type *type,
+               const struct lttng_kernel_type_struct *type,
                size_t nesting)
 {
        int ret;
        uint32_t i, nr_fields;
        unsigned int alignment;
 
-       WARN_ON_ONCE(type->type != lttng_kernel_type_struct_nestable);
-
        ret = print_tabs(session, nesting);
        if (ret)
                return ret;
@@ -3058,11 +3041,11 @@ int _lttng_struct_type_statedump(struct lttng_session *session,
                "struct {\n");
        if (ret)
                return ret;
-       nr_fields = type->u.struct_nestable.nr_fields;
+       nr_fields = type->nr_fields;
        for (i = 0; i < nr_fields; i++) {
-               const struct lttng_event_field *iter_field;
+               const struct lttng_kernel_event_field *iter_field;
 
-               iter_field = &type->u.struct_nestable.fields[i];
+               iter_field = type->fields[i];
                ret = _lttng_field_statedump(session, iter_field, nesting + 1);
                if (ret)
                        return ret;
@@ -3070,7 +3053,7 @@ int _lttng_struct_type_statedump(struct lttng_session *session,
        ret = print_tabs(session, nesting);
        if (ret)
                return ret;
-       alignment = type->u.struct_nestable.alignment;
+       alignment = type->alignment;
        if (alignment) {
                ret = lttng_metadata_printf(session,
                        "} align(%u)",
@@ -3087,13 +3070,13 @@ int _lttng_struct_type_statedump(struct lttng_session *session,
  */
 static
 int _lttng_struct_field_statedump(struct lttng_session *session,
-               const struct lttng_event_field *field,
+               const struct lttng_kernel_event_field *field,
                size_t nesting)
 {
        int ret;
 
        ret = _lttng_struct_type_statedump(session,
-                       &field->type, nesting);
+                       lttng_kernel_get_type_struct(field->type), nesting);
        if (ret)
                return ret;
        return lttng_field_name_statedump(session, field, nesting);
@@ -3104,31 +3087,30 @@ int _lttng_struct_field_statedump(struct lttng_session *session,
  */
 static
 int _lttng_variant_type_statedump(struct lttng_session *session,
-               const struct lttng_type *type,
+               const struct lttng_kernel_type_variant *type,
                size_t nesting)
 {
        int ret;
        uint32_t i, nr_choices;
 
-       WARN_ON_ONCE(type->type != lttng_kernel_type_variant_nestable);
        /*
         * CTF 1.8 does not allow expressing nonzero variant alignment in a nestable way.
         */
-       if (type->u.variant_nestable.alignment != 0)
+       if (type->alignment != 0)
                return -EINVAL;
        ret = print_tabs(session, nesting);
        if (ret)
                return ret;
        ret = lttng_metadata_printf(session,
                "variant <_%s> {\n",
-               type->u.variant_nestable.tag_name);
+               type->tag_name);
        if (ret)
                return ret;
-       nr_choices = type->u.variant_nestable.nr_choices;
+       nr_choices = type->nr_choices;
        for (i = 0; i < nr_choices; i++) {
-               const struct lttng_event_field *iter_field;
+               const struct lttng_kernel_event_field *iter_field;
 
-               iter_field = &type->u.variant_nestable.choices[i];
+               iter_field = type->choices[i];
                ret = _lttng_field_statedump(session, iter_field, nesting + 1);
                if (ret)
                        return ret;
@@ -3146,13 +3128,13 @@ int _lttng_variant_type_statedump(struct lttng_session *session,
  */
 static
 int _lttng_variant_field_statedump(struct lttng_session *session,
-               const struct lttng_event_field *field,
+               const struct lttng_kernel_event_field *field,
                size_t nesting)
 {
        int ret;
 
        ret = _lttng_variant_type_statedump(session,
-                       &field->type, nesting);
+                       lttng_kernel_get_type_variant(field->type), nesting);
        if (ret)
                return ret;
        return lttng_field_name_statedump(session, field, nesting);
@@ -3163,21 +3145,23 @@ int _lttng_variant_field_statedump(struct lttng_session *session,
  */
 static
 int _lttng_array_field_statedump(struct lttng_session *session,
-               const struct lttng_event_field *field,
+               const struct lttng_kernel_event_field *field,
                size_t nesting)
 {
        int ret;
-       const struct lttng_type *elem_type;
+       const struct lttng_kernel_type_array *array_type;
+       const struct lttng_kernel_type_common *elem_type;
 
-       WARN_ON_ONCE(field->type.type != lttng_kernel_type_array_nestable);
+       array_type = lttng_kernel_get_type_array(field->type);
+       WARN_ON_ONCE(!array_type);
 
-       if (field->type.u.array_nestable.alignment) {
+       if (array_type->alignment) {
                ret = print_tabs(session, nesting);
                if (ret)
                        return ret;
                ret = lttng_metadata_printf(session,
                "struct { } align(%u) _%s_padding;\n",
-                               field->type.u.array_nestable.alignment * CHAR_BIT,
+                               array_type->alignment * CHAR_BIT,
                                field->name);
                if (ret)
                        return ret;
@@ -3186,12 +3170,13 @@ int _lttng_array_field_statedump(struct lttng_session *session,
         * Nested compound types: Only array of structures and variants are
         * currently supported.
         */
-       elem_type = field->type.u.array_nestable.elem_type;
+       elem_type = array_type->elem_type;
        switch (elem_type->type) {
        case lttng_kernel_type_integer:
-       case lttng_kernel_type_struct_nestable:
-       case lttng_kernel_type_variant_nestable:
-               ret = _lttng_type_statedump(session, elem_type, nesting);
+       case lttng_kernel_type_struct:
+       case lttng_kernel_type_variant:
+               ret = _lttng_type_statedump(session, elem_type,
+                               array_type->encoding, nesting);
                if (ret)
                        return ret;
                break;
@@ -3202,7 +3187,7 @@ int _lttng_array_field_statedump(struct lttng_session *session,
        ret = lttng_metadata_printf(session,
                " _%s[%u];\n",
                field->name,
-               field->type.u.array_nestable.length);
+               array_type->length);
        return ret;
 }
 
@@ -3211,24 +3196,26 @@ int _lttng_array_field_statedump(struct lttng_session *session,
  */
 static
 int _lttng_sequence_field_statedump(struct lttng_session *session,
-               const struct lttng_event_field *field,
+               const struct lttng_kernel_event_field *field,
                size_t nesting)
 {
        int ret;
        const char *length_name;
-       const struct lttng_type *elem_type;
+       const struct lttng_kernel_type_sequence *sequence_type;
+       const struct lttng_kernel_type_common *elem_type;
 
-       WARN_ON_ONCE(field->type.type != lttng_kernel_type_sequence_nestable);
+       sequence_type = lttng_kernel_get_type_sequence(field->type);
+       WARN_ON_ONCE(!sequence_type);
 
-       length_name = field->type.u.sequence_nestable.length_name;
+       length_name = sequence_type->length_name;
 
-       if (field->type.u.sequence_nestable.alignment) {
+       if (sequence_type->alignment) {
                ret = print_tabs(session, nesting);
                if (ret)
                        return ret;
                ret = lttng_metadata_printf(session,
                "struct { } align(%u) _%s_padding;\n",
-                               field->type.u.sequence_nestable.alignment * CHAR_BIT,
+                               sequence_type->alignment * CHAR_BIT,
                                field->name);
                if (ret)
                        return ret;
@@ -3238,12 +3225,13 @@ int _lttng_sequence_field_statedump(struct lttng_session *session,
         * Nested compound types: Only array of structures and variants are
         * currently supported.
         */
-       elem_type = field->type.u.sequence_nestable.elem_type;
+       elem_type = sequence_type->elem_type;
        switch (elem_type->type) {
        case lttng_kernel_type_integer:
-       case lttng_kernel_type_struct_nestable:
-       case lttng_kernel_type_variant_nestable:
-               ret = _lttng_type_statedump(session, elem_type, nesting);
+       case lttng_kernel_type_struct:
+       case lttng_kernel_type_variant:
+               ret = _lttng_type_statedump(session, elem_type,
+                               sequence_type->encoding, nesting);
                if (ret)
                        return ret;
                break;
@@ -3254,7 +3242,7 @@ int _lttng_sequence_field_statedump(struct lttng_session *session,
        ret = lttng_metadata_printf(session,
                " _%s[ _%s ];\n",
                field->name,
-               field->type.u.sequence_nestable.length_name);
+               sequence_type->length_name);
        return ret;
 }
 
@@ -3263,20 +3251,20 @@ int _lttng_sequence_field_statedump(struct lttng_session *session,
  */
 static
 int _lttng_enum_type_statedump(struct lttng_session *session,
-               const struct lttng_type *type,
+               const struct lttng_kernel_type_enum *type,
                size_t nesting)
 {
-       const struct lttng_enum_desc *enum_desc;
-       const struct lttng_type *container_type;
+       const struct lttng_kernel_enum_desc *enum_desc;
+       const struct lttng_kernel_type_common *container_type;
        int ret;
        unsigned int i, nr_entries;
 
-       container_type = type->u.enum_nestable.container_type;
+       container_type = type->container_type;
        if (container_type->type != lttng_kernel_type_integer) {
                ret = -EINVAL;
                goto end;
        }
-       enum_desc = type->u.enum_nestable.desc;
+       enum_desc = type->desc;
        nr_entries = enum_desc->nr_entries;
 
        ret = print_tabs(session, nesting);
@@ -3285,7 +3273,8 @@ int _lttng_enum_type_statedump(struct lttng_session *session,
        ret = lttng_metadata_printf(session, "enum : ");
        if (ret)
                goto end;
-       ret = _lttng_integer_type_statedump(session, container_type, 0);
+       ret = _lttng_integer_type_statedump(session, lttng_kernel_get_type_integer(container_type),
+                       lttng_kernel_string_encoding_none, 0);
        if (ret)
                goto end;
        ret = lttng_metadata_printf(session, " {\n");
@@ -3293,7 +3282,7 @@ int _lttng_enum_type_statedump(struct lttng_session *session,
                goto end;
        /* Dump all entries */
        for (i = 0; i < nr_entries; i++) {
-               const struct lttng_enum_entry *entry = &enum_desc->entries[i];
+               const struct lttng_kernel_enum_entry *entry = enum_desc->entries[i];
                int j, len;
 
                ret = print_tabs(session, nesting + 1);
@@ -3379,12 +3368,15 @@ end:
  */
 static
 int _lttng_enum_field_statedump(struct lttng_session *session,
-               const struct lttng_event_field *field,
+               const struct lttng_kernel_event_field *field,
                size_t nesting)
 {
        int ret;
+       const struct lttng_kernel_type_enum *enum_type;
 
-       ret = _lttng_enum_type_statedump(session, &field->type, nesting);
+       enum_type = lttng_kernel_get_type_enum(field->type);
+       WARN_ON_ONCE(!enum_type);
+       ret = _lttng_enum_type_statedump(session, enum_type, nesting);
        if (ret)
                return ret;
        return lttng_field_name_statedump(session, field, nesting);
@@ -3392,12 +3384,13 @@ int _lttng_enum_field_statedump(struct lttng_session *session,
 
 static
 int _lttng_integer_field_statedump(struct lttng_session *session,
-               const struct lttng_event_field *field,
+               const struct lttng_kernel_event_field *field,
                size_t nesting)
 {
        int ret;
 
-       ret = _lttng_integer_type_statedump(session, &field->type, nesting);
+       ret = _lttng_integer_type_statedump(session, lttng_kernel_get_type_integer(field->type),
+                       lttng_kernel_string_encoding_none, nesting);
        if (ret)
                return ret;
        return lttng_field_name_statedump(session, field, nesting);
@@ -3405,32 +3398,33 @@ int _lttng_integer_field_statedump(struct lttng_session *session,
 
 static
 int _lttng_string_type_statedump(struct lttng_session *session,
-               const struct lttng_type *type,
+               const struct lttng_kernel_type_string *type,
                size_t nesting)
 {
        int ret;
 
-       WARN_ON_ONCE(type->type != lttng_kernel_type_string);
        /* Default encoding is UTF8 */
        ret = print_tabs(session, nesting);
        if (ret)
                return ret;
        ret = lttng_metadata_printf(session,
                "string%s",
-               type->u.string.encoding == lttng_encode_ASCII ?
+               type->encoding == lttng_kernel_string_encoding_ASCII ?
                        " { encoding = ASCII; }" : "");
        return ret;
 }
 
 static
 int _lttng_string_field_statedump(struct lttng_session *session,
-               const struct lttng_event_field *field,
+               const struct lttng_kernel_event_field *field,
                size_t nesting)
 {
+       const struct lttng_kernel_type_string *string_type;
        int ret;
 
-       WARN_ON_ONCE(field->type.type != lttng_kernel_type_string);
-       ret = _lttng_string_type_statedump(session, &field->type, nesting);
+       string_type = lttng_kernel_get_type_string(field->type);
+       WARN_ON_ONCE(!string_type);
+       ret = _lttng_string_type_statedump(session, string_type, nesting);
        if (ret)
                return ret;
        return lttng_field_name_statedump(session, field, nesting);
@@ -3441,31 +3435,42 @@ int _lttng_string_field_statedump(struct lttng_session *session,
  */
 static
 int _lttng_type_statedump(struct lttng_session *session,
-               const struct lttng_type *type,
+               const struct lttng_kernel_type_common *type,
+               enum lttng_kernel_string_encoding parent_encoding,
                size_t nesting)
 {
        int ret = 0;
 
        switch (type->type) {
        case lttng_kernel_type_integer:
-               ret = _lttng_integer_type_statedump(session, type, nesting);
+               ret = _lttng_integer_type_statedump(session,
+                               lttng_kernel_get_type_integer(type),
+                               parent_encoding, nesting);
                break;
-       case lttng_kernel_type_enum_nestable:
-               ret = _lttng_enum_type_statedump(session, type, nesting);
+       case lttng_kernel_type_enum:
+               ret = _lttng_enum_type_statedump(session,
+                               lttng_kernel_get_type_enum(type),
+                               nesting);
                break;
        case lttng_kernel_type_string:
-               ret = _lttng_string_type_statedump(session, type, nesting);
+               ret = _lttng_string_type_statedump(session,
+                               lttng_kernel_get_type_string(type),
+                               nesting);
                break;
-       case lttng_kernel_type_struct_nestable:
-               ret = _lttng_struct_type_statedump(session, type, nesting);
+       case lttng_kernel_type_struct:
+               ret = _lttng_struct_type_statedump(session,
+                               lttng_kernel_get_type_struct(type),
+                               nesting);
                break;
-       case lttng_kernel_type_variant_nestable:
-               ret = _lttng_variant_type_statedump(session, type, nesting);
+       case lttng_kernel_type_variant:
+               ret = _lttng_variant_type_statedump(session,
+                               lttng_kernel_get_type_variant(type),
+                               nesting);
                break;
 
        /* Nested arrays and sequences are not supported yet. */
-       case lttng_kernel_type_array_nestable:
-       case lttng_kernel_type_sequence_nestable:
+       case lttng_kernel_type_array:
+       case lttng_kernel_type_sequence:
        default:
                WARN_ON_ONCE(1);
                return -EINVAL;
@@ -3478,31 +3483,31 @@ int _lttng_type_statedump(struct lttng_session *session,
  */
 static
 int _lttng_field_statedump(struct lttng_session *session,
-               const struct lttng_event_field *field,
+               const struct lttng_kernel_event_field *field,
                size_t nesting)
 {
        int ret = 0;
 
-       switch (field->type.type) {
+       switch (field->type->type) {
        case lttng_kernel_type_integer:
                ret = _lttng_integer_field_statedump(session, field, nesting);
                break;
-       case lttng_kernel_type_enum_nestable:
+       case lttng_kernel_type_enum:
                ret = _lttng_enum_field_statedump(session, field, nesting);
                break;
        case lttng_kernel_type_string:
                ret = _lttng_string_field_statedump(session, field, nesting);
                break;
-       case lttng_kernel_type_struct_nestable:
+       case lttng_kernel_type_struct:
                ret = _lttng_struct_field_statedump(session, field, nesting);
                break;
-       case lttng_kernel_type_array_nestable:
+       case lttng_kernel_type_array:
                ret = _lttng_array_field_statedump(session, field, nesting);
                break;
-       case lttng_kernel_type_sequence_nestable:
+       case lttng_kernel_type_sequence:
                ret = _lttng_sequence_field_statedump(session, field, nesting);
                break;
-       case lttng_kernel_type_variant_nestable:
+       case lttng_kernel_type_variant:
                ret = _lttng_variant_field_statedump(session, field, nesting);
                break;
 
@@ -3515,7 +3520,7 @@ int _lttng_field_statedump(struct lttng_session *session,
 
 static
 int _lttng_context_metadata_statedump(struct lttng_session *session,
-                                   struct lttng_ctx *ctx)
+                                   struct lttng_kernel_ctx *ctx)
 {
        int ret = 0;
        int i;
@@ -3523,9 +3528,9 @@ int _lttng_context_metadata_statedump(struct lttng_session *session,
        if (!ctx)
                return 0;
        for (i = 0; i < ctx->nr_fields; i++) {
-               const struct lttng_ctx_field *field = &ctx->fields[i];
+               const struct lttng_kernel_ctx_field *field = &ctx->fields[i];
 
-               ret = _lttng_field_statedump(session, &field->event_field, 2);
+               ret = _lttng_field_statedump(session, field->event_field, 2);
                if (ret)
                        return ret;
        }
@@ -3536,12 +3541,12 @@ static
 int _lttng_fields_metadata_statedump(struct lttng_session *session,
                                   struct lttng_event *event)
 {
-       const struct lttng_event_desc *desc = event->desc;
+       const struct lttng_kernel_event_desc *desc = event->desc;
        int ret = 0;
        int i;
 
        for (i = 0; i < desc->nr_fields; i++) {
-               const struct lttng_event_field *field = &desc->fields[i];
+               const struct lttng_kernel_event_field *field = desc->fields[i];
 
                ret = _lttng_field_statedump(session, field, 2);
                if (ret)
@@ -3574,7 +3579,7 @@ int _lttng_event_metadata_statedump(struct lttng_session *session,
                "       name = \"%s\";\n"
                "       id = %u;\n"
                "       stream_id = %u;\n",
-               event->desc->name,
+               event->desc->event_name,
                event->id,
                event->chan->id);
        if (ret)
This page took 0.051425 seconds and 4 git commands to generate.