From: Michael Jeanson Date: Fri, 14 Apr 2023 19:09:25 +0000 (-0400) Subject: Add support for RHEL 9.1 X-Git-Tag: v2.13.10~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=dd576484bc381ed71620f625300c5e33c9c9c13e;p=lttng-modules.git Add support for RHEL 9.1 Change-Id: I2aaa8e385448b1e46c3c16edc4f36f2eb6906e76 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/instrumentation/events/block.h b/include/instrumentation/events/block.h index c1c313ee..b856ea48 100644 --- a/include/instrumentation/events/block.h +++ b/include/instrumentation/events/block.h @@ -66,7 +66,8 @@ LTTNG_TRACEPOINT_ENUM(block_rq_type, #define lttng_bio_op(bio) bio_op(bio) #define lttng_bio_rw(bio) ((bio)->bi_opf) -#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,162,0,0, 5,15,0,0,0,0)) #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM #define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \ ctf_enum(block_rq_type, type, rwbs, \ @@ -342,7 +343,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error, block_rq_abort, ) #endif -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0) \ + || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0)) /** * block_rq_requeue - place block IO request back on a queue * @rq: block IO operation request @@ -438,7 +440,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error, block_rq_requeue, * do for the request. If @rq->bio is non-NULL then there is * additional work required to complete the request. */ -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0) \ + || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(block_rq_complete, TP_PROTO(struct request *rq, blk_status_t error, unsigned int nr_bytes), @@ -595,7 +598,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error, block_rq_complete, #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */ -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0) \ + || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0)) LTTNG_TRACEPOINT_EVENT_CLASS(block_rq, TP_PROTO(struct request *rq), @@ -1615,7 +1619,8 @@ LTTNG_TRACEPOINT_EVENT(block_bio_remap, ) #endif -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0) \ + || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0)) /** * block_rq_remap - map request for a block operation request * @rq: block IO operation request diff --git a/include/instrumentation/events/sched.h b/include/instrumentation/events/sched.h index c1c3df15..066a0f8e 100644 --- a/include/instrumentation/events/sched.h +++ b/include/instrumentation/events/sched.h @@ -20,7 +20,8 @@ #ifndef _TRACE_SCHED_DEF_ #define _TRACE_SCHED_DEF_ -#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,162,0,0, 5,15,0,0,0,0)) static inline long __trace_sched_switch_state(bool preempt, unsigned int prev_state, @@ -352,7 +353,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, sched_wakeup_new, * Tracepoint for task switches, performed by the scheduler: */ -#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,162,0,0, 5,15,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(sched_switch, TP_PROTO(bool preempt, diff --git a/include/wrapper/genhd.h b/include/wrapper/genhd.h index 4a59b68e..2992cb43 100644 --- a/include/wrapper/genhd.h +++ b/include/wrapper/genhd.h @@ -12,13 +12,15 @@ #ifndef _LTTNG_WRAPPER_GENHD_H #define _LTTNG_WRAPPER_GENHD_H -#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,162,0,0, 5,15,0,0,0,0)) #include #else #include #endif -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0) \ + || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0)) #define LTTNG_GENHD_FL_HIDDEN GENHD_FL_HIDDEN #else #define LTTNG_GENHD_FL_HIDDEN GENHD_FL_SUPPRESS_PARTITION_INFO diff --git a/src/lttng-events.c b/src/lttng-events.c index e9b56871..3c9251a0 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -49,7 +49,8 @@ #include #include -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0) \ + || LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0)) #include #else #include