From: Michael Jeanson Date: Tue, 11 May 2021 19:29:23 +0000 (-0400) Subject: fix: adjust ranges for RHEL 8.2 and 8.3 X-Git-Tag: v2.12.6~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=78f56ae3a0c007bf1be7e01731d372f79fe6781e;p=lttng-modules.git fix: adjust ranges for RHEL 8.2 and 8.3 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers Change-Id: I0863ac030f9fdfeb0173b843e75396acda21f3b6 --- diff --git a/instrumentation/events/lttng-module/rpc.h b/instrumentation/events/lttng-module/rpc.h index 12cdb4ac..f492a373 100644 --- a/instrumentation/events/lttng-module/rpc.h +++ b/instrumentation/events/lttng-module/rpc.h @@ -32,7 +32,8 @@ int lttng_get_clid(const struct rpc_task *task) #endif /* ONCE_LTTNG_RPC_H */ -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0) || \ + LTTNG_RHEL_KERNEL_RANGE(4,18,0,193,0,0, 4,19,0,0,0,0)) LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, TP_PROTO(const struct rpc_task *task), diff --git a/instrumentation/events/lttng-module/timer.h b/instrumentation/events/lttng-module/timer.h index 26f0b212..1d69758c 100644 --- a/instrumentation/events/lttng-module/timer.h +++ b/instrumentation/events/lttng-module/timer.h @@ -89,7 +89,8 @@ LTTNG_TRACEPOINT_EVENT(timer_start, ) #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */ -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0) || \ + LTTNG_RHEL_KERNEL_RANGE(4,18,0,193,0,0, 4,19,0,0,0,0)) /** * timer_expire_entry - called immediately before the timer callback * @timer: pointer to struct timer_list diff --git a/instrumentation/events/lttng-module/writeback.h b/instrumentation/events/lttng-module/writeback.h index f874d7d8..85ad03c6 100644 --- a/instrumentation/events/lttng-module/writeback.h +++ b/instrumentation/events/lttng-module/writeback.h @@ -75,7 +75,8 @@ static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode) LTTNG_KERNEL_RANGE(4,14,218, 4,15,0) || \ LTTNG_KERNEL_RANGE(4,19,172, 4,20,0) || \ LTTNG_KERNEL_RANGE(5,4,94, 5,5,0) || \ - LTTNG_UBUNTU_KERNEL_RANGE(4,15,18,141, 4,16,0,0)) + LTTNG_UBUNTU_KERNEL_RANGE(4,15,18,141, 4,16,0,0) || \ + LTTNG_RHEL_KERNEL_RANGE(4,18,0,240,0,0, 4,19,0,0,0,0)) #define show_inode_state(state) \ __print_flags(state, "|", \ {I_DIRTY_SYNC, "I_DIRTY_SYNC"}, \ @@ -394,7 +395,8 @@ LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writepage, writeback_wbc_writepage) LTTNG_KERNEL_RANGE(4,14,196, 4,15,0) || \ LTTNG_KERNEL_RANGE(4,9,235, 4,10,0) || \ LTTNG_KERNEL_RANGE(4,4,235, 4,5,0) || \ - LTTNG_UBUNTU_KERNEL_RANGE(4,15,18,119, 4,16,0,0)) + LTTNG_UBUNTU_KERNEL_RANGE(4,15,18,119, 4,16,0,0) || \ + LTTNG_RHEL_KERNEL_RANGE(4,18,0,240,0,0, 4,19,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(writeback_queue_io, TP_PROTO(struct bdi_writeback *wb, struct wb_writeback_work *work, diff --git a/lib/ringbuffer/ring_buffer_mmap.c b/lib/ringbuffer/ring_buffer_mmap.c index 3074becb..06b67eb4 100644 --- a/lib/ringbuffer/ring_buffer_mmap.c +++ b/lib/ringbuffer/ring_buffer_mmap.c @@ -20,7 +20,8 @@ /* * fault() vm_op implementation for ring buffer file mapping. */ -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0) || \ + LTTNG_RHEL_KERNEL_RANGE(4,18,0,193,0,0, 4,19,0,0,0,0)) static vm_fault_t lib_ring_buffer_fault_compat(struct vm_area_struct *vma, struct vm_fault *vmf) #else static int lib_ring_buffer_fault_compat(struct vm_area_struct *vma, struct vm_fault *vmf) @@ -57,7 +58,8 @@ static int lib_ring_buffer_fault_compat(struct vm_area_struct *vma, struct vm_fa return 0; } -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0) || \ + LTTNG_RHEL_KERNEL_RANGE(4,18,0,193,0,0, 4,19,0,0,0,0)) static vm_fault_t lib_ring_buffer_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; diff --git a/lttng-events.c b/lttng-events.c index dfd112ab..5be4c9b8 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -77,7 +77,8 @@ int _lttng_field_statedump(struct lttng_session *session, void synchronize_trace(void) { -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0) || \ + LTTNG_RHEL_KERNEL_RANGE(4,18,0,193,0,0, 4,19,0,0,0,0)) synchronize_rcu(); #else synchronize_sched(); diff --git a/wrapper/vmalloc.h b/wrapper/vmalloc.h index d65a8e9c..6e0efd24 100644 --- a/wrapper/vmalloc.h +++ b/wrapper/vmalloc.h @@ -39,10 +39,11 @@ void wrapper_vmalloc_sync_mappings(void) || LTTNG_KERNEL_RANGE(4,19,113, 4,20,0) \ || LTTNG_KERNEL_RANGE(4,14,175, 4,15,0) \ || LTTNG_KERNEL_RANGE(4,9,218, 4,10,0) \ - || LTTNG_KERNEL_RANGE(4,4,218, 4,5,0)) \ + || LTTNG_KERNEL_RANGE(4,4,218, 4,5,0) \ || LTTNG_UBUNTU_KERNEL_RANGE(4,15,18,97, 4,16,0,0) \ || LTTNG_UBUNTU_KERNEL_RANGE(5,0,21,48, 5,1,0,0) \ - || LTTNG_UBUNTU_KERNEL_RANGE(5,3,18,52, 5,4,0,0) + || LTTNG_UBUNTU_KERNEL_RANGE(5,3,18,52, 5,4,0,0) \ + || LTTNG_RHEL_KERNEL_RANGE(4,18,0,240,0,0, 4,19,0,0,0,0)) static inline void wrapper_vmalloc_sync_mappings(void)