Fix: warning kvm_trace_exit_reason redefined for 3.9 kernel
[lttng-modules.git] / instrumentation / events / lttng-module / btrfs.h
index b0ff3c67e8fa6a02eff678b32d7077b0994c7add..6fb0620da0061d0bd26fcb8ddc3ebdd1530545ac 100644 (file)
@@ -39,7 +39,7 @@ struct extent_state;
                { BTRFS_SHARED_BLOCK_REF_KEY,   "SHARED_BLOCK_REF" },   \
                { BTRFS_SHARED_DATA_REF_KEY,    "SHARED_DATA_REF" })
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
 #define __show_root_type(obj)                                          \
        __print_symbolic_u64(obj,                                       \
                { BTRFS_ROOT_TREE_OBJECTID,     "ROOT_TREE"     },      \
@@ -67,9 +67,16 @@ struct extent_state;
                { BTRFS_DATA_RELOC_TREE_OBJECTID, "DATA_RELOC_TREE" })
 #endif
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#define show_root_type(obj)                                            \
+       obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) ||                \
+             (obj >= BTRFS_ROOT_TREE_OBJECTID &&                       \
+              obj <= BTRFS_CSUM_TREE_OBJECTID)) ? __show_root_type(obj) : "-"
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
 #define show_root_type(obj)                                            \
        obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) ||                \
              (obj <= BTRFS_CSUM_TREE_OBJECTID )) ? __show_root_type(obj) : "-"
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
 
@@ -166,7 +173,7 @@ DEFINE_EVENT(btrfs__inode, btrfs_inode_evict,
        TP_ARGS(inode)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
 #define __show_map_type(type)                                          \
        __print_symbolic_u64(type,                                      \
                { EXTENT_MAP_LAST_BYTE, "LAST_BYTE"     },              \
@@ -792,7 +799,9 @@ DEFINE_EVENT(btrfs__reserved_extent,  btrfs_reserved_extent_free,
 )
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
-TRACE_EVENT(find_free_extent,
+TRACE_EVENT_MAP(find_free_extent,
+
+       btrfs_find_free_extent,
 
        TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
                 u64 data),
@@ -956,7 +965,9 @@ TRACE_EVENT(btrfs_setup_cluster,
 #endif
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
-TRACE_EVENT(alloc_extent_state,
+TRACE_EVENT_MAP(alloc_extent_state,
+
+       btrfs_alloc_extent_state,
 
        TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP),
 
@@ -978,7 +989,9 @@ TRACE_EVENT(alloc_extent_state,
                  show_gfp_flags(__entry->mask), (void *)__entry->ip)
 )
 
-TRACE_EVENT(free_extent_state,
+TRACE_EVENT_MAP(free_extent_state,
+
+       btrfs_free_extent_state,
 
        TP_PROTO(struct extent_state *state, unsigned long IP),
 
This page took 0.031881 seconds and 4 git commands to generate.