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