2009-06-17 15:48:11 +00:00
|
|
|
#undef TRACE_SYSTEM
|
|
|
|
#define TRACE_SYSTEM ext4
|
|
|
|
|
2009-07-13 02:33:21 +00:00
|
|
|
#if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
|
|
#define _TRACE_EXT4_H
|
|
|
|
|
2009-06-17 15:48:11 +00:00
|
|
|
#include <linux/writeback.h>
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
|
2009-09-15 02:59:50 +00:00
|
|
|
struct ext4_allocation_context;
|
|
|
|
struct ext4_allocation_request;
|
|
|
|
struct ext4_prealloc_space;
|
2009-09-16 23:30:40 +00:00
|
|
|
struct ext4_inode_info;
|
2009-09-30 04:51:22 +00:00
|
|
|
struct mpage_da_data;
|
2009-09-16 23:30:40 +00:00
|
|
|
|
|
|
|
#define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
|
2009-09-15 02:59:50 +00:00
|
|
|
|
2009-06-17 15:48:11 +00:00
|
|
|
TRACE_EVENT(ext4_free_inode,
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( umode_t, mode )
|
|
|
|
__field( uid_t, uid )
|
|
|
|
__field( gid_t, gid )
|
2011-06-06 13:51:52 +00:00
|
|
|
__field( __u64, blocks )
|
2009-06-17 15:48:11 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->mode = inode->i_mode;
|
|
|
|
__entry->uid = inode->i_uid;
|
|
|
|
__entry->gid = inode->i_gid;
|
|
|
|
__entry->blocks = inode->i_blocks;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2011-06-06 13:51:52 +00:00
|
|
|
(unsigned long) __entry->ino, __entry->mode,
|
|
|
|
__entry->uid, __entry->gid, __entry->blocks)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_request_inode,
|
|
|
|
TP_PROTO(struct inode *dir, int mode),
|
|
|
|
|
|
|
|
TP_ARGS(dir, mode),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, dir )
|
|
|
|
__field( umode_t, mode )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = dir->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->dir = dir->i_ino;
|
|
|
|
__entry->mode = mode;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d dir %lu mode 0%o",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->dir, __entry->mode)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_allocate_inode,
|
|
|
|
TP_PROTO(struct inode *inode, struct inode *dir, int mode),
|
|
|
|
|
|
|
|
TP_ARGS(inode, dir, mode),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( ino_t, dir )
|
|
|
|
__field( umode_t, mode )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->dir = dir->i_ino;
|
|
|
|
__entry->mode = mode;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->ino,
|
2009-09-17 12:50:18 +00:00
|
|
|
(unsigned long) __entry->dir, __entry->mode)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
2010-11-08 18:51:33 +00:00
|
|
|
TRACE_EVENT(ext4_evict_inode,
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2010-11-08 18:51:33 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( int, nlink )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2010-11-08 18:51:33 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->nlink = inode->i_nlink;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev %d,%d ino %lu nlink %d",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-11-08 18:51:33 +00:00
|
|
|
(unsigned long) __entry->ino, __entry->nlink)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_drop_inode,
|
|
|
|
TP_PROTO(struct inode *inode, int drop),
|
|
|
|
|
|
|
|
TP_ARGS(inode, drop),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2010-11-08 18:51:33 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( int, drop )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2010-11-08 18:51:33 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->drop = drop;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev %d,%d ino %lu drop %d",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-11-08 18:51:33 +00:00
|
|
|
(unsigned long) __entry->ino, __entry->drop)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_mark_inode_dirty,
|
|
|
|
TP_PROTO(struct inode *inode, unsigned long IP),
|
|
|
|
|
|
|
|
TP_ARGS(inode, IP),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2010-11-08 18:51:33 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field(unsigned long, ip )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2010-11-08 18:51:33 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->ip = IP;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev %d,%d ino %lu caller %pF",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-11-08 18:51:33 +00:00
|
|
|
(unsigned long) __entry->ino, (void *)__entry->ip)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_begin_ordered_truncate,
|
|
|
|
TP_PROTO(struct inode *inode, loff_t new_size),
|
|
|
|
|
|
|
|
TP_ARGS(inode, new_size),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2010-11-08 18:51:33 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( loff_t, new_size )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2010-11-08 18:51:33 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->new_size = new_size;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev %d,%d ino %lu new_size %lld",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-11-08 18:51:33 +00:00
|
|
|
(unsigned long) __entry->ino,
|
2011-06-06 13:51:52 +00:00
|
|
|
__entry->new_size)
|
2010-11-08 18:51:33 +00:00
|
|
|
);
|
|
|
|
|
2009-11-26 07:07:36 +00:00
|
|
|
DECLARE_EVENT_CLASS(ext4__write_begin,
|
2009-06-17 15:48:11 +00:00
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
|
|
|
unsigned int flags),
|
|
|
|
|
|
|
|
TP_ARGS(inode, pos, len, flags),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( loff_t, pos )
|
|
|
|
__field( unsigned int, len )
|
|
|
|
__field( unsigned int, flags )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pos = pos;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->flags = flags;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu pos %lld len %u flags %u",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->ino,
|
2009-09-17 12:50:18 +00:00
|
|
|
__entry->pos, __entry->len, __entry->flags)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
2009-11-26 07:07:36 +00:00
|
|
|
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,
|
2009-06-17 15:48:11 +00:00
|
|
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
|
|
|
unsigned int copied),
|
|
|
|
|
|
|
|
TP_ARGS(inode, pos, len, copied),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( loff_t, pos )
|
|
|
|
__field( unsigned int, len )
|
|
|
|
__field( unsigned int, copied )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pos = pos;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->copied = copied;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu pos %lld len %u copied %u",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
|
|
|
__entry->pos, __entry->len, __entry->copied)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
2009-11-26 07:07:36 +00:00
|
|
|
DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end,
|
|
|
|
|
2009-06-17 15:48:11 +00:00
|
|
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
|
|
|
unsigned int copied),
|
|
|
|
|
2009-11-26 07:07:36 +00:00
|
|
|
TP_ARGS(inode, pos, len, copied)
|
|
|
|
);
|
2009-06-17 15:48:11 +00:00
|
|
|
|
2009-11-26 07:07:36 +00:00
|
|
|
DEFINE_EVENT(ext4__write_end, ext4_writeback_write_end,
|
2009-06-17 15:48:11 +00:00
|
|
|
|
2009-11-26 07:07:36 +00:00
|
|
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
|
|
|
unsigned int copied),
|
2009-06-17 15:48:11 +00:00
|
|
|
|
2009-11-26 07:07:36 +00:00
|
|
|
TP_ARGS(inode, pos, len, copied)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
2009-11-26 07:07:36 +00:00
|
|
|
DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end,
|
|
|
|
|
2009-06-17 15:48:11 +00:00
|
|
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
|
|
|
unsigned int copied),
|
|
|
|
|
2009-11-26 07:07:36 +00:00
|
|
|
TP_ARGS(inode, pos, len, copied)
|
|
|
|
);
|
2009-06-17 15:48:11 +00:00
|
|
|
|
2009-11-26 07:07:36 +00:00
|
|
|
DEFINE_EVENT(ext4__write_end, ext4_da_write_end,
|
2009-06-17 15:48:11 +00:00
|
|
|
|
2009-11-26 07:07:36 +00:00
|
|
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
|
|
|
unsigned int copied),
|
|
|
|
|
|
|
|
TP_ARGS(inode, pos, len, copied)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_da_writepages,
|
|
|
|
TP_PROTO(struct inode *inode, struct writeback_control *wbc),
|
|
|
|
|
|
|
|
TP_ARGS(inode, wbc),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( long, nr_to_write )
|
|
|
|
__field( long, pages_skipped )
|
|
|
|
__field( loff_t, range_start )
|
|
|
|
__field( loff_t, range_end )
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( int, sync_mode )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( char, for_kupdate )
|
|
|
|
__field( char, range_cyclic )
|
2009-09-29 17:31:31 +00:00
|
|
|
__field( pgoff_t, writeback_index )
|
2009-06-17 15:48:11 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->nr_to_write = wbc->nr_to_write;
|
|
|
|
__entry->pages_skipped = wbc->pages_skipped;
|
|
|
|
__entry->range_start = wbc->range_start;
|
|
|
|
__entry->range_end = wbc->range_end;
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->sync_mode = wbc->sync_mode;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->for_kupdate = wbc->for_kupdate;
|
|
|
|
__entry->range_cyclic = wbc->range_cyclic;
|
2009-09-29 17:31:31 +00:00
|
|
|
__entry->writeback_index = inode->i_mapping->writeback_index;
|
2009-06-17 15:48:11 +00:00
|
|
|
),
|
|
|
|
|
2010-10-28 03:44:47 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
|
2011-06-06 13:51:52 +00:00
|
|
|
"range_start %lld range_end %lld sync_mode %d"
|
2011-03-22 01:38:05 +00:00
|
|
|
"for_kupdate %d range_cyclic %d writeback_index %lu",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2009-09-17 12:50:18 +00:00
|
|
|
(unsigned long) __entry->ino, __entry->nr_to_write,
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->pages_skipped, __entry->range_start,
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->range_end, __entry->sync_mode,
|
|
|
|
__entry->for_kupdate, __entry->range_cyclic,
|
2009-09-29 17:31:31 +00:00
|
|
|
(unsigned long) __entry->writeback_index)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
2009-09-01 03:13:11 +00:00
|
|
|
TRACE_EVENT(ext4_da_write_pages,
|
|
|
|
TP_PROTO(struct inode *inode, struct mpage_da_data *mpd),
|
|
|
|
|
|
|
|
TP_ARGS(inode, mpd),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-09-01 03:13:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( __u64, b_blocknr )
|
|
|
|
__field( __u32, b_size )
|
|
|
|
__field( __u32, b_state )
|
|
|
|
__field( unsigned long, first_page )
|
|
|
|
__field( int, io_done )
|
|
|
|
__field( int, pages_written )
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( int, sync_mode )
|
2009-09-01 03:13:11 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2009-09-01 03:13:11 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->b_blocknr = mpd->b_blocknr;
|
|
|
|
__entry->b_size = mpd->b_size;
|
|
|
|
__entry->b_state = mpd->b_state;
|
|
|
|
__entry->first_page = mpd->first_page;
|
|
|
|
__entry->io_done = mpd->io_done;
|
|
|
|
__entry->pages_written = mpd->pages_written;
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->sync_mode = mpd->wbc->sync_mode;
|
2009-09-01 03:13:11 +00:00
|
|
|
),
|
|
|
|
|
2011-03-22 01:38:05 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x "
|
|
|
|
"first_page %lu io_done %d pages_written %d sync_mode %d",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->ino,
|
2009-09-01 03:13:11 +00:00
|
|
|
__entry->b_blocknr, __entry->b_size,
|
|
|
|
__entry->b_state, __entry->first_page,
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->io_done, __entry->pages_written,
|
|
|
|
__entry->sync_mode
|
|
|
|
)
|
2009-09-01 03:13:11 +00:00
|
|
|
);
|
|
|
|
|
2009-06-17 15:48:11 +00:00
|
|
|
TRACE_EVENT(ext4_da_writepages_result,
|
|
|
|
TP_PROTO(struct inode *inode, struct writeback_control *wbc,
|
|
|
|
int ret, int pages_written),
|
|
|
|
|
|
|
|
TP_ARGS(inode, wbc, ret, pages_written),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( int, ret )
|
|
|
|
__field( int, pages_written )
|
|
|
|
__field( long, pages_skipped )
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( int, sync_mode )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( char, more_io )
|
2009-09-29 17:31:31 +00:00
|
|
|
__field( pgoff_t, writeback_index )
|
2009-06-17 15:48:11 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->ret = ret;
|
|
|
|
__entry->pages_written = pages_written;
|
|
|
|
__entry->pages_skipped = wbc->pages_skipped;
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->sync_mode = wbc->sync_mode;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->more_io = wbc->more_io;
|
2009-09-29 17:31:31 +00:00
|
|
|
__entry->writeback_index = inode->i_mapping->writeback_index;
|
2009-06-17 15:48:11 +00:00
|
|
|
),
|
|
|
|
|
2011-03-22 01:38:05 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
|
|
|
|
" more_io %d sync_mode %d writeback_index %lu",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2009-09-17 12:50:18 +00:00
|
|
|
(unsigned long) __entry->ino, __entry->ret,
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->pages_written, __entry->pages_skipped,
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->more_io, __entry->sync_mode,
|
2009-09-29 17:31:31 +00:00
|
|
|
(unsigned long) __entry->writeback_index)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
2011-03-22 01:38:05 +00:00
|
|
|
DECLARE_EVENT_CLASS(ext4__page_op,
|
|
|
|
TP_PROTO(struct page *page),
|
|
|
|
|
|
|
|
TP_ARGS(page),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( pgoff_t, index )
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->index = page->index;
|
|
|
|
__entry->ino = page->mapping->host->i_ino;
|
|
|
|
__entry->dev = page->mapping->host->i_sb->s_dev;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev %d,%d ino %lu page_index %lu",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
2011-06-06 13:51:52 +00:00
|
|
|
(unsigned long) __entry->index)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__page_op, ext4_writepage,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page),
|
|
|
|
|
|
|
|
TP_ARGS(page)
|
2011-03-22 01:38:05 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__page_op, ext4_readpage,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page),
|
|
|
|
|
|
|
|
TP_ARGS(page)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__page_op, ext4_releasepage,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page),
|
|
|
|
|
|
|
|
TP_ARGS(page)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_invalidatepage,
|
|
|
|
TP_PROTO(struct page *page, unsigned long offset),
|
|
|
|
|
|
|
|
TP_ARGS(page, offset),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( pgoff_t, index )
|
|
|
|
__field( unsigned long, offset )
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->index = page->index;
|
|
|
|
__entry->offset = offset;
|
|
|
|
__entry->ino = page->mapping->host->i_ino;
|
|
|
|
__entry->dev = page->mapping->host->i_sb->s_dev;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev %d,%d ino %lu page_index %lu offset %lu",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
2011-06-06 13:51:52 +00:00
|
|
|
(unsigned long) __entry->index, __entry->offset)
|
2011-03-22 01:38:05 +00:00
|
|
|
);
|
|
|
|
|
2009-06-17 15:48:11 +00:00
|
|
|
TRACE_EVENT(ext4_discard_blocks,
|
|
|
|
TP_PROTO(struct super_block *sb, unsigned long long blk,
|
|
|
|
unsigned long long count),
|
|
|
|
|
|
|
|
TP_ARGS(sb, blk, count),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( __u64, blk )
|
|
|
|
__field( __u64, count )
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->blk = blk;
|
|
|
|
__entry->count = count;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d blk %llu count %llu",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
__entry->blk, __entry->count)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
2010-05-17 08:00:00 +00:00
|
|
|
DECLARE_EVENT_CLASS(ext4__mb_new_pa,
|
2009-06-17 15:48:11 +00:00
|
|
|
TP_PROTO(struct ext4_allocation_context *ac,
|
|
|
|
struct ext4_prealloc_space *pa),
|
|
|
|
|
|
|
|
TP_ARGS(ac, pa),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( __u64, pa_pstart )
|
|
|
|
__field( __u32, pa_len )
|
|
|
|
__field( __u64, pa_lstart )
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = ac->ac_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->ino = ac->ac_inode->i_ino;
|
|
|
|
__entry->pa_pstart = pa->pa_pstart;
|
|
|
|
__entry->pa_len = pa->pa_len;
|
|
|
|
__entry->pa_lstart = pa->pa_lstart;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
|
|
|
__entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
2010-05-17 08:00:00 +00:00
|
|
|
DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa,
|
|
|
|
|
2009-06-17 15:48:11 +00:00
|
|
|
TP_PROTO(struct ext4_allocation_context *ac,
|
|
|
|
struct ext4_prealloc_space *pa),
|
|
|
|
|
2010-05-17 08:00:00 +00:00
|
|
|
TP_ARGS(ac, pa)
|
|
|
|
);
|
2009-06-17 15:48:11 +00:00
|
|
|
|
2010-05-17 08:00:00 +00:00
|
|
|
DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa,
|
2009-06-17 15:48:11 +00:00
|
|
|
|
2010-05-17 08:00:00 +00:00
|
|
|
TP_PROTO(struct ext4_allocation_context *ac,
|
|
|
|
struct ext4_prealloc_space *pa),
|
2009-06-17 15:48:11 +00:00
|
|
|
|
2010-05-17 08:00:00 +00:00
|
|
|
TP_ARGS(ac, pa)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_mb_release_inode_pa,
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_PROTO(struct ext4_prealloc_space *pa,
|
2009-06-17 15:48:11 +00:00
|
|
|
unsigned long long block, unsigned int count),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_ARGS(pa, block, count),
|
2009-06-17 15:48:11 +00:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( __u64, block )
|
|
|
|
__field( __u32, count )
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-06-06 13:51:52 +00:00
|
|
|
__entry->dev = pa->pa_inode->i_sb->s_dev;
|
|
|
|
__entry->ino = pa->pa_inode->i_ino;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->block = block;
|
|
|
|
__entry->count = count;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu block %llu count %u",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
|
|
|
__entry->block, __entry->count)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_mb_release_group_pa,
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_PROTO(struct ext4_prealloc_space *pa),
|
2009-06-17 15:48:11 +00:00
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_ARGS(pa),
|
2009-06-17 15:48:11 +00:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( __u64, pa_pstart )
|
|
|
|
__field( __u32, pa_len )
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-06-06 13:51:52 +00:00
|
|
|
__entry->dev = pa->pa_inode->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->pa_pstart = pa->pa_pstart;
|
|
|
|
__entry->pa_len = pa->pa_len;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d pstart %llu len %u",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
__entry->pa_pstart, __entry->pa_len)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_discard_preallocations,
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->ino)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_mb_discard_preallocations,
|
|
|
|
TP_PROTO(struct super_block *sb, int needed),
|
|
|
|
|
|
|
|
TP_ARGS(sb, needed),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( int, needed )
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->needed = needed;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d needed %d",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
__entry->needed)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_request_blocks,
|
|
|
|
TP_PROTO(struct ext4_allocation_request *ar),
|
|
|
|
|
|
|
|
TP_ARGS(ar),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( unsigned int, flags )
|
|
|
|
__field( unsigned int, len )
|
2011-06-06 13:51:52 +00:00
|
|
|
__field( __u32, logical )
|
|
|
|
__field( __u32, lleft )
|
|
|
|
__field( __u32, lright )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( __u64, goal )
|
|
|
|
__field( __u64, pleft )
|
|
|
|
__field( __u64, pright )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = ar->inode->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->ino = ar->inode->i_ino;
|
|
|
|
__entry->flags = ar->flags;
|
|
|
|
__entry->len = ar->len;
|
|
|
|
__entry->logical = ar->logical;
|
|
|
|
__entry->goal = ar->goal;
|
|
|
|
__entry->lleft = ar->lleft;
|
|
|
|
__entry->lright = ar->lright;
|
|
|
|
__entry->pleft = ar->pleft;
|
|
|
|
__entry->pright = ar->pright;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu flags %u len %u lblk %u goal %llu "
|
|
|
|
"lleft %u lright %u pleft %llu pright %llu ",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2011-06-06 13:51:52 +00:00
|
|
|
(unsigned long) __entry->ino, __entry->flags,
|
|
|
|
__entry->len, __entry->logical, __entry->goal,
|
|
|
|
__entry->lleft, __entry->lright, __entry->pleft,
|
|
|
|
__entry->pright)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_allocate_blocks,
|
|
|
|
TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block),
|
|
|
|
|
|
|
|
TP_ARGS(ar, block),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( __u64, block )
|
|
|
|
__field( unsigned int, flags )
|
|
|
|
__field( unsigned int, len )
|
2011-06-06 13:51:52 +00:00
|
|
|
__field( __u32, logical )
|
|
|
|
__field( __u32, lleft )
|
|
|
|
__field( __u32, lright )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( __u64, goal )
|
|
|
|
__field( __u64, pleft )
|
|
|
|
__field( __u64, pright )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = ar->inode->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->ino = ar->inode->i_ino;
|
|
|
|
__entry->block = block;
|
|
|
|
__entry->flags = ar->flags;
|
|
|
|
__entry->len = ar->len;
|
|
|
|
__entry->logical = ar->logical;
|
|
|
|
__entry->goal = ar->goal;
|
|
|
|
__entry->lleft = ar->lleft;
|
|
|
|
__entry->lright = ar->lright;
|
|
|
|
__entry->pleft = ar->pleft;
|
|
|
|
__entry->pright = ar->pright;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %u "
|
|
|
|
"goal %llu lleft %u lright %u pleft %llu pright %llu",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2011-06-06 13:51:52 +00:00
|
|
|
(unsigned long) __entry->ino, __entry->flags,
|
|
|
|
__entry->len, __entry->block, __entry->logical,
|
|
|
|
__entry->goal, __entry->lleft, __entry->lright,
|
|
|
|
__entry->pleft, __entry->pright)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_free_blocks,
|
|
|
|
TP_PROTO(struct inode *inode, __u64 block, unsigned long count,
|
2009-11-23 12:17:05 +00:00
|
|
|
int flags),
|
2009-06-17 15:48:11 +00:00
|
|
|
|
2009-11-23 12:17:05 +00:00
|
|
|
TP_ARGS(inode, block, count, flags),
|
2009-06-17 15:48:11 +00:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
2011-06-06 13:51:52 +00:00
|
|
|
__field( umode_t, mode )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( __u64, block )
|
|
|
|
__field( unsigned long, count )
|
2011-06-06 13:51:52 +00:00
|
|
|
__field( int, flags )
|
2009-06-17 15:48:11 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
2009-11-23 12:17:05 +00:00
|
|
|
__entry->mode = inode->i_mode;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->block = block;
|
|
|
|
__entry->count = count;
|
2009-11-23 12:17:05 +00:00
|
|
|
__entry->flags = flags;
|
2009-06-17 15:48:11 +00:00
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->ino,
|
2009-11-23 12:17:05 +00:00
|
|
|
__entry->mode, __entry->block, __entry->count,
|
|
|
|
__entry->flags)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
2011-03-22 01:38:05 +00:00
|
|
|
TRACE_EVENT(ext4_sync_file_enter,
|
2010-05-26 15:53:25 +00:00
|
|
|
TP_PROTO(struct file *file, int datasync),
|
2009-06-17 15:48:11 +00:00
|
|
|
|
2010-05-26 15:53:25 +00:00
|
|
|
TP_ARGS(file, datasync),
|
2009-06-17 15:48:11 +00:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( ino_t, parent )
|
|
|
|
__field( int, datasync )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2010-05-26 15:53:25 +00:00
|
|
|
struct dentry *dentry = file->f_path.dentry;
|
|
|
|
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = dentry->d_inode->i_sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->ino = dentry->d_inode->i_ino;
|
|
|
|
__entry->datasync = datasync;
|
|
|
|
__entry->parent = dentry->d_parent->d_inode->i_ino;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu parent %lu datasync %d ",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->ino,
|
2009-09-17 12:50:18 +00:00
|
|
|
(unsigned long) __entry->parent, __entry->datasync)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
2011-03-22 01:38:05 +00:00
|
|
|
TRACE_EVENT(ext4_sync_file_exit,
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( int, ret )
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->ret = ret;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu ret %d",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
2009-06-17 15:48:11 +00:00
|
|
|
TRACE_EVENT(ext4_sync_fs,
|
|
|
|
TP_PROTO(struct super_block *sb, int wait),
|
|
|
|
|
|
|
|
TP_ARGS(sb, wait),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-06-17 15:48:11 +00:00
|
|
|
__field( int, wait )
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = sb->s_dev;
|
2009-06-17 15:48:11 +00:00
|
|
|
__entry->wait = wait;
|
|
|
|
),
|
|
|
|
|
2011-03-22 01:38:05 +00:00
|
|
|
TP_printk("dev %d,%d wait %d",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
__entry->wait)
|
2009-06-17 15:48:11 +00:00
|
|
|
);
|
|
|
|
|
2009-09-16 23:30:40 +00:00
|
|
|
TRACE_EVENT(ext4_alloc_da_blocks,
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-09-16 23:30:40 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( unsigned int, data_blocks )
|
|
|
|
__field( unsigned int, meta_blocks )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2009-09-16 23:30:40 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
|
|
|
|
__entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->ino,
|
2009-09-16 23:30:40 +00:00
|
|
|
__entry->data_blocks, __entry->meta_blocks)
|
|
|
|
);
|
|
|
|
|
2009-09-30 04:32:42 +00:00
|
|
|
TRACE_EVENT(ext4_mballoc_alloc,
|
|
|
|
TP_PROTO(struct ext4_allocation_context *ac),
|
|
|
|
|
|
|
|
TP_ARGS(ac),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-09-30 04:32:42 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( __u16, found )
|
|
|
|
__field( __u16, groups )
|
|
|
|
__field( __u16, buddy )
|
|
|
|
__field( __u16, flags )
|
|
|
|
__field( __u16, tail )
|
|
|
|
__field( __u8, cr )
|
|
|
|
__field( __u32, orig_logical )
|
|
|
|
__field( int, orig_start )
|
|
|
|
__field( __u32, orig_group )
|
|
|
|
__field( int, orig_len )
|
|
|
|
__field( __u32, goal_logical )
|
|
|
|
__field( int, goal_start )
|
|
|
|
__field( __u32, goal_group )
|
|
|
|
__field( int, goal_len )
|
|
|
|
__field( __u32, result_logical )
|
|
|
|
__field( int, result_start )
|
|
|
|
__field( __u32, result_group )
|
|
|
|
__field( int, result_len )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = ac->ac_inode->i_sb->s_dev;
|
2009-09-30 04:32:42 +00:00
|
|
|
__entry->ino = ac->ac_inode->i_ino;
|
|
|
|
__entry->found = ac->ac_found;
|
|
|
|
__entry->flags = ac->ac_flags;
|
|
|
|
__entry->groups = ac->ac_groups_scanned;
|
|
|
|
__entry->buddy = ac->ac_buddy;
|
|
|
|
__entry->tail = ac->ac_tail;
|
|
|
|
__entry->cr = ac->ac_criteria;
|
|
|
|
__entry->orig_logical = ac->ac_o_ex.fe_logical;
|
|
|
|
__entry->orig_start = ac->ac_o_ex.fe_start;
|
|
|
|
__entry->orig_group = ac->ac_o_ex.fe_group;
|
|
|
|
__entry->orig_len = ac->ac_o_ex.fe_len;
|
|
|
|
__entry->goal_logical = ac->ac_g_ex.fe_logical;
|
|
|
|
__entry->goal_start = ac->ac_g_ex.fe_start;
|
|
|
|
__entry->goal_group = ac->ac_g_ex.fe_group;
|
|
|
|
__entry->goal_len = ac->ac_g_ex.fe_len;
|
|
|
|
__entry->result_logical = ac->ac_f_ex.fe_logical;
|
|
|
|
__entry->result_start = ac->ac_f_ex.fe_start;
|
|
|
|
__entry->result_group = ac->ac_f_ex.fe_group;
|
|
|
|
__entry->result_len = ac->ac_f_ex.fe_len;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
|
2009-09-30 04:32:42 +00:00
|
|
|
"result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x "
|
|
|
|
"tail %u broken %u",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->ino,
|
2009-09-30 04:32:42 +00:00
|
|
|
__entry->orig_group, __entry->orig_start,
|
|
|
|
__entry->orig_len, __entry->orig_logical,
|
|
|
|
__entry->goal_group, __entry->goal_start,
|
|
|
|
__entry->goal_len, __entry->goal_logical,
|
|
|
|
__entry->result_group, __entry->result_start,
|
|
|
|
__entry->result_len, __entry->result_logical,
|
|
|
|
__entry->found, __entry->groups, __entry->cr,
|
|
|
|
__entry->flags, __entry->tail,
|
|
|
|
__entry->buddy ? 1 << __entry->buddy : 0)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_mballoc_prealloc,
|
|
|
|
TP_PROTO(struct ext4_allocation_context *ac),
|
|
|
|
|
|
|
|
TP_ARGS(ac),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-09-30 04:32:42 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( __u32, orig_logical )
|
|
|
|
__field( int, orig_start )
|
|
|
|
__field( __u32, orig_group )
|
|
|
|
__field( int, orig_len )
|
|
|
|
__field( __u32, result_logical )
|
|
|
|
__field( int, result_start )
|
|
|
|
__field( __u32, result_group )
|
|
|
|
__field( int, result_len )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = ac->ac_inode->i_sb->s_dev;
|
2009-09-30 04:32:42 +00:00
|
|
|
__entry->ino = ac->ac_inode->i_ino;
|
|
|
|
__entry->orig_logical = ac->ac_o_ex.fe_logical;
|
|
|
|
__entry->orig_start = ac->ac_o_ex.fe_start;
|
|
|
|
__entry->orig_group = ac->ac_o_ex.fe_group;
|
|
|
|
__entry->orig_len = ac->ac_o_ex.fe_len;
|
|
|
|
__entry->result_logical = ac->ac_b_ex.fe_logical;
|
|
|
|
__entry->result_start = ac->ac_b_ex.fe_start;
|
|
|
|
__entry->result_group = ac->ac_b_ex.fe_group;
|
|
|
|
__entry->result_len = ac->ac_b_ex.fe_len;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->ino,
|
2009-09-30 04:32:42 +00:00
|
|
|
__entry->orig_group, __entry->orig_start,
|
|
|
|
__entry->orig_len, __entry->orig_logical,
|
|
|
|
__entry->result_group, __entry->result_start,
|
|
|
|
__entry->result_len, __entry->result_logical)
|
|
|
|
);
|
|
|
|
|
2010-05-17 08:00:00 +00:00
|
|
|
DECLARE_EVENT_CLASS(ext4__mballoc,
|
2010-10-28 01:30:07 +00:00
|
|
|
TP_PROTO(struct super_block *sb,
|
|
|
|
struct inode *inode,
|
|
|
|
ext4_group_t group,
|
|
|
|
ext4_grpblk_t start,
|
|
|
|
ext4_grpblk_t len),
|
2009-09-30 04:32:42 +00:00
|
|
|
|
2010-10-28 01:30:07 +00:00
|
|
|
TP_ARGS(sb, inode, group, start, len),
|
2009-09-30 04:32:42 +00:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-09-30 04:32:42 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( int, result_start )
|
|
|
|
__field( __u32, result_group )
|
|
|
|
__field( int, result_len )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = sb->s_dev;
|
2010-10-28 01:30:07 +00:00
|
|
|
__entry->ino = inode ? inode->i_ino : 0;
|
|
|
|
__entry->result_start = start;
|
|
|
|
__entry->result_group = group;
|
|
|
|
__entry->result_len = len;
|
2009-09-30 04:32:42 +00:00
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d inode %lu extent %u/%d/%d ",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->ino,
|
2009-09-30 04:32:42 +00:00
|
|
|
__entry->result_group, __entry->result_start,
|
2010-10-28 01:30:07 +00:00
|
|
|
__entry->result_len)
|
2009-09-30 04:32:42 +00:00
|
|
|
);
|
|
|
|
|
2010-05-17 08:00:00 +00:00
|
|
|
DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard,
|
|
|
|
|
2010-10-28 01:30:07 +00:00
|
|
|
TP_PROTO(struct super_block *sb,
|
|
|
|
struct inode *inode,
|
|
|
|
ext4_group_t group,
|
|
|
|
ext4_grpblk_t start,
|
|
|
|
ext4_grpblk_t len),
|
2009-09-30 04:32:42 +00:00
|
|
|
|
2010-10-28 01:30:07 +00:00
|
|
|
TP_ARGS(sb, inode, group, start, len)
|
2010-05-17 08:00:00 +00:00
|
|
|
);
|
2009-09-30 04:32:42 +00:00
|
|
|
|
2010-05-17 08:00:00 +00:00
|
|
|
DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free,
|
2009-09-30 04:32:42 +00:00
|
|
|
|
2010-10-28 01:30:07 +00:00
|
|
|
TP_PROTO(struct super_block *sb,
|
|
|
|
struct inode *inode,
|
|
|
|
ext4_group_t group,
|
|
|
|
ext4_grpblk_t start,
|
|
|
|
ext4_grpblk_t len),
|
2009-09-30 04:32:42 +00:00
|
|
|
|
2010-10-28 01:30:07 +00:00
|
|
|
TP_ARGS(sb, inode, group, start, len)
|
2009-09-30 04:32:42 +00:00
|
|
|
);
|
|
|
|
|
2009-11-23 12:25:08 +00:00
|
|
|
TRACE_EVENT(ext4_forget,
|
|
|
|
TP_PROTO(struct inode *inode, int is_metadata, __u64 block),
|
|
|
|
|
|
|
|
TP_ARGS(inode, is_metadata, block),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2009-11-23 12:25:08 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( umode_t, mode )
|
|
|
|
__field( int, is_metadata )
|
|
|
|
__field( __u64, block )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2009-11-23 12:25:08 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->mode = inode->i_mode;
|
|
|
|
__entry->is_metadata = is_metadata;
|
|
|
|
__entry->block = block;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
|
|
|
__entry->mode, __entry->is_metadata, __entry->block)
|
2009-11-23 12:25:08 +00:00
|
|
|
);
|
|
|
|
|
2010-01-01 06:00:21 +00:00
|
|
|
TRACE_EVENT(ext4_da_update_reserve_space,
|
|
|
|
TP_PROTO(struct inode *inode, int used_blocks),
|
|
|
|
|
|
|
|
TP_ARGS(inode, used_blocks),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2010-01-01 06:00:21 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( umode_t, mode )
|
|
|
|
__field( __u64, i_blocks )
|
|
|
|
__field( int, used_blocks )
|
|
|
|
__field( int, reserved_data_blocks )
|
|
|
|
__field( int, reserved_meta_blocks )
|
|
|
|
__field( int, allocated_meta_blocks )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2010-01-01 06:00:21 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->mode = inode->i_mode;
|
|
|
|
__entry->i_blocks = inode->i_blocks;
|
|
|
|
__entry->used_blocks = used_blocks;
|
|
|
|
__entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
|
|
|
|
__entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
|
|
|
|
__entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks;
|
|
|
|
),
|
|
|
|
|
2011-03-22 01:38:05 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d "
|
|
|
|
"reserved_data_blocks %d reserved_meta_blocks %d "
|
|
|
|
"allocated_meta_blocks %d",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
2011-06-06 13:51:52 +00:00
|
|
|
__entry->mode, __entry->i_blocks,
|
2010-01-01 06:00:21 +00:00
|
|
|
__entry->used_blocks, __entry->reserved_data_blocks,
|
|
|
|
__entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_da_reserve_space,
|
|
|
|
TP_PROTO(struct inode *inode, int md_needed),
|
|
|
|
|
|
|
|
TP_ARGS(inode, md_needed),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2010-01-01 06:00:21 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( umode_t, mode )
|
|
|
|
__field( __u64, i_blocks )
|
|
|
|
__field( int, md_needed )
|
|
|
|
__field( int, reserved_data_blocks )
|
|
|
|
__field( int, reserved_meta_blocks )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2010-01-01 06:00:21 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->mode = inode->i_mode;
|
|
|
|
__entry->i_blocks = inode->i_blocks;
|
|
|
|
__entry->md_needed = md_needed;
|
|
|
|
__entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
|
|
|
|
__entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
|
|
|
|
),
|
|
|
|
|
2011-03-22 01:38:05 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d "
|
|
|
|
"reserved_data_blocks %d reserved_meta_blocks %d",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->ino,
|
2011-06-06 13:51:52 +00:00
|
|
|
__entry->mode, __entry->i_blocks,
|
2010-01-01 06:00:21 +00:00
|
|
|
__entry->md_needed, __entry->reserved_data_blocks,
|
|
|
|
__entry->reserved_meta_blocks)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_da_release_space,
|
|
|
|
TP_PROTO(struct inode *inode, int freed_blocks),
|
|
|
|
|
|
|
|
TP_ARGS(inode, freed_blocks),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2010-01-01 06:00:21 +00:00
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( umode_t, mode )
|
|
|
|
__field( __u64, i_blocks )
|
|
|
|
__field( int, freed_blocks )
|
|
|
|
__field( int, reserved_data_blocks )
|
|
|
|
__field( int, reserved_meta_blocks )
|
|
|
|
__field( int, allocated_meta_blocks )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
2010-01-01 06:00:21 +00:00
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->mode = inode->i_mode;
|
|
|
|
__entry->i_blocks = inode->i_blocks;
|
|
|
|
__entry->freed_blocks = freed_blocks;
|
|
|
|
__entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
|
|
|
|
__entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
|
|
|
|
__entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks;
|
|
|
|
),
|
|
|
|
|
2011-03-22 01:38:05 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d "
|
|
|
|
"reserved_data_blocks %d reserved_meta_blocks %d "
|
|
|
|
"allocated_meta_blocks %d",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2010-10-28 02:08:50 +00:00
|
|
|
(unsigned long) __entry->ino,
|
2011-06-06 13:51:52 +00:00
|
|
|
__entry->mode, __entry->i_blocks,
|
2010-01-01 06:00:21 +00:00
|
|
|
__entry->freed_blocks, __entry->reserved_data_blocks,
|
|
|
|
__entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
|
|
|
|
);
|
|
|
|
|
2010-05-17 07:00:00 +00:00
|
|
|
DECLARE_EVENT_CLASS(ext4__bitmap_load,
|
|
|
|
TP_PROTO(struct super_block *sb, unsigned long group),
|
|
|
|
|
|
|
|
TP_ARGS(sb, group),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( dev_t, dev )
|
2010-05-17 07:00:00 +00:00
|
|
|
__field( __u32, group )
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->dev = sb->s_dev;
|
2010-05-17 07:00:00 +00:00
|
|
|
__entry->group = group;
|
|
|
|
),
|
|
|
|
|
2010-10-28 02:08:50 +00:00
|
|
|
TP_printk("dev %d,%d group %u",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
__entry->group)
|
2010-05-17 07:00:00 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, unsigned long group),
|
|
|
|
|
|
|
|
TP_ARGS(sb, group)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, unsigned long group),
|
|
|
|
|
|
|
|
TP_ARGS(sb, group)
|
|
|
|
);
|
2010-01-01 06:00:21 +00:00
|
|
|
|
2011-03-22 01:38:05 +00:00
|
|
|
DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, unsigned long group),
|
|
|
|
|
|
|
|
TP_ARGS(sb, group)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, unsigned long group),
|
|
|
|
|
|
|
|
TP_ARGS(sb, group)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_direct_IO_enter,
|
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
|
|
|
|
|
|
|
|
TP_ARGS(inode, offset, len, rw),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
__field( loff_t, pos )
|
|
|
|
__field( unsigned long, len )
|
|
|
|
__field( int, rw )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->pos = offset;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->rw = rw;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
2011-06-06 13:51:52 +00:00
|
|
|
__entry->pos, __entry->len, __entry->rw)
|
2011-03-22 01:38:05 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_direct_IO_exit,
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
|
|
|
|
int rw, int ret),
|
2011-03-22 01:38:05 +00:00
|
|
|
|
|
|
|
TP_ARGS(inode, offset, len, rw, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
__field( loff_t, pos )
|
|
|
|
__field( unsigned long, len )
|
|
|
|
__field( int, rw )
|
|
|
|
__field( int, ret )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->pos = offset;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->rw = rw;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d ret %d",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
2011-06-06 13:51:52 +00:00
|
|
|
__entry->pos, __entry->len,
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->rw, __entry->ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_fallocate_enter,
|
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
|
|
|
|
|
|
|
|
TP_ARGS(inode, offset, len, mode),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
__field( loff_t, pos )
|
|
|
|
__field( loff_t, len )
|
|
|
|
__field( int, mode )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->pos = offset;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->mode = mode;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu pos %lld len %lld mode %d",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2011-06-06 13:51:52 +00:00
|
|
|
(unsigned long) __entry->ino, __entry->pos,
|
|
|
|
__entry->len, __entry->mode)
|
2011-03-22 01:38:05 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_fallocate_exit,
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_PROTO(struct inode *inode, loff_t offset,
|
|
|
|
unsigned int max_blocks, int ret),
|
2011-03-22 01:38:05 +00:00
|
|
|
|
|
|
|
TP_ARGS(inode, offset, max_blocks, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
__field( loff_t, pos )
|
2011-06-06 13:51:52 +00:00
|
|
|
__field( unsigned int, blocks )
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( int, ret )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->pos = offset;
|
|
|
|
__entry->blocks = max_blocks;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu pos %lld blocks %u ret %d",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
2011-06-06 13:51:52 +00:00
|
|
|
__entry->pos, __entry->blocks,
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_unlink_enter,
|
|
|
|
TP_PROTO(struct inode *parent, struct dentry *dentry),
|
|
|
|
|
|
|
|
TP_ARGS(parent, dentry),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( ino_t, parent )
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( loff_t, size )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->parent = parent->i_ino;
|
|
|
|
__entry->ino = dentry->d_inode->i_ino;
|
|
|
|
__entry->size = dentry->d_inode->i_size;
|
|
|
|
__entry->dev = dentry->d_inode->i_sb->s_dev;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu size %lld parent %lu",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino, __entry->size,
|
|
|
|
(unsigned long) __entry->parent)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_unlink_exit,
|
|
|
|
TP_PROTO(struct dentry *dentry, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(dentry, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
__field( int, ret )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->ino = dentry->d_inode->i_ino;
|
|
|
|
__entry->dev = dentry->d_inode->i_sb->s_dev;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu ret %d",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DECLARE_EVENT_CLASS(ext4__truncate,
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
2011-06-06 13:51:52 +00:00
|
|
|
__field( __u64, blocks )
|
2011-03-22 01:38:05 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->blocks = inode->i_blocks;
|
|
|
|
),
|
|
|
|
|
2011-06-06 13:51:52 +00:00
|
|
|
TP_printk("dev %d,%d ino %lu blocks %llu",
|
2011-03-22 01:38:05 +00:00
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
2011-06-06 13:51:52 +00:00
|
|
|
(unsigned long) __entry->ino, __entry->blocks)
|
2011-03-22 01:38:05 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__truncate, ext4_truncate_enter,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__truncate, ext4_truncate_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode)
|
|
|
|
);
|
|
|
|
|
|
|
|
DECLARE_EVENT_CLASS(ext4__map_blocks_enter,
|
|
|
|
TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
|
2011-06-06 13:51:52 +00:00
|
|
|
unsigned int len, unsigned int flags),
|
2011-03-22 01:38:05 +00:00
|
|
|
|
|
|
|
TP_ARGS(inode, lblk, len, flags),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
__field( ext4_lblk_t, lblk )
|
2011-06-06 13:51:52 +00:00
|
|
|
__field( unsigned int, len )
|
|
|
|
__field( unsigned int, flags )
|
2011-03-22 01:38:05 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->lblk = lblk;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->flags = flags;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
2011-06-06 13:51:52 +00:00
|
|
|
__entry->lblk, __entry->len, __entry->flags)
|
2011-03-22 01:38:05 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter,
|
|
|
|
TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
|
|
|
|
unsigned len, unsigned flags),
|
|
|
|
|
|
|
|
TP_ARGS(inode, lblk, len, flags)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter,
|
|
|
|
TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
|
|
|
|
unsigned len, unsigned flags),
|
|
|
|
|
|
|
|
TP_ARGS(inode, lblk, len, flags)
|
|
|
|
);
|
|
|
|
|
|
|
|
DECLARE_EVENT_CLASS(ext4__map_blocks_exit,
|
|
|
|
TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
|
2011-06-06 13:51:52 +00:00
|
|
|
ext4_fsblk_t pblk, unsigned int len, int ret),
|
2011-03-22 01:38:05 +00:00
|
|
|
|
|
|
|
TP_ARGS(inode, lblk, pblk, len, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
__field( ext4_lblk_t, lblk )
|
|
|
|
__field( ext4_fsblk_t, pblk )
|
2011-06-06 13:51:52 +00:00
|
|
|
__field( unsigned int, len )
|
2011-03-22 01:38:05 +00:00
|
|
|
__field( int, ret )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->lblk = lblk;
|
|
|
|
__entry->pblk = pblk;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
2011-06-06 13:51:52 +00:00
|
|
|
__entry->lblk, __entry->pblk,
|
2011-03-22 01:38:05 +00:00
|
|
|
__entry->len, __entry->ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
|
|
|
|
TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
|
|
|
|
ext4_fsblk_t pblk, unsigned len, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, lblk, pblk, len, ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
|
|
|
|
TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
|
|
|
|
ext4_fsblk_t pblk, unsigned len, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, lblk, pblk, len, ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_ext_load_extent,
|
|
|
|
TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk),
|
|
|
|
|
|
|
|
TP_ARGS(inode, lblk, pblk),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
__field( ext4_lblk_t, lblk )
|
|
|
|
__field( ext4_fsblk_t, pblk )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->lblk = lblk;
|
|
|
|
__entry->pblk = pblk;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev %d,%d ino %lu lblk %u pblk %llu",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino,
|
2011-06-06 13:51:52 +00:00
|
|
|
__entry->lblk, __entry->pblk)
|
2011-03-22 01:38:05 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(ext4_load_inode,
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( ino_t, ino )
|
|
|
|
__field( dev_t, dev )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev %d,%d ino %ld",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
(unsigned long) __entry->ino)
|
|
|
|
);
|
|
|
|
|
2011-07-11 02:37:50 +00:00
|
|
|
TRACE_EVENT(ext4_journal_start,
|
|
|
|
TP_PROTO(struct super_block *sb, int nblocks, unsigned long IP),
|
|
|
|
|
|
|
|
TP_ARGS(sb, nblocks, IP),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( dev_t, dev )
|
|
|
|
__field( int, nblocks )
|
|
|
|
__field(unsigned long, ip )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
|
|
|
__entry->nblocks = nblocks;
|
|
|
|
__entry->ip = IP;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev %d,%d nblocks %d caller %pF",
|
|
|
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
|
|
|
__entry->nblocks, (void *)__entry->ip)
|
|
|
|
);
|
|
|
|
|
2011-07-11 04:01:52 +00:00
|
|
|
DECLARE_EVENT_CLASS(ext4__trim,
|
|
|
|
TP_PROTO(struct super_block *sb,
|
|
|
|
ext4_group_t group,
|
|
|
|
ext4_grpblk_t start,
|
|
|
|
ext4_grpblk_t len),
|
|
|
|
|
|
|
|
TP_ARGS(sb, group, start, len),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( int, dev_major )
|
|
|
|
__field( int, dev_minor )
|
|
|
|
__field( __u32, group )
|
|
|
|
__field( int, start )
|
|
|
|
__field( int, len )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev_major = MAJOR(sb->s_dev);
|
|
|
|
__entry->dev_minor = MINOR(sb->s_dev);
|
|
|
|
__entry->group = group;
|
|
|
|
__entry->start = start;
|
|
|
|
__entry->len = len;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev %d,%d group %u, start %d, len %d",
|
|
|
|
__entry->dev_major, __entry->dev_minor,
|
|
|
|
__entry->group, __entry->start, __entry->len)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__trim, ext4_trim_extent,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb,
|
|
|
|
ext4_group_t group,
|
|
|
|
ext4_grpblk_t start,
|
|
|
|
ext4_grpblk_t len),
|
|
|
|
|
|
|
|
TP_ARGS(sb, group, start, len)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(ext4__trim, ext4_trim_all_free,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb,
|
|
|
|
ext4_group_t group,
|
|
|
|
ext4_grpblk_t start,
|
|
|
|
ext4_grpblk_t len),
|
|
|
|
|
|
|
|
TP_ARGS(sb, group, start, len)
|
|
|
|
);
|
|
|
|
|
2009-06-17 15:48:11 +00:00
|
|
|
#endif /* _TRACE_EXT4_H */
|
|
|
|
|
|
|
|
/* This part must be outside protection */
|
|
|
|
#include <trace/define_trace.h>
|