Warn and return on fd overflow fdt
[lttng-modules.git] / src / lttng-events.c
index 431da540108430108c618390f9c216bf87567748..73f591fd9e56702ac2d73c9ae10a8c6069408735 100644 (file)
@@ -47,7 +47,8 @@
 #include <ringbuffer/backend.h>
 #include <ringbuffer/frontend.h>
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0) \
+       || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0))
 #include <linux/stdarg.h>
 #else
 #include <stdarg.h>
@@ -101,15 +102,9 @@ void synchronize_trace(void)
        synchronize_sched();
 #endif
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 #ifdef CONFIG_PREEMPT_RT_FULL
        synchronize_rcu();
 #endif
-#else /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0)) */
-#ifdef CONFIG_PREEMPT_RT
-       synchronize_rcu();
-#endif
-#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0)) */
 }
 
 void lttng_lock_sessions(void)
@@ -1345,7 +1340,7 @@ void register_event(struct lttng_kernel_event_common *event)
        desc = event->priv->desc;
        switch (event->priv->instrumentation) {
        case LTTNG_KERNEL_ABI_TRACEPOINT:
-               ret = lttng_wrapper_tracepoint_probe_register(desc->event_kname,
+               ret = lttng_tracepoint_probe_register(desc->event_kname,
                                                  desc->tp_class->probe_callback,
                                                  event);
                break;
@@ -1395,7 +1390,7 @@ void unregister_event(struct lttng_kernel_event_common *event)
        desc = event_priv->desc;
        switch (event_priv->instrumentation) {
        case LTTNG_KERNEL_ABI_TRACEPOINT:
-               ret = lttng_wrapper_tracepoint_probe_unregister(event_priv->desc->event_kname,
+               ret = lttng_tracepoint_probe_unregister(event_priv->desc->event_kname,
                                                  event_priv->desc->tp_class->probe_callback,
                                                  event);
                break;
@@ -1552,6 +1547,7 @@ void _lttng_event_destroy(struct lttng_kernel_event_common *event)
        }
 }
 
+static
 struct lttng_kernel_id_tracker *get_tracker(struct lttng_kernel_session *session,
                enum tracker_type tracker_type)
 {
@@ -2452,26 +2448,6 @@ void lttng_event_notifier_enabler_group_add(struct lttng_event_notifier_group *e
        mutex_unlock(&sessions_mutex);
 }
 
-int lttng_event_notifier_enabler_enable(
-               struct lttng_event_notifier_enabler *event_notifier_enabler)
-{
-       mutex_lock(&sessions_mutex);
-       lttng_event_notifier_enabler_as_enabler(event_notifier_enabler)->enabled = 1;
-       lttng_event_notifier_group_sync_enablers(event_notifier_enabler->group);
-       mutex_unlock(&sessions_mutex);
-       return 0;
-}
-
-int lttng_event_notifier_enabler_disable(
-               struct lttng_event_notifier_enabler *event_notifier_enabler)
-{
-       mutex_lock(&sessions_mutex);
-       lttng_event_notifier_enabler_as_enabler(event_notifier_enabler)->enabled = 0;
-       lttng_event_notifier_group_sync_enablers(event_notifier_enabler->group);
-       mutex_unlock(&sessions_mutex);
-       return 0;
-}
-
 int lttng_event_notifier_enabler_attach_capture_bytecode(
                struct lttng_event_notifier_enabler *event_notifier_enabler,
                struct lttng_kernel_abi_capture_bytecode __user *bytecode)
@@ -2823,6 +2799,7 @@ void lttng_metadata_end(struct lttng_kernel_session *session)
  * The content of the printf is printed as a single atomic metadata
  * transaction.
  */
+static
 int lttng_metadata_printf(struct lttng_kernel_session *session,
                          const char *fmt, ...)
 {
@@ -4152,13 +4129,7 @@ static int __init lttng_events_init(void)
 {
        int ret;
 
-       ret = wrapper_lttng_fixup_sig(THIS_MODULE);
-       if (ret)
-               return ret;
        ret = wrapper_get_pfnblock_flags_mask_init();
-       if (ret)
-               return ret;
-       ret = wrapper_get_pageblock_flags_mask_init();
        if (ret)
                return ret;
        ret = lttng_probes_init();
This page took 0.028205 seconds and 4 git commands to generate.