From: Michael Jeanson Date: Thu, 9 Aug 2018 15:56:56 +0000 (-0400) Subject: Fix: adjust SLE version ranges to build with SP2 and SP3 X-Git-Tag: v2.9.10~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b708215d85803a86e5992aa88b8b15d38bfdaeb2;p=lttng-modules.git Fix: adjust SLE version ranges to build with SP2 and SP3 The early kernel versions of SuSE 12 SP3 overlap with the range from the later SP2 kernels but are from a different source trees. This patch adds specific ranges for the SP3 kernels that overlap and allows compatibility with both SP2 and SP3 kernels. Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h index 9fd297be..07c35043 100644 --- a/instrumentation/events/lttng-module/block.h +++ b/instrumentation/events/lttng-module/block.h @@ -34,7 +34,13 @@ enum { #endif /* _TRACE_BLOCK_DEF_ */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0) || \ - LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,103,92,0,0)) + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0)) #define lttng_req_op(rq) req_op(rq) #define lttng_req_rw(rq) ((rq)->cmd_flags) diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h index 401f1dd1..4dfbf5b3 100644 --- a/instrumentation/events/lttng-module/btrfs.h +++ b/instrumentation/events/lttng-module/btrfs.h @@ -33,6 +33,9 @@ struct extent_state; #define BTRFS_UUID_SIZE 16 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit, @@ -229,7 +232,10 @@ LTTNG_TRACEPOINT_EVENT(btrfs_get_extent, ) ) -#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) +#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(btrfs_get_extent, @@ -316,7 +322,10 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent, BTRFS_I(inode)->root->root_key.objectid) ) ) -#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) +#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent, TP_PROTO(const struct inode *inode, const struct btrfs_ordered_extent *ordered), @@ -361,6 +370,9 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent, #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add, @@ -563,7 +575,13 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_file, #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \ - LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0)) + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, TP_PROTO(const struct btrfs_fs_info *fs_info, int wait), @@ -599,6 +617,9 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group, @@ -770,7 +791,14 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, ) #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \ - LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0)) + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0)) + LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, TP_PROTO(const struct btrfs_fs_info *fs_info, @@ -862,7 +890,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, TP_ARGS(fs_info, ref, head_ref, action) ) -#elif (LTTNG_SLE_KERNEL_RANGE(4,4,114,92,0,0, 4,5,0,0,0,0)) +#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, TP_PROTO(const struct btrfs_delayed_ref_node *ref, @@ -1036,7 +1064,10 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, TP_ARGS(info, map, offset, size) ) -#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) +#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, @@ -1109,6 +1140,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(btrfs_cow_block, @@ -1146,6 +1180,9 @@ LTTNG_TRACEPOINT_EVENT(btrfs_cow_block, #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation, @@ -1236,7 +1273,10 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f TP_ARGS(info, start, len) ) -#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) +#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, @@ -1451,7 +1491,10 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus TP_ARGS(info, block_group, start, len) ) -#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) +#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, @@ -1562,6 +1605,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster, @@ -1655,6 +1701,9 @@ LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster, #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state, diff --git a/instrumentation/events/lttng-module/kvm.h b/instrumentation/events/lttng-module/kvm.h index 9bb08c55..887fe6fe 100644 --- a/instrumentation/events/lttng-module/kvm.h +++ b/instrumentation/events/lttng-module/kvm.h @@ -84,7 +84,22 @@ LTTNG_TRACEPOINT_EVENT(kvm_ack_irq, { KVM_TRACE_MMIO_READ, "read" }, \ { KVM_TRACE_MMIO_WRITE, "write" } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) \ + +#if (LTTNG_SLE_KERNEL_RANGE(4,4,131,94,0,0, 4,5,0,0,0,0)) + +LTTNG_TRACEPOINT_EVENT(kvm_mmio, + TP_PROTO(int type, int len, u64 gpa, u64 val), + TP_ARGS(type, len, gpa, val), + + TP_FIELDS( + ctf_integer(u32, type, type) + ctf_integer(u32, len, len) + ctf_integer(u64, gpa, gpa) + ctf_integer(u64, val, val) + ) +) + +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) \ || LTTNG_KERNEL_RANGE(4,14,14, 4,15,0) \ || LTTNG_DEBIAN_KERNEL_RANGE(4,14,13,0,1,0, 4,15,0,0,0,0) \ || LTTNG_KERNEL_RANGE(4,9,77, 4,10,0) \