From: Michael Jeanson Date: Fri, 18 Nov 2022 22:49:02 +0000 (-0500) Subject: Drop support for kernels < 4.4 from LTTng tracer core X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7724cf27c1e739099c7907ba5b3b8bc86f904595;p=lttng-modules.git Drop support for kernels < 4.4 from LTTng tracer core Change-Id: I16a57b7d7361d902b18de38faa33943430dedb97 Signed-off-by: Michael Jeanson --- diff --git a/src/Kbuild b/src/Kbuild index ede6b847..5cc8617d 100644 --- a/src/Kbuild +++ b/src/Kbuild @@ -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 diff --git a/src/lib/ringbuffer/ring_buffer_splice.c b/src/lib/ringbuffer/ring_buffer_splice.c index cac44e16..375255b5 100644 --- a/src/lib/ringbuffer/ring_buffer_splice.c +++ b/src/lib/ringbuffer/ring_buffer_splice.c @@ -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, diff --git a/src/lttng-events.c b/src/lttng-events.c index 827c9d4c..113ccad0 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -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) diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c index 0593f4c8..22e3628b 100644 --- a/src/lttng-statedump-impl.c +++ b/src/lttng-statedump-impl.c @@ -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