- chan->sc_table[i] = ltt_event_create(chan, &ev, filter,
- desc);
- if (!chan->sc_table[i]) {
- /*
- * If something goes wrong in event registration
- * after the first one, we have no choice but to
- * leave the previous events in there, until
- * deleted by session teardown.
- */
+ chan->sc_unknown = lttng_event_create(chan, &ev, filter,
+ desc);
+ if (!chan->sc_unknown) {
+ return -EINVAL;
+ }
+ }
+
+ if (!chan->sc_compat_unknown) {
+ const struct lttng_event_desc *desc =
+ &__event_desc___compat_sys_unknown;
+
+ memset(&ev, 0, sizeof(ev));
+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ ev.instrumentation = LTTNG_KERNEL_NOOP;
+ chan->sc_compat_unknown = lttng_event_create(chan, &ev, filter,
+ desc);
+ if (!chan->sc_compat_unknown) {
+ return -EINVAL;
+ }
+ }
+
+ if (!chan->sc_exit) {
+ const struct lttng_event_desc *desc =
+ &__event_desc___exit_syscall;
+
+ memset(&ev, 0, sizeof(ev));
+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ ev.instrumentation = LTTNG_KERNEL_NOOP;
+ chan->sc_exit = lttng_event_create(chan, &ev, filter,
+ desc);
+ if (!chan->sc_exit) {