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