Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
[sfrench/cifs-2.6.git] / include / trace / events / ext4.h
index f4c62d330774c817a8c9fa25d83dc43356c68651..d0b6cd3afb2fb443d5bd4220f94b5bb698131ea9 100644 (file)
@@ -90,7 +90,7 @@ TRACE_EVENT(ext4_allocate_inode,
                  (unsigned long) __entry->dir, __entry->mode)
 );
 
                  (unsigned long) __entry->dir, __entry->mode)
 );
 
-TRACE_EVENT(ext4_write_begin,
+DECLARE_EVENT_CLASS(ext4__write_begin,
 
        TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
                 unsigned int flags),
 
        TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
                 unsigned int flags),
@@ -118,7 +118,23 @@ TRACE_EVENT(ext4_write_begin,
                  __entry->pos, __entry->len, __entry->flags)
 );
 
                  __entry->pos, __entry->len, __entry->flags)
 );
 
-TRACE_EVENT(ext4_ordered_write_end,
+DEFINE_EVENT(ext4__write_begin, ext4_write_begin,
+
+       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
+                unsigned int flags),
+
+       TP_ARGS(inode, pos, len, flags)
+);
+
+DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin,
+
+       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
+                unsigned int flags),
+
+       TP_ARGS(inode, pos, len, flags)
+);
+
+DECLARE_EVENT_CLASS(ext4__write_end,
        TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
                        unsigned int copied),
 
        TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
                        unsigned int copied),
 
@@ -145,57 +161,36 @@ TRACE_EVENT(ext4_ordered_write_end,
                  __entry->pos, __entry->len, __entry->copied)
 );
 
                  __entry->pos, __entry->len, __entry->copied)
 );
 
-TRACE_EVENT(ext4_writeback_write_end,
+DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end,
+
        TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
                 unsigned int copied),
 
        TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
                 unsigned int copied),
 
-       TP_ARGS(inode, pos, len, copied),
+       TP_ARGS(inode, pos, len, copied)
+);
 
 
-       TP_STRUCT__entry(
-               __field(        dev_t,  dev                     )
-               __field(        ino_t,  ino                     )
-               __field(        loff_t, pos                     )
-               __field(        unsigned int, len               )
-               __field(        unsigned int, copied            )
-       ),
+DEFINE_EVENT(ext4__write_end, ext4_writeback_write_end,
 
 
-       TP_fast_assign(
-               __entry->dev    = inode->i_sb->s_dev;
-               __entry->ino    = inode->i_ino;
-               __entry->pos    = pos;
-               __entry->len    = len;
-               __entry->copied = copied;
-       ),
+       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
+                unsigned int copied),
 
 
-       TP_printk("dev %s ino %lu pos %llu len %u copied %u",
-                 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
-                 __entry->pos, __entry->len, __entry->copied)
+       TP_ARGS(inode, pos, len, copied)
 );
 
 );
 
-TRACE_EVENT(ext4_journalled_write_end,
+DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end,
+
        TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
                 unsigned int copied),
        TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
                 unsigned int copied),
-       TP_ARGS(inode, pos, len, copied),
 
 
-       TP_STRUCT__entry(
-               __field(        dev_t,  dev                     )
-               __field(        ino_t,  ino                     )
-               __field(        loff_t, pos                     )
-               __field(        unsigned int, len               )
-               __field(        unsigned int, copied            )
-       ),
+       TP_ARGS(inode, pos, len, copied)
+);
 
 
-       TP_fast_assign(
-               __entry->dev    = inode->i_sb->s_dev;
-               __entry->ino    = inode->i_ino;
-               __entry->pos    = pos;
-               __entry->len    = len;
-               __entry->copied = copied;
-       ),
+DEFINE_EVENT(ext4__write_end, ext4_da_write_end,
 
 
-       TP_printk("dev %s ino %lu pos %llu len %u copied %u",
-                 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
-                 __entry->pos, __entry->len, __entry->copied)
+       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
+                unsigned int copied),
+
+       TP_ARGS(inode, pos, len, copied)
 );
 
 TRACE_EVENT(ext4_writepage,
 );
 
 TRACE_EVENT(ext4_writepage,
@@ -335,60 +330,6 @@ TRACE_EVENT(ext4_da_writepages_result,
                  (unsigned long) __entry->writeback_index)
 );
 
                  (unsigned long) __entry->writeback_index)
 );
 
-TRACE_EVENT(ext4_da_write_begin,
-       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
-                       unsigned int flags),
-
-       TP_ARGS(inode, pos, len, flags),
-
-       TP_STRUCT__entry(
-               __field(        dev_t,  dev                     )
-               __field(        ino_t,  ino                     )
-               __field(        loff_t, pos                     )
-               __field(        unsigned int, len               )
-               __field(        unsigned int, flags             )
-       ),
-
-       TP_fast_assign(
-               __entry->dev    = inode->i_sb->s_dev;
-               __entry->ino    = inode->i_ino;
-               __entry->pos    = pos;
-               __entry->len    = len;
-               __entry->flags  = flags;
-       ),
-
-       TP_printk("dev %s ino %lu pos %llu len %u flags %u",
-                 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
-                 __entry->pos, __entry->len, __entry->flags)
-);
-
-TRACE_EVENT(ext4_da_write_end,
-       TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
-                       unsigned int copied),
-
-       TP_ARGS(inode, pos, len, copied),
-
-       TP_STRUCT__entry(
-               __field(        dev_t,  dev                     )
-               __field(        ino_t,  ino                     )
-               __field(        loff_t, pos                     )
-               __field(        unsigned int, len               )
-               __field(        unsigned int, copied            )
-       ),
-
-       TP_fast_assign(
-               __entry->dev    = inode->i_sb->s_dev;
-               __entry->ino    = inode->i_ino;
-               __entry->pos    = pos;
-               __entry->len    = len;
-               __entry->copied = copied;
-       ),
-
-       TP_printk("dev %s ino %lu pos %llu len %u copied %u",
-                 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
-                 __entry->pos, __entry->len, __entry->copied)
-);
-
 TRACE_EVENT(ext4_discard_blocks,
        TP_PROTO(struct super_block *sb, unsigned long long blk,
                        unsigned long long count),
 TRACE_EVENT(ext4_discard_blocks,
        TP_PROTO(struct super_block *sb, unsigned long long blk,
                        unsigned long long count),