Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM ext4 |
| 3 | |
Li Zefan | d0b6e04 | 2009-07-13 10:33:21 +0800 | [diff] [blame] | 4 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_EXT4_H |
| 6 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 7 | #include <linux/writeback.h> |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 8 | #include <linux/tracepoint.h> |
| 9 | |
Theodore Ts'o | 3661d28 | 2009-09-14 22:59:50 -0400 | [diff] [blame] | 10 | struct ext4_allocation_context; |
| 11 | struct ext4_allocation_request; |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 12 | struct ext4_extent; |
Theodore Ts'o | 3661d28 | 2009-09-14 22:59:50 -0400 | [diff] [blame] | 13 | struct ext4_prealloc_space; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 14 | struct ext4_inode_info; |
Josh Stone | 0ef1224 | 2009-09-30 00:51:22 -0400 | [diff] [blame] | 15 | struct mpage_da_data; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 16 | struct ext4_map_blocks; |
| 17 | struct ext4_extent; |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 18 | struct extent_status; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 19 | |
| 20 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) |
Theodore Ts'o | 3661d28 | 2009-09-14 22:59:50 -0400 | [diff] [blame] | 21 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 22 | #define show_mballoc_flags(flags) __print_flags(flags, "|", \ |
| 23 | { EXT4_MB_HINT_MERGE, "HINT_MERGE" }, \ |
| 24 | { EXT4_MB_HINT_RESERVED, "HINT_RESV" }, \ |
| 25 | { EXT4_MB_HINT_METADATA, "HINT_MDATA" }, \ |
| 26 | { EXT4_MB_HINT_FIRST, "HINT_FIRST" }, \ |
| 27 | { EXT4_MB_HINT_BEST, "HINT_BEST" }, \ |
| 28 | { EXT4_MB_HINT_DATA, "HINT_DATA" }, \ |
| 29 | { EXT4_MB_HINT_NOPREALLOC, "HINT_NOPREALLOC" }, \ |
| 30 | { EXT4_MB_HINT_GROUP_ALLOC, "HINT_GRP_ALLOC" }, \ |
| 31 | { EXT4_MB_HINT_GOAL_ONLY, "HINT_GOAL_ONLY" }, \ |
| 32 | { EXT4_MB_HINT_TRY_GOAL, "HINT_TRY_GOAL" }, \ |
| 33 | { EXT4_MB_DELALLOC_RESERVED, "DELALLOC_RESV" }, \ |
| 34 | { EXT4_MB_STREAM_ALLOC, "STREAM_ALLOC" }, \ |
| 35 | { EXT4_MB_USE_ROOT_BLOCKS, "USE_ROOT_BLKS" }, \ |
| 36 | { EXT4_MB_USE_RESERVED, "USE_RESV" }) |
| 37 | |
| 38 | #define show_map_flags(flags) __print_flags(flags, "|", \ |
| 39 | { EXT4_GET_BLOCKS_CREATE, "CREATE" }, \ |
| 40 | { EXT4_GET_BLOCKS_UNINIT_EXT, "UNINIT" }, \ |
| 41 | { EXT4_GET_BLOCKS_DELALLOC_RESERVE, "DELALLOC" }, \ |
| 42 | { EXT4_GET_BLOCKS_PRE_IO, "PRE_IO" }, \ |
| 43 | { EXT4_GET_BLOCKS_CONVERT, "CONVERT" }, \ |
| 44 | { EXT4_GET_BLOCKS_METADATA_NOFAIL, "METADATA_NOFAIL" }, \ |
| 45 | { EXT4_GET_BLOCKS_NO_NORMALIZE, "NO_NORMALIZE" }, \ |
| 46 | { EXT4_GET_BLOCKS_KEEP_SIZE, "KEEP_SIZE" }, \ |
| 47 | { EXT4_GET_BLOCKS_NO_LOCK, "NO_LOCK" }, \ |
| 48 | { EXT4_GET_BLOCKS_NO_PUT_HOLE, "NO_PUT_HOLE" }) |
| 49 | |
| 50 | #define show_mflags(flags) __print_flags(flags, "", \ |
| 51 | { EXT4_MAP_NEW, "N" }, \ |
| 52 | { EXT4_MAP_MAPPED, "M" }, \ |
| 53 | { EXT4_MAP_UNWRITTEN, "U" }, \ |
| 54 | { EXT4_MAP_BOUNDARY, "B" }, \ |
| 55 | { EXT4_MAP_UNINIT, "u" }, \ |
| 56 | { EXT4_MAP_FROM_CLUSTER, "C" }) |
| 57 | |
| 58 | #define show_free_flags(flags) __print_flags(flags, "|", \ |
| 59 | { EXT4_FREE_BLOCKS_METADATA, "METADATA" }, \ |
| 60 | { EXT4_FREE_BLOCKS_FORGET, "FORGET" }, \ |
| 61 | { EXT4_FREE_BLOCKS_VALIDATED, "VALIDATED" }, \ |
| 62 | { EXT4_FREE_BLOCKS_NO_QUOT_UPDATE, "NO_QUOTA" }, \ |
| 63 | { EXT4_FREE_BLOCKS_NOFREE_FIRST_CLUSTER,"1ST_CLUSTER" },\ |
| 64 | { EXT4_FREE_BLOCKS_NOFREE_LAST_CLUSTER, "LAST_CLUSTER" }) |
| 65 | |
| 66 | #define show_extent_status(status) __print_flags(status, "", \ |
Theodore Ts'o | 3be78c7 | 2013-08-16 21:22:41 -0400 | [diff] [blame] | 67 | { EXTENT_STATUS_WRITTEN, "W" }, \ |
| 68 | { EXTENT_STATUS_UNWRITTEN, "U" }, \ |
| 69 | { EXTENT_STATUS_DELAYED, "D" }, \ |
| 70 | { EXTENT_STATUS_HOLE, "H" }) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 71 | |
| 72 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 73 | TRACE_EVENT(ext4_free_inode, |
| 74 | TP_PROTO(struct inode *inode), |
| 75 | |
| 76 | TP_ARGS(inode), |
| 77 | |
| 78 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 79 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 80 | __field( ino_t, ino ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 81 | __field( uid_t, uid ) |
| 82 | __field( gid_t, gid ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 83 | __field( __u64, blocks ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 84 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 85 | ), |
| 86 | |
| 87 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 88 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 89 | __entry->ino = inode->i_ino; |
Eric W. Biederman | 08cefc7 | 2012-02-07 15:41:49 -0800 | [diff] [blame] | 90 | __entry->uid = i_uid_read(inode); |
| 91 | __entry->gid = i_gid_read(inode); |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 92 | __entry->blocks = inode->i_blocks; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 93 | __entry->mode = inode->i_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 94 | ), |
| 95 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 96 | TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 97 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 98 | (unsigned long) __entry->ino, __entry->mode, |
| 99 | __entry->uid, __entry->gid, __entry->blocks) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 100 | ); |
| 101 | |
| 102 | TRACE_EVENT(ext4_request_inode, |
| 103 | TP_PROTO(struct inode *dir, int mode), |
| 104 | |
| 105 | TP_ARGS(dir, mode), |
| 106 | |
| 107 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 108 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 109 | __field( ino_t, dir ) |
Theodore Ts'o | 59be8e7 | 2011-07-30 12:38:46 -0400 | [diff] [blame] | 110 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 111 | ), |
| 112 | |
| 113 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 114 | __entry->dev = dir->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 115 | __entry->dir = dir->i_ino; |
| 116 | __entry->mode = mode; |
| 117 | ), |
| 118 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 119 | TP_printk("dev %d,%d dir %lu mode 0%o", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 120 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 121 | (unsigned long) __entry->dir, __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 122 | ); |
| 123 | |
| 124 | TRACE_EVENT(ext4_allocate_inode, |
| 125 | TP_PROTO(struct inode *inode, struct inode *dir, int mode), |
| 126 | |
| 127 | TP_ARGS(inode, dir, mode), |
| 128 | |
| 129 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 130 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 131 | __field( ino_t, ino ) |
| 132 | __field( ino_t, dir ) |
Theodore Ts'o | 59be8e7 | 2011-07-30 12:38:46 -0400 | [diff] [blame] | 133 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 134 | ), |
| 135 | |
| 136 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 137 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 138 | __entry->ino = inode->i_ino; |
| 139 | __entry->dir = dir->i_ino; |
| 140 | __entry->mode = mode; |
| 141 | ), |
| 142 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 143 | TP_printk("dev %d,%d ino %lu dir %lu mode 0%o", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 144 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 145 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 146 | (unsigned long) __entry->dir, __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 147 | ); |
| 148 | |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 149 | TRACE_EVENT(ext4_evict_inode, |
| 150 | TP_PROTO(struct inode *inode), |
| 151 | |
| 152 | TP_ARGS(inode), |
| 153 | |
| 154 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 155 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 156 | __field( ino_t, ino ) |
| 157 | __field( int, nlink ) |
| 158 | ), |
| 159 | |
| 160 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 161 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 162 | __entry->ino = inode->i_ino; |
| 163 | __entry->nlink = inode->i_nlink; |
| 164 | ), |
| 165 | |
| 166 | TP_printk("dev %d,%d ino %lu nlink %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 167 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 168 | (unsigned long) __entry->ino, __entry->nlink) |
| 169 | ); |
| 170 | |
| 171 | TRACE_EVENT(ext4_drop_inode, |
| 172 | TP_PROTO(struct inode *inode, int drop), |
| 173 | |
| 174 | TP_ARGS(inode, drop), |
| 175 | |
| 176 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 177 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 178 | __field( ino_t, ino ) |
| 179 | __field( int, drop ) |
| 180 | ), |
| 181 | |
| 182 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 183 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 184 | __entry->ino = inode->i_ino; |
| 185 | __entry->drop = drop; |
| 186 | ), |
| 187 | |
| 188 | TP_printk("dev %d,%d ino %lu drop %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 189 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 190 | (unsigned long) __entry->ino, __entry->drop) |
| 191 | ); |
| 192 | |
| 193 | TRACE_EVENT(ext4_mark_inode_dirty, |
| 194 | TP_PROTO(struct inode *inode, unsigned long IP), |
| 195 | |
| 196 | TP_ARGS(inode, IP), |
| 197 | |
| 198 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 199 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 200 | __field( ino_t, ino ) |
| 201 | __field(unsigned long, ip ) |
| 202 | ), |
| 203 | |
| 204 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 205 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 206 | __entry->ino = inode->i_ino; |
| 207 | __entry->ip = IP; |
| 208 | ), |
| 209 | |
| 210 | TP_printk("dev %d,%d ino %lu caller %pF", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 211 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 212 | (unsigned long) __entry->ino, (void *)__entry->ip) |
| 213 | ); |
| 214 | |
| 215 | TRACE_EVENT(ext4_begin_ordered_truncate, |
| 216 | TP_PROTO(struct inode *inode, loff_t new_size), |
| 217 | |
| 218 | TP_ARGS(inode, new_size), |
| 219 | |
| 220 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 221 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 222 | __field( ino_t, ino ) |
| 223 | __field( loff_t, new_size ) |
| 224 | ), |
| 225 | |
| 226 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 227 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 228 | __entry->ino = inode->i_ino; |
| 229 | __entry->new_size = new_size; |
| 230 | ), |
| 231 | |
| 232 | TP_printk("dev %d,%d ino %lu new_size %lld", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 233 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 234 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 235 | __entry->new_size) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 236 | ); |
| 237 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 238 | DECLARE_EVENT_CLASS(ext4__write_begin, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 239 | |
| 240 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 241 | unsigned int flags), |
| 242 | |
| 243 | TP_ARGS(inode, pos, len, flags), |
| 244 | |
| 245 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 246 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 247 | __field( ino_t, ino ) |
| 248 | __field( loff_t, pos ) |
| 249 | __field( unsigned int, len ) |
| 250 | __field( unsigned int, flags ) |
| 251 | ), |
| 252 | |
| 253 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 254 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 255 | __entry->ino = inode->i_ino; |
| 256 | __entry->pos = pos; |
| 257 | __entry->len = len; |
| 258 | __entry->flags = flags; |
| 259 | ), |
| 260 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 261 | TP_printk("dev %d,%d ino %lu pos %lld len %u flags %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 262 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 263 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 264 | __entry->pos, __entry->len, __entry->flags) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 265 | ); |
| 266 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 267 | DEFINE_EVENT(ext4__write_begin, ext4_write_begin, |
| 268 | |
| 269 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 270 | unsigned int flags), |
| 271 | |
| 272 | TP_ARGS(inode, pos, len, flags) |
| 273 | ); |
| 274 | |
| 275 | DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin, |
| 276 | |
| 277 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 278 | unsigned int flags), |
| 279 | |
| 280 | TP_ARGS(inode, pos, len, flags) |
| 281 | ); |
| 282 | |
| 283 | DECLARE_EVENT_CLASS(ext4__write_end, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 284 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 285 | unsigned int copied), |
| 286 | |
| 287 | TP_ARGS(inode, pos, len, copied), |
| 288 | |
| 289 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 290 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 291 | __field( ino_t, ino ) |
| 292 | __field( loff_t, pos ) |
| 293 | __field( unsigned int, len ) |
| 294 | __field( unsigned int, copied ) |
| 295 | ), |
| 296 | |
| 297 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 298 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 299 | __entry->ino = inode->i_ino; |
| 300 | __entry->pos = pos; |
| 301 | __entry->len = len; |
| 302 | __entry->copied = copied; |
| 303 | ), |
| 304 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 305 | TP_printk("dev %d,%d ino %lu pos %lld len %u copied %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 306 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 307 | (unsigned long) __entry->ino, |
| 308 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 309 | ); |
| 310 | |
Theodore Ts'o | 74d553a | 2013-04-03 12:39:17 -0400 | [diff] [blame] | 311 | DEFINE_EVENT(ext4__write_end, ext4_write_end, |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 312 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 313 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 314 | unsigned int copied), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 315 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 316 | TP_ARGS(inode, pos, len, copied) |
| 317 | ); |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 318 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 319 | DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 320 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 321 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 322 | unsigned int copied), |
| 323 | |
| 324 | TP_ARGS(inode, pos, len, copied) |
| 325 | ); |
| 326 | |
| 327 | DEFINE_EVENT(ext4__write_end, ext4_da_write_end, |
| 328 | |
| 329 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 330 | unsigned int copied), |
| 331 | |
| 332 | TP_ARGS(inode, pos, len, copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 333 | ); |
| 334 | |
Theodore Ts'o | 20970ba | 2013-06-06 14:00:46 -0400 | [diff] [blame] | 335 | TRACE_EVENT(ext4_writepages, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 336 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), |
| 337 | |
| 338 | TP_ARGS(inode, wbc), |
| 339 | |
| 340 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 341 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 342 | __field( ino_t, ino ) |
| 343 | __field( long, nr_to_write ) |
| 344 | __field( long, pages_skipped ) |
| 345 | __field( loff_t, range_start ) |
| 346 | __field( loff_t, range_end ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 347 | __field( pgoff_t, writeback_index ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 348 | __field( int, sync_mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 349 | __field( char, for_kupdate ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 350 | __field( char, range_cyclic ) |
| 351 | ), |
| 352 | |
| 353 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 354 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 355 | __entry->ino = inode->i_ino; |
| 356 | __entry->nr_to_write = wbc->nr_to_write; |
| 357 | __entry->pages_skipped = wbc->pages_skipped; |
| 358 | __entry->range_start = wbc->range_start; |
| 359 | __entry->range_end = wbc->range_end; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 360 | __entry->writeback_index = inode->i_mapping->writeback_index; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 361 | __entry->sync_mode = wbc->sync_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 362 | __entry->for_kupdate = wbc->for_kupdate; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 363 | __entry->range_cyclic = wbc->range_cyclic; |
| 364 | ), |
| 365 | |
Theodore Ts'o | a107e5a | 2010-10-27 23:44:47 -0400 | [diff] [blame] | 366 | TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld " |
Anatol Pomozov | 8137029 | 2012-08-17 09:52:17 -0400 | [diff] [blame] | 367 | "range_start %lld range_end %lld sync_mode %d " |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 368 | "for_kupdate %d range_cyclic %d writeback_index %lu", |
| 369 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 370 | (unsigned long) __entry->ino, __entry->nr_to_write, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 371 | __entry->pages_skipped, __entry->range_start, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 372 | __entry->range_end, __entry->sync_mode, |
| 373 | __entry->for_kupdate, __entry->range_cyclic, |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 374 | (unsigned long) __entry->writeback_index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 375 | ); |
| 376 | |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 377 | TRACE_EVENT(ext4_da_write_pages, |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 378 | TP_PROTO(struct inode *inode, pgoff_t first_page, |
| 379 | struct writeback_control *wbc), |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 380 | |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 381 | TP_ARGS(inode, first_page, wbc), |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 382 | |
| 383 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 384 | __field( dev_t, dev ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 385 | __field( ino_t, ino ) |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 386 | __field( pgoff_t, first_page ) |
| 387 | __field( long, nr_to_write ) |
| 388 | __field( int, sync_mode ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 389 | ), |
| 390 | |
| 391 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 392 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 393 | __entry->ino = inode->i_ino; |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 394 | __entry->first_page = first_page; |
| 395 | __entry->nr_to_write = wbc->nr_to_write; |
| 396 | __entry->sync_mode = wbc->sync_mode; |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 397 | ), |
| 398 | |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 399 | TP_printk("dev %d,%d ino %lu first_page %lu nr_to_write %ld " |
| 400 | "sync_mode %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 401 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 402 | (unsigned long) __entry->ino, __entry->first_page, |
| 403 | __entry->nr_to_write, __entry->sync_mode) |
| 404 | ); |
| 405 | |
| 406 | TRACE_EVENT(ext4_da_write_pages_extent, |
| 407 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map), |
| 408 | |
| 409 | TP_ARGS(inode, map), |
| 410 | |
| 411 | TP_STRUCT__entry( |
| 412 | __field( dev_t, dev ) |
| 413 | __field( ino_t, ino ) |
| 414 | __field( __u64, lblk ) |
| 415 | __field( __u32, len ) |
| 416 | __field( __u32, flags ) |
| 417 | ), |
| 418 | |
| 419 | TP_fast_assign( |
| 420 | __entry->dev = inode->i_sb->s_dev; |
| 421 | __entry->ino = inode->i_ino; |
| 422 | __entry->lblk = map->m_lblk; |
| 423 | __entry->len = map->m_len; |
| 424 | __entry->flags = map->m_flags; |
| 425 | ), |
| 426 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 427 | TP_printk("dev %d,%d ino %lu lblk %llu len %u flags %s", |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 428 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 429 | (unsigned long) __entry->ino, __entry->lblk, __entry->len, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 430 | show_mflags(__entry->flags)) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 431 | ); |
| 432 | |
Theodore Ts'o | 20970ba | 2013-06-06 14:00:46 -0400 | [diff] [blame] | 433 | TRACE_EVENT(ext4_writepages_result, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 434 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, |
| 435 | int ret, int pages_written), |
| 436 | |
| 437 | TP_ARGS(inode, wbc, ret, pages_written), |
| 438 | |
| 439 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 440 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 441 | __field( ino_t, ino ) |
| 442 | __field( int, ret ) |
| 443 | __field( int, pages_written ) |
| 444 | __field( long, pages_skipped ) |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 445 | __field( pgoff_t, writeback_index ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 446 | __field( int, sync_mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 447 | ), |
| 448 | |
| 449 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 450 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 451 | __entry->ino = inode->i_ino; |
| 452 | __entry->ret = ret; |
| 453 | __entry->pages_written = pages_written; |
| 454 | __entry->pages_skipped = wbc->pages_skipped; |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 455 | __entry->writeback_index = inode->i_mapping->writeback_index; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 456 | __entry->sync_mode = wbc->sync_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 457 | ), |
| 458 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 459 | TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld " |
Wu Fengguang | b7a2441 | 2010-07-21 22:19:51 -0600 | [diff] [blame] | 460 | "sync_mode %d writeback_index %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 461 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 462 | (unsigned long) __entry->ino, __entry->ret, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 463 | __entry->pages_written, __entry->pages_skipped, |
Wu Fengguang | b7a2441 | 2010-07-21 22:19:51 -0600 | [diff] [blame] | 464 | __entry->sync_mode, |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 465 | (unsigned long) __entry->writeback_index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 466 | ); |
| 467 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 468 | DECLARE_EVENT_CLASS(ext4__page_op, |
| 469 | TP_PROTO(struct page *page), |
| 470 | |
| 471 | TP_ARGS(page), |
| 472 | |
| 473 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 474 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 475 | __field( ino_t, ino ) |
| 476 | __field( pgoff_t, index ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 477 | |
| 478 | ), |
| 479 | |
| 480 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 481 | __entry->dev = page->mapping->host->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 482 | __entry->ino = page->mapping->host->i_ino; |
| 483 | __entry->index = page->index; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 484 | ), |
| 485 | |
| 486 | TP_printk("dev %d,%d ino %lu page_index %lu", |
| 487 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 488 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 489 | (unsigned long) __entry->index) |
| 490 | ); |
| 491 | |
| 492 | DEFINE_EVENT(ext4__page_op, ext4_writepage, |
| 493 | |
| 494 | TP_PROTO(struct page *page), |
| 495 | |
| 496 | TP_ARGS(page) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 497 | ); |
| 498 | |
| 499 | DEFINE_EVENT(ext4__page_op, ext4_readpage, |
| 500 | |
| 501 | TP_PROTO(struct page *page), |
| 502 | |
| 503 | TP_ARGS(page) |
| 504 | ); |
| 505 | |
| 506 | DEFINE_EVENT(ext4__page_op, ext4_releasepage, |
| 507 | |
| 508 | TP_PROTO(struct page *page), |
| 509 | |
| 510 | TP_ARGS(page) |
| 511 | ); |
| 512 | |
Jan Kara | 4520fb3 | 2012-12-25 13:28:54 -0500 | [diff] [blame] | 513 | DECLARE_EVENT_CLASS(ext4_invalidatepage_op, |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 514 | TP_PROTO(struct page *page, unsigned int offset, unsigned int length), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 515 | |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 516 | TP_ARGS(page, offset, length), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 517 | |
| 518 | TP_STRUCT__entry( |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 519 | __field( dev_t, dev ) |
| 520 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 521 | __field( pgoff_t, index ) |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 522 | __field( unsigned int, offset ) |
| 523 | __field( unsigned int, length ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 524 | ), |
| 525 | |
| 526 | TP_fast_assign( |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 527 | __entry->dev = page->mapping->host->i_sb->s_dev; |
| 528 | __entry->ino = page->mapping->host->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 529 | __entry->index = page->index; |
| 530 | __entry->offset = offset; |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 531 | __entry->length = length; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 532 | ), |
| 533 | |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 534 | TP_printk("dev %d,%d ino %lu page_index %lu offset %u length %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 535 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 536 | (unsigned long) __entry->ino, |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 537 | (unsigned long) __entry->index, |
| 538 | __entry->offset, __entry->length) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 539 | ); |
| 540 | |
Jan Kara | 4520fb3 | 2012-12-25 13:28:54 -0500 | [diff] [blame] | 541 | DEFINE_EVENT(ext4_invalidatepage_op, ext4_invalidatepage, |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 542 | TP_PROTO(struct page *page, unsigned int offset, unsigned int length), |
Jan Kara | 4520fb3 | 2012-12-25 13:28:54 -0500 | [diff] [blame] | 543 | |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 544 | TP_ARGS(page, offset, length) |
Jan Kara | 4520fb3 | 2012-12-25 13:28:54 -0500 | [diff] [blame] | 545 | ); |
| 546 | |
| 547 | DEFINE_EVENT(ext4_invalidatepage_op, ext4_journalled_invalidatepage, |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 548 | TP_PROTO(struct page *page, unsigned int offset, unsigned int length), |
Jan Kara | 4520fb3 | 2012-12-25 13:28:54 -0500 | [diff] [blame] | 549 | |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 550 | TP_ARGS(page, offset, length) |
Jan Kara | 4520fb3 | 2012-12-25 13:28:54 -0500 | [diff] [blame] | 551 | ); |
| 552 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 553 | TRACE_EVENT(ext4_discard_blocks, |
| 554 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
| 555 | unsigned long long count), |
| 556 | |
| 557 | TP_ARGS(sb, blk, count), |
| 558 | |
| 559 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 560 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 561 | __field( __u64, blk ) |
| 562 | __field( __u64, count ) |
| 563 | |
| 564 | ), |
| 565 | |
| 566 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 567 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 568 | __entry->blk = blk; |
| 569 | __entry->count = count; |
| 570 | ), |
| 571 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 572 | TP_printk("dev %d,%d blk %llu count %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 573 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 574 | __entry->blk, __entry->count) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 575 | ); |
| 576 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 577 | DECLARE_EVENT_CLASS(ext4__mb_new_pa, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 578 | TP_PROTO(struct ext4_allocation_context *ac, |
| 579 | struct ext4_prealloc_space *pa), |
| 580 | |
| 581 | TP_ARGS(ac, pa), |
| 582 | |
| 583 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 584 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 585 | __field( ino_t, ino ) |
| 586 | __field( __u64, pa_pstart ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 587 | __field( __u64, pa_lstart ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 588 | __field( __u32, pa_len ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 589 | |
| 590 | ), |
| 591 | |
| 592 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 593 | __entry->dev = ac->ac_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 594 | __entry->ino = ac->ac_inode->i_ino; |
| 595 | __entry->pa_pstart = pa->pa_pstart; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 596 | __entry->pa_lstart = pa->pa_lstart; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 597 | __entry->pa_len = pa->pa_len; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 598 | ), |
| 599 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 600 | TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 601 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 602 | (unsigned long) __entry->ino, |
| 603 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 604 | ); |
| 605 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 606 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, |
| 607 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 608 | TP_PROTO(struct ext4_allocation_context *ac, |
| 609 | struct ext4_prealloc_space *pa), |
| 610 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 611 | TP_ARGS(ac, pa) |
| 612 | ); |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 613 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 614 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 615 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 616 | TP_PROTO(struct ext4_allocation_context *ac, |
| 617 | struct ext4_prealloc_space *pa), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 618 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 619 | TP_ARGS(ac, pa) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 620 | ); |
| 621 | |
| 622 | TRACE_EVENT(ext4_mb_release_inode_pa, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 623 | TP_PROTO(struct ext4_prealloc_space *pa, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 624 | unsigned long long block, unsigned int count), |
| 625 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 626 | TP_ARGS(pa, block, count), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 627 | |
| 628 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 629 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 630 | __field( ino_t, ino ) |
| 631 | __field( __u64, block ) |
| 632 | __field( __u32, count ) |
| 633 | |
| 634 | ), |
| 635 | |
| 636 | TP_fast_assign( |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 637 | __entry->dev = pa->pa_inode->i_sb->s_dev; |
| 638 | __entry->ino = pa->pa_inode->i_ino; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 639 | __entry->block = block; |
| 640 | __entry->count = count; |
| 641 | ), |
| 642 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 643 | TP_printk("dev %d,%d ino %lu block %llu count %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 644 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 645 | (unsigned long) __entry->ino, |
| 646 | __entry->block, __entry->count) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 647 | ); |
| 648 | |
| 649 | TRACE_EVENT(ext4_mb_release_group_pa, |
Yongqiang Yang | 60e07cf | 2011-12-18 15:49:54 -0500 | [diff] [blame] | 650 | TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 651 | |
Yongqiang Yang | 60e07cf | 2011-12-18 15:49:54 -0500 | [diff] [blame] | 652 | TP_ARGS(sb, pa), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 653 | |
| 654 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 655 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 656 | __field( __u64, pa_pstart ) |
| 657 | __field( __u32, pa_len ) |
| 658 | |
| 659 | ), |
| 660 | |
| 661 | TP_fast_assign( |
Yongqiang Yang | 60e07cf | 2011-12-18 15:49:54 -0500 | [diff] [blame] | 662 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 663 | __entry->pa_pstart = pa->pa_pstart; |
| 664 | __entry->pa_len = pa->pa_len; |
| 665 | ), |
| 666 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 667 | TP_printk("dev %d,%d pstart %llu len %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 668 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 669 | __entry->pa_pstart, __entry->pa_len) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 670 | ); |
| 671 | |
| 672 | TRACE_EVENT(ext4_discard_preallocations, |
| 673 | TP_PROTO(struct inode *inode), |
| 674 | |
| 675 | TP_ARGS(inode), |
| 676 | |
| 677 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 678 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 679 | __field( ino_t, ino ) |
| 680 | |
| 681 | ), |
| 682 | |
| 683 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 684 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 685 | __entry->ino = inode->i_ino; |
| 686 | ), |
| 687 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 688 | TP_printk("dev %d,%d ino %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 689 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 690 | (unsigned long) __entry->ino) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 691 | ); |
| 692 | |
| 693 | TRACE_EVENT(ext4_mb_discard_preallocations, |
| 694 | TP_PROTO(struct super_block *sb, int needed), |
| 695 | |
| 696 | TP_ARGS(sb, needed), |
| 697 | |
| 698 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 699 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 700 | __field( int, needed ) |
| 701 | |
| 702 | ), |
| 703 | |
| 704 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 705 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 706 | __entry->needed = needed; |
| 707 | ), |
| 708 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 709 | TP_printk("dev %d,%d needed %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 710 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 711 | __entry->needed) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 712 | ); |
| 713 | |
| 714 | TRACE_EVENT(ext4_request_blocks, |
| 715 | TP_PROTO(struct ext4_allocation_request *ar), |
| 716 | |
| 717 | TP_ARGS(ar), |
| 718 | |
| 719 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 720 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 721 | __field( ino_t, ino ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 722 | __field( unsigned int, len ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 723 | __field( __u32, logical ) |
| 724 | __field( __u32, lleft ) |
| 725 | __field( __u32, lright ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 726 | __field( __u64, goal ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 727 | __field( __u64, pleft ) |
| 728 | __field( __u64, pright ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 729 | __field( unsigned int, flags ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 730 | ), |
| 731 | |
| 732 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 733 | __entry->dev = ar->inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 734 | __entry->ino = ar->inode->i_ino; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 735 | __entry->len = ar->len; |
| 736 | __entry->logical = ar->logical; |
| 737 | __entry->goal = ar->goal; |
| 738 | __entry->lleft = ar->lleft; |
| 739 | __entry->lright = ar->lright; |
| 740 | __entry->pleft = ar->pleft; |
| 741 | __entry->pright = ar->pright; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 742 | __entry->flags = ar->flags; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 743 | ), |
| 744 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 745 | TP_printk("dev %d,%d ino %lu flags %s len %u lblk %u goal %llu " |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 746 | "lleft %u lright %u pleft %llu pright %llu ", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 747 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 748 | (unsigned long) __entry->ino, show_mballoc_flags(__entry->flags), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 749 | __entry->len, __entry->logical, __entry->goal, |
| 750 | __entry->lleft, __entry->lright, __entry->pleft, |
| 751 | __entry->pright) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 752 | ); |
| 753 | |
| 754 | TRACE_EVENT(ext4_allocate_blocks, |
| 755 | TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), |
| 756 | |
| 757 | TP_ARGS(ar, block), |
| 758 | |
| 759 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 760 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 761 | __field( ino_t, ino ) |
| 762 | __field( __u64, block ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 763 | __field( unsigned int, len ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 764 | __field( __u32, logical ) |
| 765 | __field( __u32, lleft ) |
| 766 | __field( __u32, lright ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 767 | __field( __u64, goal ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 768 | __field( __u64, pleft ) |
| 769 | __field( __u64, pright ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 770 | __field( unsigned int, flags ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 771 | ), |
| 772 | |
| 773 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 774 | __entry->dev = ar->inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 775 | __entry->ino = ar->inode->i_ino; |
| 776 | __entry->block = block; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 777 | __entry->len = ar->len; |
| 778 | __entry->logical = ar->logical; |
| 779 | __entry->goal = ar->goal; |
| 780 | __entry->lleft = ar->lleft; |
| 781 | __entry->lright = ar->lright; |
| 782 | __entry->pleft = ar->pleft; |
| 783 | __entry->pright = ar->pright; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 784 | __entry->flags = ar->flags; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 785 | ), |
| 786 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 787 | TP_printk("dev %d,%d ino %lu flags %s len %u block %llu lblk %u " |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 788 | "goal %llu lleft %u lright %u pleft %llu pright %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 789 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 790 | (unsigned long) __entry->ino, show_mballoc_flags(__entry->flags), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 791 | __entry->len, __entry->block, __entry->logical, |
| 792 | __entry->goal, __entry->lleft, __entry->lright, |
| 793 | __entry->pleft, __entry->pright) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 794 | ); |
| 795 | |
| 796 | TRACE_EVENT(ext4_free_blocks, |
| 797 | TP_PROTO(struct inode *inode, __u64 block, unsigned long count, |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 798 | int flags), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 799 | |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 800 | TP_ARGS(inode, block, count, flags), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 801 | |
| 802 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 803 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 804 | __field( ino_t, ino ) |
| 805 | __field( __u64, block ) |
| 806 | __field( unsigned long, count ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 807 | __field( int, flags ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 808 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 809 | ), |
| 810 | |
| 811 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 812 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 813 | __entry->ino = inode->i_ino; |
| 814 | __entry->block = block; |
| 815 | __entry->count = count; |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 816 | __entry->flags = flags; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 817 | __entry->mode = inode->i_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 818 | ), |
| 819 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 820 | TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %s", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 821 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 822 | (unsigned long) __entry->ino, |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 823 | __entry->mode, __entry->block, __entry->count, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 824 | show_free_flags(__entry->flags)) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 825 | ); |
| 826 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 827 | TRACE_EVENT(ext4_sync_file_enter, |
Christoph Hellwig | 7ea8085 | 2010-05-26 17:53:25 +0200 | [diff] [blame] | 828 | TP_PROTO(struct file *file, int datasync), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 829 | |
Christoph Hellwig | 7ea8085 | 2010-05-26 17:53:25 +0200 | [diff] [blame] | 830 | TP_ARGS(file, datasync), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 831 | |
| 832 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 833 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 834 | __field( ino_t, ino ) |
| 835 | __field( ino_t, parent ) |
| 836 | __field( int, datasync ) |
| 837 | ), |
| 838 | |
| 839 | TP_fast_assign( |
Christoph Hellwig | 7ea8085 | 2010-05-26 17:53:25 +0200 | [diff] [blame] | 840 | struct dentry *dentry = file->f_path.dentry; |
| 841 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 842 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 843 | __entry->ino = dentry->d_inode->i_ino; |
| 844 | __entry->datasync = datasync; |
| 845 | __entry->parent = dentry->d_parent->d_inode->i_ino; |
| 846 | ), |
| 847 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 848 | TP_printk("dev %d,%d ino %lu parent %lu datasync %d ", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 849 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 850 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 851 | (unsigned long) __entry->parent, __entry->datasync) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 852 | ); |
| 853 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 854 | TRACE_EVENT(ext4_sync_file_exit, |
| 855 | TP_PROTO(struct inode *inode, int ret), |
| 856 | |
| 857 | TP_ARGS(inode, ret), |
| 858 | |
| 859 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 860 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 861 | __field( ino_t, ino ) |
| 862 | __field( int, ret ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 863 | ), |
| 864 | |
| 865 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 866 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 867 | __entry->ino = inode->i_ino; |
| 868 | __entry->ret = ret; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 869 | ), |
| 870 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 871 | TP_printk("dev %d,%d ino %lu ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 872 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 873 | (unsigned long) __entry->ino, |
| 874 | __entry->ret) |
| 875 | ); |
| 876 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 877 | TRACE_EVENT(ext4_sync_fs, |
| 878 | TP_PROTO(struct super_block *sb, int wait), |
| 879 | |
| 880 | TP_ARGS(sb, wait), |
| 881 | |
| 882 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 883 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 884 | __field( int, wait ) |
| 885 | |
| 886 | ), |
| 887 | |
| 888 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 889 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 890 | __entry->wait = wait; |
| 891 | ), |
| 892 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 893 | TP_printk("dev %d,%d wait %d", |
| 894 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 895 | __entry->wait) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 896 | ); |
| 897 | |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 898 | TRACE_EVENT(ext4_alloc_da_blocks, |
| 899 | TP_PROTO(struct inode *inode), |
| 900 | |
| 901 | TP_ARGS(inode), |
| 902 | |
| 903 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 904 | __field( dev_t, dev ) |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 905 | __field( ino_t, ino ) |
| 906 | __field( unsigned int, data_blocks ) |
| 907 | __field( unsigned int, meta_blocks ) |
| 908 | ), |
| 909 | |
| 910 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 911 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 912 | __entry->ino = inode->i_ino; |
| 913 | __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 914 | __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 915 | ), |
| 916 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 917 | TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 918 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 919 | (unsigned long) __entry->ino, |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 920 | __entry->data_blocks, __entry->meta_blocks) |
| 921 | ); |
| 922 | |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 923 | TRACE_EVENT(ext4_mballoc_alloc, |
| 924 | TP_PROTO(struct ext4_allocation_context *ac), |
| 925 | |
| 926 | TP_ARGS(ac), |
| 927 | |
| 928 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 929 | __field( dev_t, dev ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 930 | __field( ino_t, ino ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 931 | __field( __u32, orig_logical ) |
| 932 | __field( int, orig_start ) |
| 933 | __field( __u32, orig_group ) |
| 934 | __field( int, orig_len ) |
| 935 | __field( __u32, goal_logical ) |
| 936 | __field( int, goal_start ) |
| 937 | __field( __u32, goal_group ) |
| 938 | __field( int, goal_len ) |
| 939 | __field( __u32, result_logical ) |
| 940 | __field( int, result_start ) |
| 941 | __field( __u32, result_group ) |
| 942 | __field( int, result_len ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 943 | __field( __u16, found ) |
| 944 | __field( __u16, groups ) |
| 945 | __field( __u16, buddy ) |
| 946 | __field( __u16, flags ) |
| 947 | __field( __u16, tail ) |
| 948 | __field( __u8, cr ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 949 | ), |
| 950 | |
| 951 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 952 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 953 | __entry->ino = ac->ac_inode->i_ino; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 954 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
| 955 | __entry->orig_start = ac->ac_o_ex.fe_start; |
| 956 | __entry->orig_group = ac->ac_o_ex.fe_group; |
| 957 | __entry->orig_len = ac->ac_o_ex.fe_len; |
| 958 | __entry->goal_logical = ac->ac_g_ex.fe_logical; |
| 959 | __entry->goal_start = ac->ac_g_ex.fe_start; |
| 960 | __entry->goal_group = ac->ac_g_ex.fe_group; |
| 961 | __entry->goal_len = ac->ac_g_ex.fe_len; |
| 962 | __entry->result_logical = ac->ac_f_ex.fe_logical; |
| 963 | __entry->result_start = ac->ac_f_ex.fe_start; |
| 964 | __entry->result_group = ac->ac_f_ex.fe_group; |
| 965 | __entry->result_len = ac->ac_f_ex.fe_len; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 966 | __entry->found = ac->ac_found; |
| 967 | __entry->flags = ac->ac_flags; |
| 968 | __entry->groups = ac->ac_groups_scanned; |
| 969 | __entry->buddy = ac->ac_buddy; |
| 970 | __entry->tail = ac->ac_tail; |
| 971 | __entry->cr = ac->ac_criteria; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 972 | ), |
| 973 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 974 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 975 | "result %u/%d/%u@%u blks %u grps %u cr %u flags %s " |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 976 | "tail %u broken %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 977 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 978 | (unsigned long) __entry->ino, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 979 | __entry->orig_group, __entry->orig_start, |
| 980 | __entry->orig_len, __entry->orig_logical, |
| 981 | __entry->goal_group, __entry->goal_start, |
| 982 | __entry->goal_len, __entry->goal_logical, |
| 983 | __entry->result_group, __entry->result_start, |
| 984 | __entry->result_len, __entry->result_logical, |
| 985 | __entry->found, __entry->groups, __entry->cr, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 986 | show_mballoc_flags(__entry->flags), __entry->tail, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 987 | __entry->buddy ? 1 << __entry->buddy : 0) |
| 988 | ); |
| 989 | |
| 990 | TRACE_EVENT(ext4_mballoc_prealloc, |
| 991 | TP_PROTO(struct ext4_allocation_context *ac), |
| 992 | |
| 993 | TP_ARGS(ac), |
| 994 | |
| 995 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 996 | __field( dev_t, dev ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 997 | __field( ino_t, ino ) |
| 998 | __field( __u32, orig_logical ) |
| 999 | __field( int, orig_start ) |
| 1000 | __field( __u32, orig_group ) |
| 1001 | __field( int, orig_len ) |
| 1002 | __field( __u32, result_logical ) |
| 1003 | __field( int, result_start ) |
| 1004 | __field( __u32, result_group ) |
| 1005 | __field( int, result_len ) |
| 1006 | ), |
| 1007 | |
| 1008 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1009 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1010 | __entry->ino = ac->ac_inode->i_ino; |
| 1011 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
| 1012 | __entry->orig_start = ac->ac_o_ex.fe_start; |
| 1013 | __entry->orig_group = ac->ac_o_ex.fe_group; |
| 1014 | __entry->orig_len = ac->ac_o_ex.fe_len; |
| 1015 | __entry->result_logical = ac->ac_b_ex.fe_logical; |
| 1016 | __entry->result_start = ac->ac_b_ex.fe_start; |
| 1017 | __entry->result_group = ac->ac_b_ex.fe_group; |
| 1018 | __entry->result_len = ac->ac_b_ex.fe_len; |
| 1019 | ), |
| 1020 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1021 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1022 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1023 | (unsigned long) __entry->ino, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1024 | __entry->orig_group, __entry->orig_start, |
| 1025 | __entry->orig_len, __entry->orig_logical, |
| 1026 | __entry->result_group, __entry->result_start, |
| 1027 | __entry->result_len, __entry->result_logical) |
| 1028 | ); |
| 1029 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 1030 | DECLARE_EVENT_CLASS(ext4__mballoc, |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1031 | TP_PROTO(struct super_block *sb, |
| 1032 | struct inode *inode, |
| 1033 | ext4_group_t group, |
| 1034 | ext4_grpblk_t start, |
| 1035 | ext4_grpblk_t len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1036 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1037 | TP_ARGS(sb, inode, group, start, len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1038 | |
| 1039 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1040 | __field( dev_t, dev ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1041 | __field( ino_t, ino ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1042 | __field( int, result_start ) |
| 1043 | __field( __u32, result_group ) |
| 1044 | __field( int, result_len ) |
| 1045 | ), |
| 1046 | |
| 1047 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1048 | __entry->dev = sb->s_dev; |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1049 | __entry->ino = inode ? inode->i_ino : 0; |
| 1050 | __entry->result_start = start; |
| 1051 | __entry->result_group = group; |
| 1052 | __entry->result_len = len; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1053 | ), |
| 1054 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1055 | TP_printk("dev %d,%d inode %lu extent %u/%d/%d ", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1056 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1057 | (unsigned long) __entry->ino, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1058 | __entry->result_group, __entry->result_start, |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1059 | __entry->result_len) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1060 | ); |
| 1061 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 1062 | DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard, |
| 1063 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1064 | TP_PROTO(struct super_block *sb, |
| 1065 | struct inode *inode, |
| 1066 | ext4_group_t group, |
| 1067 | ext4_grpblk_t start, |
| 1068 | ext4_grpblk_t len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1069 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1070 | TP_ARGS(sb, inode, group, start, len) |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 1071 | ); |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1072 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 1073 | DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1074 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1075 | TP_PROTO(struct super_block *sb, |
| 1076 | struct inode *inode, |
| 1077 | ext4_group_t group, |
| 1078 | ext4_grpblk_t start, |
| 1079 | ext4_grpblk_t len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1080 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1081 | TP_ARGS(sb, inode, group, start, len) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1082 | ); |
| 1083 | |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1084 | TRACE_EVENT(ext4_forget, |
| 1085 | TP_PROTO(struct inode *inode, int is_metadata, __u64 block), |
| 1086 | |
| 1087 | TP_ARGS(inode, is_metadata, block), |
| 1088 | |
| 1089 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1090 | __field( dev_t, dev ) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1091 | __field( ino_t, ino ) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1092 | __field( __u64, block ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1093 | __field( int, is_metadata ) |
| 1094 | __field( __u16, mode ) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1095 | ), |
| 1096 | |
| 1097 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1098 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1099 | __entry->ino = inode->i_ino; |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1100 | __entry->block = block; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1101 | __entry->is_metadata = is_metadata; |
| 1102 | __entry->mode = inode->i_mode; |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1103 | ), |
| 1104 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1105 | TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1106 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1107 | (unsigned long) __entry->ino, |
| 1108 | __entry->mode, __entry->is_metadata, __entry->block) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1109 | ); |
| 1110 | |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1111 | TRACE_EVENT(ext4_da_update_reserve_space, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1112 | TP_PROTO(struct inode *inode, int used_blocks, int quota_claim), |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1113 | |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1114 | TP_ARGS(inode, used_blocks, quota_claim), |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1115 | |
| 1116 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1117 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1118 | __field( ino_t, ino ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1119 | __field( __u64, i_blocks ) |
| 1120 | __field( int, used_blocks ) |
| 1121 | __field( int, reserved_data_blocks ) |
| 1122 | __field( int, reserved_meta_blocks ) |
| 1123 | __field( int, allocated_meta_blocks ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1124 | __field( int, quota_claim ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1125 | __field( __u16, mode ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1126 | ), |
| 1127 | |
| 1128 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1129 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1130 | __entry->ino = inode->i_ino; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1131 | __entry->i_blocks = inode->i_blocks; |
| 1132 | __entry->used_blocks = used_blocks; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1133 | __entry->reserved_data_blocks = |
| 1134 | EXT4_I(inode)->i_reserved_data_blocks; |
| 1135 | __entry->reserved_meta_blocks = |
| 1136 | EXT4_I(inode)->i_reserved_meta_blocks; |
| 1137 | __entry->allocated_meta_blocks = |
| 1138 | EXT4_I(inode)->i_allocated_meta_blocks; |
| 1139 | __entry->quota_claim = quota_claim; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1140 | __entry->mode = inode->i_mode; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1141 | ), |
| 1142 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1143 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " |
| 1144 | "reserved_data_blocks %d reserved_meta_blocks %d " |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1145 | "allocated_meta_blocks %d quota_claim %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1146 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1147 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1148 | __entry->mode, __entry->i_blocks, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1149 | __entry->used_blocks, __entry->reserved_data_blocks, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1150 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks, |
| 1151 | __entry->quota_claim) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1152 | ); |
| 1153 | |
| 1154 | TRACE_EVENT(ext4_da_reserve_space, |
| 1155 | TP_PROTO(struct inode *inode, int md_needed), |
| 1156 | |
| 1157 | TP_ARGS(inode, md_needed), |
| 1158 | |
| 1159 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1160 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1161 | __field( ino_t, ino ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1162 | __field( __u64, i_blocks ) |
| 1163 | __field( int, md_needed ) |
| 1164 | __field( int, reserved_data_blocks ) |
| 1165 | __field( int, reserved_meta_blocks ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1166 | __field( __u16, mode ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1167 | ), |
| 1168 | |
| 1169 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1170 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1171 | __entry->ino = inode->i_ino; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1172 | __entry->i_blocks = inode->i_blocks; |
| 1173 | __entry->md_needed = md_needed; |
| 1174 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 1175 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1176 | __entry->mode = inode->i_mode; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1177 | ), |
| 1178 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1179 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d " |
| 1180 | "reserved_data_blocks %d reserved_meta_blocks %d", |
| 1181 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1182 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1183 | __entry->mode, __entry->i_blocks, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1184 | __entry->md_needed, __entry->reserved_data_blocks, |
| 1185 | __entry->reserved_meta_blocks) |
| 1186 | ); |
| 1187 | |
| 1188 | TRACE_EVENT(ext4_da_release_space, |
| 1189 | TP_PROTO(struct inode *inode, int freed_blocks), |
| 1190 | |
| 1191 | TP_ARGS(inode, freed_blocks), |
| 1192 | |
| 1193 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1194 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1195 | __field( ino_t, ino ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1196 | __field( __u64, i_blocks ) |
| 1197 | __field( int, freed_blocks ) |
| 1198 | __field( int, reserved_data_blocks ) |
| 1199 | __field( int, reserved_meta_blocks ) |
| 1200 | __field( int, allocated_meta_blocks ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1201 | __field( __u16, mode ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1202 | ), |
| 1203 | |
| 1204 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1205 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1206 | __entry->ino = inode->i_ino; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1207 | __entry->i_blocks = inode->i_blocks; |
| 1208 | __entry->freed_blocks = freed_blocks; |
| 1209 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 1210 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 1211 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1212 | __entry->mode = inode->i_mode; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1213 | ), |
| 1214 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1215 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d " |
| 1216 | "reserved_data_blocks %d reserved_meta_blocks %d " |
| 1217 | "allocated_meta_blocks %d", |
| 1218 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1219 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1220 | __entry->mode, __entry->i_blocks, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1221 | __entry->freed_blocks, __entry->reserved_data_blocks, |
| 1222 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) |
| 1223 | ); |
| 1224 | |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1225 | DECLARE_EVENT_CLASS(ext4__bitmap_load, |
| 1226 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1227 | |
| 1228 | TP_ARGS(sb, group), |
| 1229 | |
| 1230 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1231 | __field( dev_t, dev ) |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1232 | __field( __u32, group ) |
| 1233 | |
| 1234 | ), |
| 1235 | |
| 1236 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1237 | __entry->dev = sb->s_dev; |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1238 | __entry->group = group; |
| 1239 | ), |
| 1240 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1241 | TP_printk("dev %d,%d group %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1242 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1243 | __entry->group) |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1244 | ); |
| 1245 | |
| 1246 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, |
| 1247 | |
| 1248 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1249 | |
| 1250 | TP_ARGS(sb, group) |
| 1251 | ); |
| 1252 | |
| 1253 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load, |
| 1254 | |
| 1255 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1256 | |
| 1257 | TP_ARGS(sb, group) |
| 1258 | ); |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1259 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1260 | DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load, |
| 1261 | |
| 1262 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1263 | |
| 1264 | TP_ARGS(sb, group) |
| 1265 | ); |
| 1266 | |
| 1267 | DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap, |
| 1268 | |
| 1269 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1270 | |
| 1271 | TP_ARGS(sb, group) |
| 1272 | ); |
| 1273 | |
| 1274 | TRACE_EVENT(ext4_direct_IO_enter, |
| 1275 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), |
| 1276 | |
| 1277 | TP_ARGS(inode, offset, len, rw), |
| 1278 | |
| 1279 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1280 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1281 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1282 | __field( loff_t, pos ) |
| 1283 | __field( unsigned long, len ) |
| 1284 | __field( int, rw ) |
| 1285 | ), |
| 1286 | |
| 1287 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1288 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1289 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1290 | __entry->pos = offset; |
| 1291 | __entry->len = len; |
| 1292 | __entry->rw = rw; |
| 1293 | ), |
| 1294 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1295 | TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1296 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1297 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1298 | __entry->pos, __entry->len, __entry->rw) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1299 | ); |
| 1300 | |
| 1301 | TRACE_EVENT(ext4_direct_IO_exit, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1302 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, |
| 1303 | int rw, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1304 | |
| 1305 | TP_ARGS(inode, offset, len, rw, ret), |
| 1306 | |
| 1307 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1308 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1309 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1310 | __field( loff_t, pos ) |
| 1311 | __field( unsigned long, len ) |
| 1312 | __field( int, rw ) |
| 1313 | __field( int, ret ) |
| 1314 | ), |
| 1315 | |
| 1316 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1317 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1318 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1319 | __entry->pos = offset; |
| 1320 | __entry->len = len; |
| 1321 | __entry->rw = rw; |
| 1322 | __entry->ret = ret; |
| 1323 | ), |
| 1324 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1325 | TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1326 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1327 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1328 | __entry->pos, __entry->len, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1329 | __entry->rw, __entry->ret) |
| 1330 | ); |
| 1331 | |
| 1332 | TRACE_EVENT(ext4_fallocate_enter, |
| 1333 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), |
| 1334 | |
| 1335 | TP_ARGS(inode, offset, len, mode), |
| 1336 | |
| 1337 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1338 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1339 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1340 | __field( loff_t, pos ) |
| 1341 | __field( loff_t, len ) |
| 1342 | __field( int, mode ) |
| 1343 | ), |
| 1344 | |
| 1345 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1346 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1347 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1348 | __entry->pos = offset; |
| 1349 | __entry->len = len; |
| 1350 | __entry->mode = mode; |
| 1351 | ), |
| 1352 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1353 | TP_printk("dev %d,%d ino %lu pos %lld len %lld mode %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1354 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1355 | (unsigned long) __entry->ino, __entry->pos, |
| 1356 | __entry->len, __entry->mode) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1357 | ); |
| 1358 | |
| 1359 | TRACE_EVENT(ext4_fallocate_exit, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1360 | TP_PROTO(struct inode *inode, loff_t offset, |
| 1361 | unsigned int max_blocks, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1362 | |
| 1363 | TP_ARGS(inode, offset, max_blocks, ret), |
| 1364 | |
| 1365 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1366 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1367 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1368 | __field( loff_t, pos ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1369 | __field( unsigned int, blocks ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1370 | __field( int, ret ) |
| 1371 | ), |
| 1372 | |
| 1373 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1374 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1375 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1376 | __entry->pos = offset; |
| 1377 | __entry->blocks = max_blocks; |
| 1378 | __entry->ret = ret; |
| 1379 | ), |
| 1380 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1381 | TP_printk("dev %d,%d ino %lu pos %lld blocks %u ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1382 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1383 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1384 | __entry->pos, __entry->blocks, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1385 | __entry->ret) |
| 1386 | ); |
| 1387 | |
Zheng Liu | aaddea8 | 2013-01-16 20:21:26 -0500 | [diff] [blame] | 1388 | TRACE_EVENT(ext4_punch_hole, |
| 1389 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len), |
| 1390 | |
| 1391 | TP_ARGS(inode, offset, len), |
| 1392 | |
| 1393 | TP_STRUCT__entry( |
| 1394 | __field( dev_t, dev ) |
| 1395 | __field( ino_t, ino ) |
| 1396 | __field( loff_t, offset ) |
| 1397 | __field( loff_t, len ) |
| 1398 | ), |
| 1399 | |
| 1400 | TP_fast_assign( |
| 1401 | __entry->dev = inode->i_sb->s_dev; |
| 1402 | __entry->ino = inode->i_ino; |
| 1403 | __entry->offset = offset; |
| 1404 | __entry->len = len; |
| 1405 | ), |
| 1406 | |
| 1407 | TP_printk("dev %d,%d ino %lu offset %lld len %lld", |
| 1408 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1409 | (unsigned long) __entry->ino, |
| 1410 | __entry->offset, __entry->len) |
| 1411 | ); |
| 1412 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1413 | TRACE_EVENT(ext4_unlink_enter, |
| 1414 | TP_PROTO(struct inode *parent, struct dentry *dentry), |
| 1415 | |
| 1416 | TP_ARGS(parent, dentry), |
| 1417 | |
| 1418 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1419 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1420 | __field( ino_t, ino ) |
| 1421 | __field( ino_t, parent ) |
| 1422 | __field( loff_t, size ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1423 | ), |
| 1424 | |
| 1425 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1426 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1427 | __entry->ino = dentry->d_inode->i_ino; |
| 1428 | __entry->parent = parent->i_ino; |
| 1429 | __entry->size = dentry->d_inode->i_size; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1430 | ), |
| 1431 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1432 | TP_printk("dev %d,%d ino %lu size %lld parent %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1433 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1434 | (unsigned long) __entry->ino, __entry->size, |
| 1435 | (unsigned long) __entry->parent) |
| 1436 | ); |
| 1437 | |
| 1438 | TRACE_EVENT(ext4_unlink_exit, |
| 1439 | TP_PROTO(struct dentry *dentry, int ret), |
| 1440 | |
| 1441 | TP_ARGS(dentry, ret), |
| 1442 | |
| 1443 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1444 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1445 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1446 | __field( int, ret ) |
| 1447 | ), |
| 1448 | |
| 1449 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1450 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1451 | __entry->ino = dentry->d_inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1452 | __entry->ret = ret; |
| 1453 | ), |
| 1454 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1455 | TP_printk("dev %d,%d ino %lu ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1456 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1457 | (unsigned long) __entry->ino, |
| 1458 | __entry->ret) |
| 1459 | ); |
| 1460 | |
| 1461 | DECLARE_EVENT_CLASS(ext4__truncate, |
| 1462 | TP_PROTO(struct inode *inode), |
| 1463 | |
| 1464 | TP_ARGS(inode), |
| 1465 | |
| 1466 | TP_STRUCT__entry( |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1467 | __field( dev_t, dev ) |
| 1468 | __field( ino_t, ino ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1469 | __field( __u64, blocks ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1470 | ), |
| 1471 | |
| 1472 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1473 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1474 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1475 | __entry->blocks = inode->i_blocks; |
| 1476 | ), |
| 1477 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1478 | TP_printk("dev %d,%d ino %lu blocks %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1479 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1480 | (unsigned long) __entry->ino, __entry->blocks) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1481 | ); |
| 1482 | |
| 1483 | DEFINE_EVENT(ext4__truncate, ext4_truncate_enter, |
| 1484 | |
| 1485 | TP_PROTO(struct inode *inode), |
| 1486 | |
| 1487 | TP_ARGS(inode) |
| 1488 | ); |
| 1489 | |
| 1490 | DEFINE_EVENT(ext4__truncate, ext4_truncate_exit, |
| 1491 | |
| 1492 | TP_PROTO(struct inode *inode), |
| 1493 | |
| 1494 | TP_ARGS(inode) |
| 1495 | ); |
| 1496 | |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1497 | /* 'ux' is the uninitialized extent. */ |
| 1498 | TRACE_EVENT(ext4_ext_convert_to_initialized_enter, |
| 1499 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, |
| 1500 | struct ext4_extent *ux), |
| 1501 | |
| 1502 | TP_ARGS(inode, map, ux), |
| 1503 | |
| 1504 | TP_STRUCT__entry( |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1505 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1506 | __field( ino_t, ino ) |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1507 | __field( ext4_lblk_t, m_lblk ) |
| 1508 | __field( unsigned, m_len ) |
| 1509 | __field( ext4_lblk_t, u_lblk ) |
| 1510 | __field( unsigned, u_len ) |
| 1511 | __field( ext4_fsblk_t, u_pblk ) |
| 1512 | ), |
| 1513 | |
| 1514 | TP_fast_assign( |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1515 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1516 | __entry->ino = inode->i_ino; |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1517 | __entry->m_lblk = map->m_lblk; |
| 1518 | __entry->m_len = map->m_len; |
| 1519 | __entry->u_lblk = le32_to_cpu(ux->ee_block); |
| 1520 | __entry->u_len = ext4_ext_get_actual_len(ux); |
| 1521 | __entry->u_pblk = ext4_ext_pblock(ux); |
| 1522 | ), |
| 1523 | |
| 1524 | TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u " |
| 1525 | "u_pblk %llu", |
| 1526 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1527 | (unsigned long) __entry->ino, |
| 1528 | __entry->m_lblk, __entry->m_len, |
| 1529 | __entry->u_lblk, __entry->u_len, __entry->u_pblk) |
| 1530 | ); |
| 1531 | |
| 1532 | /* |
| 1533 | * 'ux' is the uninitialized extent. |
| 1534 | * 'ix' is the initialized extent to which blocks are transferred. |
| 1535 | */ |
| 1536 | TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath, |
| 1537 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, |
| 1538 | struct ext4_extent *ux, struct ext4_extent *ix), |
| 1539 | |
| 1540 | TP_ARGS(inode, map, ux, ix), |
| 1541 | |
| 1542 | TP_STRUCT__entry( |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1543 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1544 | __field( ino_t, ino ) |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1545 | __field( ext4_lblk_t, m_lblk ) |
| 1546 | __field( unsigned, m_len ) |
| 1547 | __field( ext4_lblk_t, u_lblk ) |
| 1548 | __field( unsigned, u_len ) |
| 1549 | __field( ext4_fsblk_t, u_pblk ) |
| 1550 | __field( ext4_lblk_t, i_lblk ) |
| 1551 | __field( unsigned, i_len ) |
| 1552 | __field( ext4_fsblk_t, i_pblk ) |
| 1553 | ), |
| 1554 | |
| 1555 | TP_fast_assign( |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1556 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1557 | __entry->ino = inode->i_ino; |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1558 | __entry->m_lblk = map->m_lblk; |
| 1559 | __entry->m_len = map->m_len; |
| 1560 | __entry->u_lblk = le32_to_cpu(ux->ee_block); |
| 1561 | __entry->u_len = ext4_ext_get_actual_len(ux); |
| 1562 | __entry->u_pblk = ext4_ext_pblock(ux); |
| 1563 | __entry->i_lblk = le32_to_cpu(ix->ee_block); |
| 1564 | __entry->i_len = ext4_ext_get_actual_len(ix); |
| 1565 | __entry->i_pblk = ext4_ext_pblock(ix); |
| 1566 | ), |
| 1567 | |
| 1568 | TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u " |
| 1569 | "u_lblk %u u_len %u u_pblk %llu " |
| 1570 | "i_lblk %u i_len %u i_pblk %llu ", |
| 1571 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1572 | (unsigned long) __entry->ino, |
| 1573 | __entry->m_lblk, __entry->m_len, |
| 1574 | __entry->u_lblk, __entry->u_len, __entry->u_pblk, |
| 1575 | __entry->i_lblk, __entry->i_len, __entry->i_pblk) |
| 1576 | ); |
| 1577 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1578 | DECLARE_EVENT_CLASS(ext4__map_blocks_enter, |
| 1579 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1580 | unsigned int len, unsigned int flags), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1581 | |
| 1582 | TP_ARGS(inode, lblk, len, flags), |
| 1583 | |
| 1584 | TP_STRUCT__entry( |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1585 | __field( dev_t, dev ) |
| 1586 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1587 | __field( ext4_lblk_t, lblk ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1588 | __field( unsigned int, len ) |
| 1589 | __field( unsigned int, flags ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1590 | ), |
| 1591 | |
| 1592 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1593 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1594 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1595 | __entry->lblk = lblk; |
| 1596 | __entry->len = len; |
| 1597 | __entry->flags = flags; |
| 1598 | ), |
| 1599 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1600 | TP_printk("dev %d,%d ino %lu lblk %u len %u flags %s", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1601 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1602 | (unsigned long) __entry->ino, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1603 | __entry->lblk, __entry->len, show_map_flags(__entry->flags)) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1604 | ); |
| 1605 | |
| 1606 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter, |
| 1607 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1608 | unsigned len, unsigned flags), |
| 1609 | |
| 1610 | TP_ARGS(inode, lblk, len, flags) |
| 1611 | ); |
| 1612 | |
| 1613 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter, |
| 1614 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1615 | unsigned len, unsigned flags), |
| 1616 | |
| 1617 | TP_ARGS(inode, lblk, len, flags) |
| 1618 | ); |
| 1619 | |
| 1620 | DECLARE_EVENT_CLASS(ext4__map_blocks_exit, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1621 | TP_PROTO(struct inode *inode, unsigned flags, struct ext4_map_blocks *map, |
| 1622 | int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1623 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1624 | TP_ARGS(inode, flags, map, ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1625 | |
| 1626 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1627 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1628 | __field( ino_t, ino ) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1629 | __field( unsigned int, flags ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1630 | __field( ext4_fsblk_t, pblk ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1631 | __field( ext4_lblk_t, lblk ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1632 | __field( unsigned int, len ) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1633 | __field( unsigned int, mflags ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1634 | __field( int, ret ) |
| 1635 | ), |
| 1636 | |
| 1637 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1638 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1639 | __entry->ino = inode->i_ino; |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1640 | __entry->flags = flags; |
Zheng Liu | 19b303d | 2012-11-08 14:34:04 -0500 | [diff] [blame] | 1641 | __entry->pblk = map->m_pblk; |
| 1642 | __entry->lblk = map->m_lblk; |
| 1643 | __entry->len = map->m_len; |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1644 | __entry->mflags = map->m_flags; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1645 | __entry->ret = ret; |
| 1646 | ), |
| 1647 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1648 | TP_printk("dev %d,%d ino %lu flags %s lblk %u pblk %llu len %u " |
| 1649 | "mflags %s ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1650 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1651 | (unsigned long) __entry->ino, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1652 | show_map_flags(__entry->flags), __entry->lblk, __entry->pblk, |
| 1653 | __entry->len, show_mflags(__entry->mflags), __entry->ret) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1654 | ); |
| 1655 | |
| 1656 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1657 | TP_PROTO(struct inode *inode, unsigned flags, |
| 1658 | struct ext4_map_blocks *map, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1659 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1660 | TP_ARGS(inode, flags, map, ret) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1661 | ); |
| 1662 | |
| 1663 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1664 | TP_PROTO(struct inode *inode, unsigned flags, |
| 1665 | struct ext4_map_blocks *map, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1666 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1667 | TP_ARGS(inode, flags, map, ret) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1668 | ); |
| 1669 | |
| 1670 | TRACE_EVENT(ext4_ext_load_extent, |
| 1671 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk), |
| 1672 | |
| 1673 | TP_ARGS(inode, lblk, pblk), |
| 1674 | |
| 1675 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1676 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1677 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1678 | __field( ext4_fsblk_t, pblk ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1679 | __field( ext4_lblk_t, lblk ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1680 | ), |
| 1681 | |
| 1682 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1683 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1684 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1685 | __entry->pblk = pblk; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1686 | __entry->lblk = lblk; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1687 | ), |
| 1688 | |
| 1689 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu", |
| 1690 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1691 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1692 | __entry->lblk, __entry->pblk) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1693 | ); |
| 1694 | |
| 1695 | TRACE_EVENT(ext4_load_inode, |
| 1696 | TP_PROTO(struct inode *inode), |
| 1697 | |
| 1698 | TP_ARGS(inode), |
| 1699 | |
| 1700 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1701 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1702 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1703 | ), |
| 1704 | |
| 1705 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1706 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1707 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1708 | ), |
| 1709 | |
| 1710 | TP_printk("dev %d,%d ino %ld", |
| 1711 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1712 | (unsigned long) __entry->ino) |
| 1713 | ); |
| 1714 | |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1715 | TRACE_EVENT(ext4_journal_start, |
Jan Kara | 5fe2fe8 | 2013-06-04 12:37:50 -0400 | [diff] [blame] | 1716 | TP_PROTO(struct super_block *sb, int blocks, int rsv_blocks, |
| 1717 | unsigned long IP), |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1718 | |
Jan Kara | 5fe2fe8 | 2013-06-04 12:37:50 -0400 | [diff] [blame] | 1719 | TP_ARGS(sb, blocks, rsv_blocks, IP), |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1720 | |
| 1721 | TP_STRUCT__entry( |
| 1722 | __field( dev_t, dev ) |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1723 | __field(unsigned long, ip ) |
Jan Kara | 5fe2fe8 | 2013-06-04 12:37:50 -0400 | [diff] [blame] | 1724 | __field( int, blocks ) |
| 1725 | __field( int, rsv_blocks ) |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1726 | ), |
| 1727 | |
| 1728 | TP_fast_assign( |
Jan Kara | 5fe2fe8 | 2013-06-04 12:37:50 -0400 | [diff] [blame] | 1729 | __entry->dev = sb->s_dev; |
| 1730 | __entry->ip = IP; |
| 1731 | __entry->blocks = blocks; |
| 1732 | __entry->rsv_blocks = rsv_blocks; |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1733 | ), |
| 1734 | |
Jan Kara | 5fe2fe8 | 2013-06-04 12:37:50 -0400 | [diff] [blame] | 1735 | TP_printk("dev %d,%d blocks, %d rsv_blocks, %d caller %pF", |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1736 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Jan Kara | 5fe2fe8 | 2013-06-04 12:37:50 -0400 | [diff] [blame] | 1737 | __entry->blocks, __entry->rsv_blocks, (void *)__entry->ip) |
| 1738 | ); |
| 1739 | |
| 1740 | TRACE_EVENT(ext4_journal_start_reserved, |
| 1741 | TP_PROTO(struct super_block *sb, int blocks, unsigned long IP), |
| 1742 | |
| 1743 | TP_ARGS(sb, blocks, IP), |
| 1744 | |
| 1745 | TP_STRUCT__entry( |
| 1746 | __field( dev_t, dev ) |
| 1747 | __field(unsigned long, ip ) |
| 1748 | __field( int, blocks ) |
| 1749 | ), |
| 1750 | |
| 1751 | TP_fast_assign( |
| 1752 | __entry->dev = sb->s_dev; |
| 1753 | __entry->ip = IP; |
| 1754 | __entry->blocks = blocks; |
| 1755 | ), |
| 1756 | |
| 1757 | TP_printk("dev %d,%d blocks, %d caller %pF", |
| 1758 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1759 | __entry->blocks, (void *)__entry->ip) |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1760 | ); |
| 1761 | |
Tao Ma | b3d4c2b | 2011-07-11 00:01:52 -0400 | [diff] [blame] | 1762 | DECLARE_EVENT_CLASS(ext4__trim, |
| 1763 | TP_PROTO(struct super_block *sb, |
| 1764 | ext4_group_t group, |
| 1765 | ext4_grpblk_t start, |
| 1766 | ext4_grpblk_t len), |
| 1767 | |
| 1768 | TP_ARGS(sb, group, start, len), |
| 1769 | |
| 1770 | TP_STRUCT__entry( |
| 1771 | __field( int, dev_major ) |
| 1772 | __field( int, dev_minor ) |
| 1773 | __field( __u32, group ) |
| 1774 | __field( int, start ) |
| 1775 | __field( int, len ) |
| 1776 | ), |
| 1777 | |
| 1778 | TP_fast_assign( |
| 1779 | __entry->dev_major = MAJOR(sb->s_dev); |
| 1780 | __entry->dev_minor = MINOR(sb->s_dev); |
| 1781 | __entry->group = group; |
| 1782 | __entry->start = start; |
| 1783 | __entry->len = len; |
| 1784 | ), |
| 1785 | |
| 1786 | TP_printk("dev %d,%d group %u, start %d, len %d", |
| 1787 | __entry->dev_major, __entry->dev_minor, |
| 1788 | __entry->group, __entry->start, __entry->len) |
| 1789 | ); |
| 1790 | |
| 1791 | DEFINE_EVENT(ext4__trim, ext4_trim_extent, |
| 1792 | |
| 1793 | TP_PROTO(struct super_block *sb, |
| 1794 | ext4_group_t group, |
| 1795 | ext4_grpblk_t start, |
| 1796 | ext4_grpblk_t len), |
| 1797 | |
| 1798 | TP_ARGS(sb, group, start, len) |
| 1799 | ); |
| 1800 | |
| 1801 | DEFINE_EVENT(ext4__trim, ext4_trim_all_free, |
| 1802 | |
| 1803 | TP_PROTO(struct super_block *sb, |
| 1804 | ext4_group_t group, |
| 1805 | ext4_grpblk_t start, |
| 1806 | ext4_grpblk_t len), |
| 1807 | |
| 1808 | TP_ARGS(sb, group, start, len) |
| 1809 | ); |
| 1810 | |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1811 | TRACE_EVENT(ext4_ext_handle_uninitialized_extents, |
Zheng Liu | b564553 | 2012-11-08 14:33:43 -0500 | [diff] [blame] | 1812 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int flags, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1813 | unsigned int allocated, ext4_fsblk_t newblock), |
| 1814 | |
Zheng Liu | b564553 | 2012-11-08 14:33:43 -0500 | [diff] [blame] | 1815 | TP_ARGS(inode, map, flags, allocated, newblock), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1816 | |
| 1817 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1818 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1819 | __field( ino_t, ino ) |
| 1820 | __field( int, flags ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1821 | __field( ext4_lblk_t, lblk ) |
| 1822 | __field( ext4_fsblk_t, pblk ) |
| 1823 | __field( unsigned int, len ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1824 | __field( unsigned int, allocated ) |
| 1825 | __field( ext4_fsblk_t, newblk ) |
| 1826 | ), |
| 1827 | |
| 1828 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1829 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1830 | __entry->ino = inode->i_ino; |
Zheng Liu | b564553 | 2012-11-08 14:33:43 -0500 | [diff] [blame] | 1831 | __entry->flags = flags; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1832 | __entry->lblk = map->m_lblk; |
| 1833 | __entry->pblk = map->m_pblk; |
| 1834 | __entry->len = map->m_len; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1835 | __entry->allocated = allocated; |
| 1836 | __entry->newblk = newblock; |
| 1837 | ), |
| 1838 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1839 | TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %s " |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1840 | "allocated %d newblock %llu", |
| 1841 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1842 | (unsigned long) __entry->ino, |
| 1843 | (unsigned) __entry->lblk, (unsigned long long) __entry->pblk, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1844 | __entry->len, show_map_flags(__entry->flags), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1845 | (unsigned int) __entry->allocated, |
| 1846 | (unsigned long long) __entry->newblk) |
| 1847 | ); |
| 1848 | |
| 1849 | TRACE_EVENT(ext4_get_implied_cluster_alloc_exit, |
| 1850 | TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret), |
| 1851 | |
| 1852 | TP_ARGS(sb, map, ret), |
| 1853 | |
| 1854 | TP_STRUCT__entry( |
| 1855 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1856 | __field( unsigned int, flags ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1857 | __field( ext4_lblk_t, lblk ) |
| 1858 | __field( ext4_fsblk_t, pblk ) |
| 1859 | __field( unsigned int, len ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1860 | __field( int, ret ) |
| 1861 | ), |
| 1862 | |
| 1863 | TP_fast_assign( |
| 1864 | __entry->dev = sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1865 | __entry->flags = map->m_flags; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1866 | __entry->lblk = map->m_lblk; |
| 1867 | __entry->pblk = map->m_pblk; |
| 1868 | __entry->len = map->m_len; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1869 | __entry->ret = ret; |
| 1870 | ), |
| 1871 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1872 | TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %s ret %d", |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1873 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1874 | __entry->lblk, (unsigned long long) __entry->pblk, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1875 | __entry->len, show_mflags(__entry->flags), __entry->ret) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1876 | ); |
| 1877 | |
| 1878 | TRACE_EVENT(ext4_ext_put_in_cache, |
| 1879 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len, |
| 1880 | ext4_fsblk_t start), |
| 1881 | |
| 1882 | TP_ARGS(inode, lblk, len, start), |
| 1883 | |
| 1884 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1885 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1886 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1887 | __field( ext4_lblk_t, lblk ) |
| 1888 | __field( unsigned int, len ) |
| 1889 | __field( ext4_fsblk_t, start ) |
| 1890 | ), |
| 1891 | |
| 1892 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1893 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1894 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1895 | __entry->lblk = lblk; |
| 1896 | __entry->len = len; |
| 1897 | __entry->start = start; |
| 1898 | ), |
| 1899 | |
| 1900 | TP_printk("dev %d,%d ino %lu lblk %u len %u start %llu", |
| 1901 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1902 | (unsigned long) __entry->ino, |
| 1903 | (unsigned) __entry->lblk, |
| 1904 | __entry->len, |
| 1905 | (unsigned long long) __entry->start) |
| 1906 | ); |
| 1907 | |
| 1908 | TRACE_EVENT(ext4_ext_in_cache, |
| 1909 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret), |
| 1910 | |
| 1911 | TP_ARGS(inode, lblk, ret), |
| 1912 | |
| 1913 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1914 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1915 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1916 | __field( ext4_lblk_t, lblk ) |
| 1917 | __field( int, ret ) |
| 1918 | ), |
| 1919 | |
| 1920 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1921 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1922 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1923 | __entry->lblk = lblk; |
| 1924 | __entry->ret = ret; |
| 1925 | ), |
| 1926 | |
| 1927 | TP_printk("dev %d,%d ino %lu lblk %u ret %d", |
| 1928 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1929 | (unsigned long) __entry->ino, |
| 1930 | (unsigned) __entry->lblk, |
| 1931 | __entry->ret) |
| 1932 | |
| 1933 | ); |
| 1934 | |
| 1935 | TRACE_EVENT(ext4_find_delalloc_range, |
| 1936 | TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to, |
| 1937 | int reverse, int found, ext4_lblk_t found_blk), |
| 1938 | |
| 1939 | TP_ARGS(inode, from, to, reverse, found, found_blk), |
| 1940 | |
| 1941 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1942 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1943 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1944 | __field( ext4_lblk_t, from ) |
| 1945 | __field( ext4_lblk_t, to ) |
| 1946 | __field( int, reverse ) |
| 1947 | __field( int, found ) |
| 1948 | __field( ext4_lblk_t, found_blk ) |
| 1949 | ), |
| 1950 | |
| 1951 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1952 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1953 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1954 | __entry->from = from; |
| 1955 | __entry->to = to; |
| 1956 | __entry->reverse = reverse; |
| 1957 | __entry->found = found; |
| 1958 | __entry->found_blk = found_blk; |
| 1959 | ), |
| 1960 | |
| 1961 | TP_printk("dev %d,%d ino %lu from %u to %u reverse %d found %d " |
| 1962 | "(blk = %u)", |
| 1963 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1964 | (unsigned long) __entry->ino, |
| 1965 | (unsigned) __entry->from, (unsigned) __entry->to, |
| 1966 | __entry->reverse, __entry->found, |
| 1967 | (unsigned) __entry->found_blk) |
| 1968 | ); |
| 1969 | |
| 1970 | TRACE_EVENT(ext4_get_reserved_cluster_alloc, |
| 1971 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len), |
| 1972 | |
| 1973 | TP_ARGS(inode, lblk, len), |
| 1974 | |
| 1975 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1976 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1977 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1978 | __field( ext4_lblk_t, lblk ) |
| 1979 | __field( unsigned int, len ) |
| 1980 | ), |
| 1981 | |
| 1982 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1983 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1984 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1985 | __entry->lblk = lblk; |
| 1986 | __entry->len = len; |
| 1987 | ), |
| 1988 | |
| 1989 | TP_printk("dev %d,%d ino %lu lblk %u len %u", |
| 1990 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1991 | (unsigned long) __entry->ino, |
| 1992 | (unsigned) __entry->lblk, |
| 1993 | __entry->len) |
| 1994 | ); |
| 1995 | |
| 1996 | TRACE_EVENT(ext4_ext_show_extent, |
| 1997 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk, |
| 1998 | unsigned short len), |
| 1999 | |
| 2000 | TP_ARGS(inode, lblk, pblk, len), |
| 2001 | |
| 2002 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2003 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2004 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2005 | __field( ext4_fsblk_t, pblk ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2006 | __field( ext4_lblk_t, lblk ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2007 | __field( unsigned short, len ) |
| 2008 | ), |
| 2009 | |
| 2010 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2011 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2012 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2013 | __entry->pblk = pblk; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2014 | __entry->lblk = lblk; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2015 | __entry->len = len; |
| 2016 | ), |
| 2017 | |
| 2018 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u", |
| 2019 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2020 | (unsigned long) __entry->ino, |
| 2021 | (unsigned) __entry->lblk, |
| 2022 | (unsigned long long) __entry->pblk, |
| 2023 | (unsigned short) __entry->len) |
| 2024 | ); |
| 2025 | |
| 2026 | TRACE_EVENT(ext4_remove_blocks, |
| 2027 | TP_PROTO(struct inode *inode, struct ext4_extent *ex, |
| 2028 | ext4_lblk_t from, ext4_fsblk_t to, |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2029 | long long partial_cluster), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2030 | |
| 2031 | TP_ARGS(inode, ex, from, to, partial_cluster), |
| 2032 | |
| 2033 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2034 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2035 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2036 | __field( ext4_lblk_t, from ) |
| 2037 | __field( ext4_lblk_t, to ) |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2038 | __field( long long, partial ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2039 | __field( ext4_fsblk_t, ee_pblk ) |
| 2040 | __field( ext4_lblk_t, ee_lblk ) |
| 2041 | __field( unsigned short, ee_len ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2042 | ), |
| 2043 | |
| 2044 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2045 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2046 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2047 | __entry->from = from; |
| 2048 | __entry->to = to; |
| 2049 | __entry->partial = partial_cluster; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2050 | __entry->ee_pblk = ext4_ext_pblock(ex); |
Theodore Ts'o | d6a7710 | 2013-04-09 23:59:55 -0400 | [diff] [blame] | 2051 | __entry->ee_lblk = le32_to_cpu(ex->ee_block); |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2052 | __entry->ee_len = ext4_ext_get_actual_len(ex); |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2053 | ), |
| 2054 | |
| 2055 | TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]" |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2056 | "from %u to %u partial_cluster %lld", |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2057 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2058 | (unsigned long) __entry->ino, |
| 2059 | (unsigned) __entry->ee_lblk, |
| 2060 | (unsigned long long) __entry->ee_pblk, |
| 2061 | (unsigned short) __entry->ee_len, |
| 2062 | (unsigned) __entry->from, |
| 2063 | (unsigned) __entry->to, |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2064 | (long long) __entry->partial) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2065 | ); |
| 2066 | |
| 2067 | TRACE_EVENT(ext4_ext_rm_leaf, |
| 2068 | TP_PROTO(struct inode *inode, ext4_lblk_t start, |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2069 | struct ext4_extent *ex, |
| 2070 | long long partial_cluster), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2071 | |
| 2072 | TP_ARGS(inode, start, ex, partial_cluster), |
| 2073 | |
| 2074 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2075 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2076 | __field( ino_t, ino ) |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2077 | __field( long long, partial ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2078 | __field( ext4_lblk_t, start ) |
| 2079 | __field( ext4_lblk_t, ee_lblk ) |
| 2080 | __field( ext4_fsblk_t, ee_pblk ) |
| 2081 | __field( short, ee_len ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2082 | ), |
| 2083 | |
| 2084 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2085 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2086 | __entry->ino = inode->i_ino; |
| 2087 | __entry->partial = partial_cluster; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2088 | __entry->start = start; |
| 2089 | __entry->ee_lblk = le32_to_cpu(ex->ee_block); |
| 2090 | __entry->ee_pblk = ext4_ext_pblock(ex); |
| 2091 | __entry->ee_len = ext4_ext_get_actual_len(ex); |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2092 | ), |
| 2093 | |
| 2094 | TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]" |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2095 | "partial_cluster %lld", |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2096 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2097 | (unsigned long) __entry->ino, |
| 2098 | (unsigned) __entry->start, |
| 2099 | (unsigned) __entry->ee_lblk, |
| 2100 | (unsigned long long) __entry->ee_pblk, |
| 2101 | (unsigned short) __entry->ee_len, |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2102 | (long long) __entry->partial) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2103 | ); |
| 2104 | |
| 2105 | TRACE_EVENT(ext4_ext_rm_idx, |
| 2106 | TP_PROTO(struct inode *inode, ext4_fsblk_t pblk), |
| 2107 | |
| 2108 | TP_ARGS(inode, pblk), |
| 2109 | |
| 2110 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2111 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2112 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2113 | __field( ext4_fsblk_t, pblk ) |
| 2114 | ), |
| 2115 | |
| 2116 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2117 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2118 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2119 | __entry->pblk = pblk; |
| 2120 | ), |
| 2121 | |
| 2122 | TP_printk("dev %d,%d ino %lu index_pblk %llu", |
| 2123 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2124 | (unsigned long) __entry->ino, |
| 2125 | (unsigned long long) __entry->pblk) |
| 2126 | ); |
| 2127 | |
| 2128 | TRACE_EVENT(ext4_ext_remove_space, |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2129 | TP_PROTO(struct inode *inode, ext4_lblk_t start, |
| 2130 | ext4_lblk_t end, int depth), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2131 | |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2132 | TP_ARGS(inode, start, end, depth), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2133 | |
| 2134 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2135 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2136 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2137 | __field( ext4_lblk_t, start ) |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2138 | __field( ext4_lblk_t, end ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2139 | __field( int, depth ) |
| 2140 | ), |
| 2141 | |
| 2142 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2143 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2144 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2145 | __entry->start = start; |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2146 | __entry->end = end; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2147 | __entry->depth = depth; |
| 2148 | ), |
| 2149 | |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2150 | TP_printk("dev %d,%d ino %lu since %u end %u depth %d", |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2151 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2152 | (unsigned long) __entry->ino, |
| 2153 | (unsigned) __entry->start, |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2154 | (unsigned) __entry->end, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2155 | __entry->depth) |
| 2156 | ); |
| 2157 | |
| 2158 | TRACE_EVENT(ext4_ext_remove_space_done, |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2159 | TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end, |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2160 | int depth, long long partial, __le16 eh_entries), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2161 | |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2162 | TP_ARGS(inode, start, end, depth, partial, eh_entries), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2163 | |
| 2164 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2165 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2166 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2167 | __field( ext4_lblk_t, start ) |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2168 | __field( ext4_lblk_t, end ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2169 | __field( int, depth ) |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2170 | __field( long long, partial ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2171 | __field( unsigned short, eh_entries ) |
| 2172 | ), |
| 2173 | |
| 2174 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2175 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2176 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2177 | __entry->start = start; |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2178 | __entry->end = end; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2179 | __entry->depth = depth; |
| 2180 | __entry->partial = partial; |
Theodore Ts'o | d6a7710 | 2013-04-09 23:59:55 -0400 | [diff] [blame] | 2181 | __entry->eh_entries = le16_to_cpu(eh_entries); |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2182 | ), |
| 2183 | |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2184 | TP_printk("dev %d,%d ino %lu since %u end %u depth %d partial %lld " |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2185 | "remaining_entries %u", |
| 2186 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2187 | (unsigned long) __entry->ino, |
| 2188 | (unsigned) __entry->start, |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2189 | (unsigned) __entry->end, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2190 | __entry->depth, |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2191 | (long long) __entry->partial, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2192 | (unsigned short) __entry->eh_entries) |
| 2193 | ); |
| 2194 | |
Theodore Ts'o | 107a7bd | 2013-08-16 21:23:41 -0400 | [diff] [blame^] | 2195 | DECLARE_EVENT_CLASS(ext4__es_extent, |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2196 | TP_PROTO(struct inode *inode, struct extent_status *es), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2197 | |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2198 | TP_ARGS(inode, es), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2199 | |
| 2200 | TP_STRUCT__entry( |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2201 | __field( dev_t, dev ) |
| 2202 | __field( ino_t, ino ) |
| 2203 | __field( ext4_lblk_t, lblk ) |
| 2204 | __field( ext4_lblk_t, len ) |
| 2205 | __field( ext4_fsblk_t, pblk ) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2206 | __field( char, status ) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2207 | ), |
| 2208 | |
| 2209 | TP_fast_assign( |
| 2210 | __entry->dev = inode->i_sb->s_dev; |
| 2211 | __entry->ino = inode->i_ino; |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2212 | __entry->lblk = es->es_lblk; |
| 2213 | __entry->len = es->es_len; |
| 2214 | __entry->pblk = ext4_es_pblock(es); |
Theodore Ts'o | 3be78c7 | 2013-08-16 21:22:41 -0400 | [diff] [blame] | 2215 | __entry->status = ext4_es_status(es); |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2216 | ), |
| 2217 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2218 | TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s", |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2219 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2220 | (unsigned long) __entry->ino, |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2221 | __entry->lblk, __entry->len, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2222 | __entry->pblk, show_extent_status(__entry->status)) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2223 | ); |
| 2224 | |
Theodore Ts'o | 107a7bd | 2013-08-16 21:23:41 -0400 | [diff] [blame^] | 2225 | DEFINE_EVENT(ext4__es_extent, ext4_es_insert_extent, |
| 2226 | TP_PROTO(struct inode *inode, struct extent_status *es), |
| 2227 | |
| 2228 | TP_ARGS(inode, es) |
| 2229 | ); |
| 2230 | |
| 2231 | DEFINE_EVENT(ext4__es_extent, ext4_es_cache_extent, |
| 2232 | TP_PROTO(struct inode *inode, struct extent_status *es), |
| 2233 | |
| 2234 | TP_ARGS(inode, es) |
| 2235 | ); |
| 2236 | |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2237 | TRACE_EVENT(ext4_es_remove_extent, |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2238 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2239 | |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2240 | TP_ARGS(inode, lblk, len), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2241 | |
| 2242 | TP_STRUCT__entry( |
| 2243 | __field( dev_t, dev ) |
| 2244 | __field( ino_t, ino ) |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2245 | __field( loff_t, lblk ) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2246 | __field( loff_t, len ) |
| 2247 | ), |
| 2248 | |
| 2249 | TP_fast_assign( |
| 2250 | __entry->dev = inode->i_sb->s_dev; |
| 2251 | __entry->ino = inode->i_ino; |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2252 | __entry->lblk = lblk; |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2253 | __entry->len = len; |
| 2254 | ), |
| 2255 | |
| 2256 | TP_printk("dev %d,%d ino %lu es [%lld/%lld)", |
| 2257 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2258 | (unsigned long) __entry->ino, |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2259 | __entry->lblk, __entry->len) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2260 | ); |
| 2261 | |
Yan, Zheng | e30b5dc | 2013-05-03 02:15:52 -0400 | [diff] [blame] | 2262 | TRACE_EVENT(ext4_es_find_delayed_extent_range_enter, |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2263 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2264 | |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2265 | TP_ARGS(inode, lblk), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2266 | |
| 2267 | TP_STRUCT__entry( |
| 2268 | __field( dev_t, dev ) |
| 2269 | __field( ino_t, ino ) |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2270 | __field( ext4_lblk_t, lblk ) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2271 | ), |
| 2272 | |
| 2273 | TP_fast_assign( |
| 2274 | __entry->dev = inode->i_sb->s_dev; |
| 2275 | __entry->ino = inode->i_ino; |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2276 | __entry->lblk = lblk; |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2277 | ), |
| 2278 | |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2279 | TP_printk("dev %d,%d ino %lu lblk %u", |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2280 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2281 | (unsigned long) __entry->ino, __entry->lblk) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2282 | ); |
| 2283 | |
Yan, Zheng | e30b5dc | 2013-05-03 02:15:52 -0400 | [diff] [blame] | 2284 | TRACE_EVENT(ext4_es_find_delayed_extent_range_exit, |
Zheng Liu | be40136 | 2013-02-18 00:27:26 -0500 | [diff] [blame] | 2285 | TP_PROTO(struct inode *inode, struct extent_status *es), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2286 | |
Zheng Liu | be40136 | 2013-02-18 00:27:26 -0500 | [diff] [blame] | 2287 | TP_ARGS(inode, es), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2288 | |
| 2289 | TP_STRUCT__entry( |
| 2290 | __field( dev_t, dev ) |
| 2291 | __field( ino_t, ino ) |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2292 | __field( ext4_lblk_t, lblk ) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2293 | __field( ext4_lblk_t, len ) |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2294 | __field( ext4_fsblk_t, pblk ) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2295 | __field( char, status ) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2296 | ), |
| 2297 | |
| 2298 | TP_fast_assign( |
| 2299 | __entry->dev = inode->i_sb->s_dev; |
| 2300 | __entry->ino = inode->i_ino; |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2301 | __entry->lblk = es->es_lblk; |
| 2302 | __entry->len = es->es_len; |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2303 | __entry->pblk = ext4_es_pblock(es); |
Theodore Ts'o | 3be78c7 | 2013-08-16 21:22:41 -0400 | [diff] [blame] | 2304 | __entry->status = ext4_es_status(es); |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2305 | ), |
| 2306 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2307 | TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s", |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2308 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2309 | (unsigned long) __entry->ino, |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2310 | __entry->lblk, __entry->len, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2311 | __entry->pblk, show_extent_status(__entry->status)) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2312 | ); |
| 2313 | |
Zheng Liu | d100eef | 2013-02-18 00:29:59 -0500 | [diff] [blame] | 2314 | TRACE_EVENT(ext4_es_lookup_extent_enter, |
| 2315 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk), |
| 2316 | |
| 2317 | TP_ARGS(inode, lblk), |
| 2318 | |
| 2319 | TP_STRUCT__entry( |
| 2320 | __field( dev_t, dev ) |
| 2321 | __field( ino_t, ino ) |
| 2322 | __field( ext4_lblk_t, lblk ) |
| 2323 | ), |
| 2324 | |
| 2325 | TP_fast_assign( |
| 2326 | __entry->dev = inode->i_sb->s_dev; |
| 2327 | __entry->ino = inode->i_ino; |
| 2328 | __entry->lblk = lblk; |
| 2329 | ), |
| 2330 | |
| 2331 | TP_printk("dev %d,%d ino %lu lblk %u", |
| 2332 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2333 | (unsigned long) __entry->ino, __entry->lblk) |
| 2334 | ); |
| 2335 | |
| 2336 | TRACE_EVENT(ext4_es_lookup_extent_exit, |
| 2337 | TP_PROTO(struct inode *inode, struct extent_status *es, |
| 2338 | int found), |
| 2339 | |
| 2340 | TP_ARGS(inode, es, found), |
| 2341 | |
| 2342 | TP_STRUCT__entry( |
| 2343 | __field( dev_t, dev ) |
| 2344 | __field( ino_t, ino ) |
| 2345 | __field( ext4_lblk_t, lblk ) |
| 2346 | __field( ext4_lblk_t, len ) |
| 2347 | __field( ext4_fsblk_t, pblk ) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2348 | __field( char, status ) |
Zheng Liu | d100eef | 2013-02-18 00:29:59 -0500 | [diff] [blame] | 2349 | __field( int, found ) |
| 2350 | ), |
| 2351 | |
| 2352 | TP_fast_assign( |
| 2353 | __entry->dev = inode->i_sb->s_dev; |
| 2354 | __entry->ino = inode->i_ino; |
| 2355 | __entry->lblk = es->es_lblk; |
| 2356 | __entry->len = es->es_len; |
| 2357 | __entry->pblk = ext4_es_pblock(es); |
Theodore Ts'o | 3be78c7 | 2013-08-16 21:22:41 -0400 | [diff] [blame] | 2358 | __entry->status = ext4_es_status(es); |
Zheng Liu | d100eef | 2013-02-18 00:29:59 -0500 | [diff] [blame] | 2359 | __entry->found = found; |
| 2360 | ), |
| 2361 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2362 | TP_printk("dev %d,%d ino %lu found %d [%u/%u) %llu %s", |
Zheng Liu | d100eef | 2013-02-18 00:29:59 -0500 | [diff] [blame] | 2363 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2364 | (unsigned long) __entry->ino, __entry->found, |
| 2365 | __entry->lblk, __entry->len, |
| 2366 | __entry->found ? __entry->pblk : 0, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2367 | show_extent_status(__entry->found ? __entry->status : 0)) |
Zheng Liu | d100eef | 2013-02-18 00:29:59 -0500 | [diff] [blame] | 2368 | ); |
| 2369 | |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2370 | TRACE_EVENT(ext4_es_shrink_enter, |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2371 | TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt), |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2372 | |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2373 | TP_ARGS(sb, nr_to_scan, cache_cnt), |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2374 | |
| 2375 | TP_STRUCT__entry( |
| 2376 | __field( dev_t, dev ) |
| 2377 | __field( int, nr_to_scan ) |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2378 | __field( int, cache_cnt ) |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2379 | ), |
| 2380 | |
| 2381 | TP_fast_assign( |
| 2382 | __entry->dev = sb->s_dev; |
| 2383 | __entry->nr_to_scan = nr_to_scan; |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2384 | __entry->cache_cnt = cache_cnt; |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2385 | ), |
| 2386 | |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2387 | TP_printk("dev %d,%d nr_to_scan %d cache_cnt %d", |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2388 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2389 | __entry->nr_to_scan, __entry->cache_cnt) |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2390 | ); |
| 2391 | |
| 2392 | TRACE_EVENT(ext4_es_shrink_exit, |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2393 | TP_PROTO(struct super_block *sb, int shrunk_nr, int cache_cnt), |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2394 | |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2395 | TP_ARGS(sb, shrunk_nr, cache_cnt), |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2396 | |
| 2397 | TP_STRUCT__entry( |
| 2398 | __field( dev_t, dev ) |
| 2399 | __field( int, shrunk_nr ) |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2400 | __field( int, cache_cnt ) |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2401 | ), |
| 2402 | |
| 2403 | TP_fast_assign( |
| 2404 | __entry->dev = sb->s_dev; |
| 2405 | __entry->shrunk_nr = shrunk_nr; |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2406 | __entry->cache_cnt = cache_cnt; |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2407 | ), |
| 2408 | |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2409 | TP_printk("dev %d,%d shrunk_nr %d cache_cnt %d", |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2410 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2411 | __entry->shrunk_nr, __entry->cache_cnt) |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2412 | ); |
| 2413 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 2414 | #endif /* _TRACE_EXT4_H */ |
| 2415 | |
| 2416 | /* This part must be outside protection */ |
| 2417 | #include <trace/define_trace.h> |