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.13.0-rc2~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=57acf405913f8c4d8ac7d57943805b1aaeb51daa;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/include/instrumentation/events/rpc.h b/include/instrumentation/events/rpc.h index 97b30263..9c8c3218 100644 --- a/include/instrumentation/events/rpc.h +++ b/include/instrumentation/events/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/include/instrumentation/events/timer.h b/include/instrumentation/events/timer.h index 62d307d5..91a2cd93 100644 --- a/include/instrumentation/events/timer.h +++ b/include/instrumentation/events/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/include/instrumentation/events/writeback.h b/include/instrumentation/events/writeback.h index 99aafde4..b5fbda9e 100644 --- a/include/instrumentation/events/writeback.h +++ b/include/instrumentation/events/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/include/wrapper/vmalloc.h b/include/wrapper/vmalloc.h index 13252372..e6dc8c1e 100644 --- a/include/wrapper/vmalloc.h +++ b/include/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) diff --git a/src/lib/ringbuffer/ring_buffer_mmap.c b/src/lib/ringbuffer/ring_buffer_mmap.c index 392157a0..25e2d8d5 100644 --- a/src/lib/ringbuffer/ring_buffer_mmap.c +++ b/src/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/src/lttng-events.c b/src/lttng-events.c index af20bfcc..e785fe4d 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -93,7 +93,8 @@ int _lttng_field_statedump(struct lttng_kernel_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();