Fix: signal: Remove SEND_SIG_FORCED (v4.20)
[lttng-modules.git] / lttng-events.c
index 67ed16972a10fbdfe949f4abf8e57bf4a2be0bbd..f1be6028a6440848f104f810250975f1b41a9312 100644 (file)
@@ -226,6 +226,9 @@ int lttng_session_enable(struct lttng_session *session)
        /* Set transient enabler state to "enabled" */
        session->tstate = 1;
 
+       /* We need to sync enablers with session before activation. */
+       lttng_session_sync_enablers(session);
+
        /*
         * Snapshot the number of events per channel to know the type of header
         * we need to use.
@@ -239,9 +242,6 @@ int lttng_session_enable(struct lttng_session *session)
                        chan->header_type = 2;  /* large */
        }
 
-       /* We need to sync enablers with session before activation. */
-       lttng_session_sync_enablers(session);
-
        /* Clear each stream's quiescent state. */
        list_for_each_entry(chan, &session->chan, list) {
                if (chan->channel_type != METADATA_CHANNEL)
@@ -749,6 +749,7 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
                 */
                event->enabled = 0;
                event->registered = 1;
+
                /*
                 * Populate lttng_event structure before event
                 * registration.
@@ -757,7 +758,6 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
 
                ret = lttng_uprobes_register(event_param->name,
                                event_param->u.uprobe.fd,
-                               event_param->u.uprobe.offset,
                                event);
                if (ret)
                        goto register_error;
@@ -1466,6 +1466,18 @@ error_free:
        return ret;
 }
 
+int lttng_event_add_callsite(struct lttng_event *event,
+               struct lttng_kernel_event_callsite __user *callsite)
+{
+
+       switch (event->instrumentation) {
+       case LTTNG_KERNEL_UPROBE:
+               return lttng_uprobes_add_callsite(event, callsite);
+       default:
+               return -EINVAL;
+       }
+}
+
 int lttng_enabler_attach_context(struct lttng_enabler *enabler,
                struct lttng_kernel_context *context_param)
 {
This page took 0.024322 seconds and 4 git commands to generate.