Drop support for kernels < 4.4 from LTTng tracer core
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 18 Nov 2022 22:49:02 +0000 (17:49 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 23 Nov 2022 20:05:08 +0000 (15:05 -0500)
Change-Id: I16a57b7d7361d902b18de38faa33943430dedb97
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
src/Kbuild
src/lib/ringbuffer/ring_buffer_splice.c
src/lttng-events.c
src/lttng-statedump-impl.c

index ede6b847e299edc6578c6d8372e7b84c7aa8e62b..5cc8617df2991ca19b0d9619af009eb759d7968e 100644 (file)
@@ -108,10 +108,7 @@ ifneq ($(CONFIG_PREEMPT),)
   lttng-tracer-objs += lttng-context-preemptible.o
 endif
 
-lttng-tracer-objs += $(shell \
-  if [ $(VERSION) -ge 4 \
-    -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 15 \) ] ; then \
-    echo "lttng-tracepoint.o" ; fi;)
+lttng-tracer-objs += lttng-tracepoint.o
 
 lttng-tracer-objs += lttng-context-cgroup-ns.o
 
@@ -151,3 +148,5 @@ obj-$(CONFIG_LTTNG) += lib/
 obj-$(CONFIG_LTTNG) += tests/
 
 obj-$(CONFIG_LTTNG_SYSCALLS_EXTRACTOR) += lttng-syscalls-extractor.o
+
+# vim:syntax=make
index cac44e16e860d873c36e37e0502b735fab108e6a..375255b51cf1725a25927912be211179a4dd3bc9 100644 (file)
@@ -60,19 +60,9 @@ static const struct pipe_buf_operations ring_buffer_pipe_buf_ops = {
        .steal = generic_pipe_buf_steal,
        .get = generic_pipe_buf_get
 };
-#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0))
-static const struct pipe_buf_operations ring_buffer_pipe_buf_ops = {
-       .can_merge = 0,
-       .confirm = generic_pipe_buf_confirm,
-       .release = lib_ring_buffer_pipe_buf_release,
-       .steal = generic_pipe_buf_steal,
-       .get = generic_pipe_buf_get
-};
 #else
 static const struct pipe_buf_operations ring_buffer_pipe_buf_ops = {
        .can_merge = 0,
-       .map = generic_pipe_buf_map,
-       .unmap = generic_pipe_buf_unmap,
        .confirm = generic_pipe_buf_confirm,
        .release = lib_ring_buffer_pipe_buf_release,
        .steal = generic_pipe_buf_steal,
index 827c9d4c3cae839e859c6fb9e4397b11e882d988..113ccad0516e15afa80b6b3d904c13e3544cdf90 100644 (file)
@@ -101,15 +101,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)
index 0593f4c8bd22ee3e6fbd62f2535ba08a4e97eff0..22e3628ba459c9d0b56db7d2e9b90417ce71fed8 100644 (file)
@@ -601,21 +601,8 @@ void lttng_statedump_process_ns(struct lttng_kernel_session *session,
                user_ns = user_ns ? user_ns->parent : NULL;
        } while (user_ns);
 
-       /*
-        * Back and forth on locking strategy within Linux upstream for nsproxy.
-        * See Linux upstream commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3
-        * "namespaces: Use task_lock and not rcu to protect nsproxy"
-        * for details.
-        */
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0) || \
-               LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,36, 3,14,0,0) || \
-               LTTNG_UBUNTU_KERNEL_RANGE(3,16,1,11, 3,17,0,0) || \
-               LTTNG_RHEL_KERNEL_RANGE(3,10,0,229,13,0, 3,11,0,0,0,0))
        proxy = p->nsproxy;
-#else
-       rcu_read_lock();
-       proxy = task_nsproxy(p);
-#endif
+
        if (proxy) {
 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0))
                trace_lttng_statedump_process_cgroup_ns(session, p, proxy->cgroup_ns);
@@ -631,14 +618,6 @@ void lttng_statedump_process_ns(struct lttng_kernel_session *session,
                trace_lttng_statedump_process_time_ns(session, p, proxy->time_ns);
 #endif
        }
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0) || \
-               LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,36, 3,14,0,0) || \
-               LTTNG_UBUNTU_KERNEL_RANGE(3,16,1,11, 3,17,0,0) || \
-               LTTNG_RHEL_KERNEL_RANGE(3,10,0,229,13,0, 3,11,0,0,0,0))
-       /* (nothing) */
-#else
-       rcu_read_unlock();
-#endif
 }
 
 static
This page took 0.028799 seconds and 4 git commands to generate.