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