fix: Add missing 'pselect6_time32' and 'ppoll_time32' syscall overrides
[lttng-modules.git] / src / lttng-events.c
index 472440e1770e4ca40000d5ed7c3dd9f219d60727..73f591fd9e56702ac2d73c9ae10a8c6069408735 100644 (file)
@@ -46,9 +46,9 @@
 #include <lttng/utils.h>
 #include <ringbuffer/backend.h>
 #include <ringbuffer/frontend.h>
-#include <wrapper/time.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>
@@ -102,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)
@@ -1346,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;
@@ -1396,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;
@@ -1553,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)
 {
@@ -2453,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)
@@ -2824,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, ...)
 {
@@ -3688,20 +3664,12 @@ int64_t measure_clock_offset(void)
        uint64_t tcf = trace_clock_freq();
        int64_t offset;
        unsigned long flags;
-#ifdef LTTNG_KERNEL_HAS_TIMESPEC64
        struct timespec64 rts = { 0, 0 };
-#else
-       struct timespec rts = { 0, 0 };
-#endif
 
        /* Disable interrupts to increase correlation precision. */
        local_irq_save(flags);
        monotonic[0] = trace_clock_read64();
-#ifdef LTTNG_KERNEL_HAS_TIMESPEC64
        ktime_get_real_ts64(&rts);
-#else
-       getnstimeofday(&rts);
-#endif
        monotonic[1] = trace_clock_read64();
        local_irq_restore(flags);
 
@@ -4161,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.02479 seconds and 4 git commands to generate.