]> git.lttng.org Git - lttng-modules.git/commitdiff
Compile fixes for RHEL 9.3 kernels
authorMartin Hicks <martin@sr-research.com>
Fri, 26 Jan 2024 17:18:33 +0000 (12:18 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 7 Feb 2024 19:43:26 +0000 (14:43 -0500)
The ranges were build tested on RHEL9.2 (5.14.0-284.11.1), RHEL9.3
(5.14.0-362.8.1) and RHEL8.9 (4.18.0-513.11.1).

This disables the kmem and compaction modules.  I don't believe getting
these to compile will be easy, as the required struct declarations are
in vmlinux.h, and haven't been moved into mm/internal.h and mm/slab.h in
the RHEL sources.

Change-Id: I999c593d6850e2327f6e9df8432a4ea2325a7cea
Signed-off-by: Martin Hicks <martin@sr-research.com>
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/instrumentation/events/compaction.h
include/instrumentation/events/jbd2.h
include/instrumentation/events/kmem.h
include/instrumentation/events/skb.h
include/wrapper/kprobes.h
src/lttng-statedump-impl.c
src/probes/Kbuild

index 31d0a422e52418290403bd92fcc45b554c6a8f8c..7d0c2623fba1d4949aaa12a7af20c2d360e93659 100644 (file)
@@ -54,7 +54,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(compaction_isolate_template,
        TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken)
 )
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0) || \
+    LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
 LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages,
 
        compaction_migratepages,
index b00777fa2f688bb3c389407ffd483eb8b7d0a0d6..eccac06da68308b4eb93f7d3381c04e1054162b6 100644 (file)
@@ -237,7 +237,8 @@ LTTNG_TRACEPOINT_EVENT(jbd2_update_log_tail,
        )
 )
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0) || \
+     LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
 
 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
 LTTNG_TRACEPOINT_ENUM(req_op,
index dd22192fd132d12785d84952af38e030349e576e..f2e2d11d0284a6a7bb0a462a30f51b95a1bd964a 100644 (file)
@@ -61,7 +61,9 @@ LTTNG_TRACEPOINT_EVENT(kmem_cache_alloc,
                        (s->flags & SLAB_ACCOUNT)) : false)
        )
 )
-#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0) || \
+       LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
+
 LTTNG_TRACEPOINT_EVENT_CLASS(kmem_alloc,
 
        TP_PROTO(unsigned long call_site,
@@ -141,7 +143,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kmem_alloc, kmem_cache_alloc,
 )
 #endif
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0) || \
+       LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
+
 LTTNG_TRACEPOINT_EVENT_CLASS(kmem_alloc_node,
 
        TP_PROTO(unsigned long call_site,
@@ -359,7 +363,9 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc, kmem_mm_page_alloc,
        )
 )
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,19,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,19,0) || \
+       LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
+
 LTTNG_TRACEPOINT_EVENT_CLASS(kmem_mm_page,
 
        TP_PROTO(struct page *page, unsigned int order, int migratetype,
index 08704b98a0ef1efd37872aa4528626ab7a0f6dd2..9f1047c6e134b8d8c3761430b9919a616db1aafe 100644 (file)
@@ -77,7 +77,8 @@ LTTNG_TRACEPOINT_EVENT_MAP(kfree_skb,
 )
 #endif
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0) || \
+    LTTNG_RHEL_KERNEL_RANGE(5,14,0,362,0,0, 5,15,0,0,0,0))
 LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
 
        skb_consume,
index 51d32b7cc225981efb0bde2785b953bf3bc26d8b..d906bcba7dc3ff0427f966f44699d2000e4b7128 100644 (file)
@@ -30,7 +30,8 @@ struct kretprobe *lttng_get_kretprobe(struct kretprobe_instance *ri)
 #endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) */
 
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0) || \
+    LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
 static inline
 unsigned long lttng_get_kretprobe_retaddr(struct kretprobe_instance *ri)
 {
index 22e3628ba459c9d0b56db7d2e9b90417ce71fed8..0b09027adf29a9f856c0410ad4154eff8a32311c 100644 (file)
@@ -191,7 +191,8 @@ enum lttng_process_status {
 };
 
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0) || \
+    LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
 
 #define LTTNG_PART_STRUCT_TYPE struct block_device
 
index 73a158441cf7f4d29f8ee1b1ebc205b930d209f6..bac90c3af25d19a5bc53791b74597766e6aea932 100644 (file)
@@ -15,7 +15,8 @@ kmem_dep = $(srctree)/mm/slab.h
 kmem_dep_wildcard = $(wildcard $(kmem_dep))
 kmem_dep_check = $(shell \
 if [ \( $(VERSION) -ge 7 \
-   -o \( $(VERSION) -eq 6 -a $(PATCHLEVEL) -ge 0 \) \) -a \
+   -o \( $(VERSION) -eq 6 -a $(PATCHLEVEL) -ge 0 \) \
+   -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 14 -a $(RHEL_API_VERSION) -gt 1622301 \) \) -a \
    -z "$(kmem_dep_wildcard)" ] ; then \
   echo "warn" ; \
 else \
@@ -166,7 +167,8 @@ ifneq ($(CONFIG_COMPACTION),)
   compaction_dep_wildcard = $(wildcard $(compaction_dep))
   compaction_dep_check = $(shell \
   if [ \( $(VERSION) -ge 6 \
-     -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \) -a \
+     -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \
+     -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 14 -a $(RHEL_API_VERSION) -gt 1622301 \) \) -a \
      -z "$(compaction_dep_wildcard)" ] ; then \
     echo "warn" ; \
   else \
This page took 0.0341 seconds and 4 git commands to generate.