fix: 'random' tracepoints removed in stable kernels
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 31 May 2022 19:24:48 +0000 (15:24 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 2 Jun 2022 20:17:36 +0000 (16:17 -0400)
The upstream commit 14c174633f349cb41ea90c2c0aaddac157012f74 removing
the 'random' tracepoints is being backported to multiple stable kernel
branches, I don't see how that qualifies as a fix but here we are.

Use the presence of 'include/trace/events/random.h' in the kernel source
tree instead of the rather tortuous version check to determine if we
need to build 'lttng-probe-random.ko'.

Change-Id: I8f5f2f4c9e09c61127c49c7949b22dd3fab0460d
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
probes/Kbuild

index ccaa9f5e11d857af4e3778fcd9ef5fa72ef8b726..4db634abbd41143a02d14484f632d31d6b07ef7d 100644 (file)
@@ -188,18 +188,10 @@ ifneq ($(CONFIG_FRAME_WARN),0)
 endif
 
 # Introduced in v3.6, remove in v5.18
-obj-$(CONFIG_LTTNG) +=  $(shell \
-    if [ \( ! \( $(VERSION) -ge 6 \
-      -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \
-      -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -eq 15 -a $(SUBLEVEL) -ge 44 \) \
-      -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -eq 10 -a $(SUBLEVEL) -ge 119\) \) \) \
-      -a \
-      $(VERSION) -ge 4 \
-      -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \
-      -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 5 -a $(SUBLEVEL) -ge 2 \) \
-      -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 4 -a $(SUBLEVEL) -ge 9 \) \
-      -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 0 -a $(SUBLEVEL) -ge 41 \) ] ; then \
-      echo "lttng-probe-random.o" ; fi;)
+random_dep = $(srctree)/include/trace/events/random.h
+ifneq ($(wildcard $(random_dep)),)
+  obj-$(CONFIG_LTTNG) += lttng-probe-random.o
+endif
 
 obj-$(CONFIG_LTTNG) +=  $(shell \
   if [ $(VERSION) -ge 4 \
This page took 0.026007 seconds and 4 git commands to generate.