All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Hicks via lttng-dev <lttng-dev@lists.lttng.org>
To: lttng-dev@lists.lttng.org
Subject: [lttng-dev] [PATCH] Compile fixes for RHEL 9.3 kernels
Date: Fri, 26 Jan 2024 12:18:33 -0500	[thread overview]
Message-ID: <20240126171833.cppkzs4pl2f4scf6@newton> (raw)


I'm not sure when some of these changes were backported, but the
unmodified lttng-modules compiles vs. 5.14.0-162.23.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.

Signed-off-by: Martin Hicks <martin@sr-research.com>
---
 include/instrumentation/events/compaction.h |  3 ++-
 include/instrumentation/events/jbd2.h       |  3 ++-
 include/instrumentation/events/kmem.h       | 12 +++++++++---
 include/instrumentation/events/skb.h        |  3 ++-
 include/wrapper/kprobes.h                   |  3 ++-
 src/lttng-statedump-impl.c                  |  3 ++-
 src/probes/Kbuild                           |  6 ++++--
 7 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/include/instrumentation/events/compaction.h b/include/instrumentation/events/compaction.h
index 31d0a422..7d0c2623 100644
--- a/include/instrumentation/events/compaction.h
+++ b/include/instrumentation/events/compaction.h
@@ -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,
diff --git a/include/instrumentation/events/jbd2.h b/include/instrumentation/events/jbd2.h
index b00777fa..eccac06d 100644
--- a/include/instrumentation/events/jbd2.h
+++ b/include/instrumentation/events/jbd2.h
@@ -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,
diff --git a/include/instrumentation/events/kmem.h b/include/instrumentation/events/kmem.h
index dd22192f..f2e2d11d 100644
--- a/include/instrumentation/events/kmem.h
+++ b/include/instrumentation/events/kmem.h
@@ -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,
diff --git a/include/instrumentation/events/skb.h b/include/instrumentation/events/skb.h
index 08704b98..9e32aa6e 100644
--- a/include/instrumentation/events/skb.h
+++ b/include/instrumentation/events/skb.h
@@ -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,163,0,0, 5,15,0,0,0,0))
 LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
 
 	skb_consume,
diff --git a/include/wrapper/kprobes.h b/include/wrapper/kprobes.h
index 51d32b7c..d906bcba 100644
--- a/include/wrapper/kprobes.h
+++ b/include/wrapper/kprobes.h
@@ -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)
 {
diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c
index 22e3628b..0b09027a 100644
--- a/src/lttng-statedump-impl.c
+++ b/src/lttng-statedump-impl.c
@@ -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
 
diff --git a/src/probes/Kbuild b/src/probes/Kbuild
index 73a15844..71ad8e4c 100644
--- a/src/probes/Kbuild
+++ b/src/probes/Kbuild
@@ -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 \( $(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 \( $(RHEL_API_VERSION) -gt 1622301 \) \) -a \
      -z "$(compaction_dep_wildcard)" ] ; then \
     echo "warn" ; \
   else \
-- 
2.39.3

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

             reply	other threads:[~2024-01-26 17:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 17:18 Martin Hicks via lttng-dev [this message]
2024-02-06 19:14 ` [lttng-dev] [PATCH] Compile fixes for RHEL 9.3 kernels Michael Jeanson via lttng-dev
2024-02-07 14:15   ` Martin Hicks via lttng-dev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240126171833.cppkzs4pl2f4scf6@newton \
    --to=lttng-dev@lists.lttng.org \
    --cc=martin@sr-research.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.