Fix compilation of ext4 and btrfs tracepoints on 2.6.40 kernels
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 10 Jan 2013 23:12:27 +0000 (18:12 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 10 Jan 2013 23:12:27 +0000 (18:12 -0500)
See f95480cf62e9acb42b74fce162544694b76c9704.

The new btrfs and ext4 tracepoints used 3.0.0 in the compilation logic.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/btrfs.h
instrumentation/events/lttng-module/ext4.h

index b0ff3c67e8fa6a02eff678b32d7077b0994c7add..c01a6e0b9a357f01c5ddd4d4e2c6530d83e2675d 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"     },      \
@@ -166,7 +166,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"     },              \
index 661a5a93765f02ddf011cefc3fdf024caca4fddd..4bc428543a8a36e25327b69f1020cb0f84d4ee47 100644 (file)
@@ -305,7 +305,7 @@ DEFINE_EVENT(ext4__write_end, ext4_da_write_end,
        TP_ARGS(inode, pos, len, copied)
 )
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40))
 TRACE_EVENT(ext4_writepage,
        TP_PROTO(struct inode *inode, struct page *page),
 
@@ -581,7 +581,7 @@ DECLARE_EVENT_CLASS(ext4__page_op,
                  (unsigned long) __entry->index)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
 DEFINE_EVENT(ext4__page_op, ext4_writepage,
 
        TP_PROTO(struct page *page),
@@ -702,7 +702,7 @@ DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa,
 
 TRACE_EVENT(ext4_mb_release_inode_pa,
        TP_PROTO(
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40))
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
                 struct super_block *sb,
                 struct inode *inode,
@@ -716,7 +716,7 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
                 struct ext4_prealloc_space *pa,
                 unsigned long long block, unsigned int count),
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
        TP_ARGS(pa, block, count),
 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
        TP_ARGS(sb, inode, pa, block, count),
@@ -735,7 +735,7 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
        ),
 
        TP_fast_assign(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
                tp_assign(dev, pa->pa_inode->i_sb->s_dev)
                tp_assign(ino, pa->pa_inode->i_ino)
 #else
@@ -762,7 +762,7 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
 
 TRACE_EVENT(ext4_mb_release_group_pa,
 
-#if (LTTNG_KERNEL_RANGE(3,0,0, 3,3,0))
+#if (LTTNG_KERNEL_RANGE(2,6,40, 3,3,0))
        TP_PROTO(struct ext4_prealloc_space *pa),
 
        TP_ARGS(pa),
@@ -794,7 +794,7 @@ TRACE_EVENT(ext4_mb_release_group_pa,
        ),
 
        TP_fast_assign(
-#if (LTTNG_KERNEL_RANGE(3,0,0, 3,3,0))
+#if (LTTNG_KERNEL_RANGE(2,6,40, 3,3,0))
                tp_assign(dev, pa->pa_inode->i_sb->s_dev)
 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
                tp_assign(dev, sb->s_dev)
This page took 0.028949 seconds and 4 git commands to generate.