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; |
| 12 | struct ext4_prealloc_space; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 13 | struct ext4_inode_info; |
Josh Stone | 0ef1224 | 2009-09-30 00:51:22 -0400 | [diff] [blame] | 14 | struct mpage_da_data; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 15 | |
| 16 | #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] | 17 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 18 | TRACE_EVENT(ext4_free_inode, |
| 19 | TP_PROTO(struct inode *inode), |
| 20 | |
| 21 | TP_ARGS(inode), |
| 22 | |
| 23 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 24 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 25 | __field( ino_t, ino ) |
| 26 | __field( umode_t, mode ) |
| 27 | __field( uid_t, uid ) |
| 28 | __field( gid_t, gid ) |
| 29 | __field( blkcnt_t, blocks ) |
| 30 | ), |
| 31 | |
| 32 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 33 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 34 | __entry->ino = inode->i_ino; |
| 35 | __entry->mode = inode->i_mode; |
| 36 | __entry->uid = inode->i_uid; |
| 37 | __entry->gid = inode->i_gid; |
| 38 | __entry->blocks = inode->i_blocks; |
| 39 | ), |
| 40 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 41 | 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] | 42 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 43 | (unsigned long) __entry->ino, |
| 44 | __entry->mode, __entry->uid, __entry->gid, |
Theodore Ts'o | 627ad9f | 2009-06-20 23:21:41 -0400 | [diff] [blame] | 45 | (unsigned long long) __entry->blocks) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 46 | ); |
| 47 | |
| 48 | TRACE_EVENT(ext4_request_inode, |
| 49 | TP_PROTO(struct inode *dir, int mode), |
| 50 | |
| 51 | TP_ARGS(dir, mode), |
| 52 | |
| 53 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 54 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 55 | __field( ino_t, dir ) |
| 56 | __field( umode_t, mode ) |
| 57 | ), |
| 58 | |
| 59 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 60 | __entry->dev = dir->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 61 | __entry->dir = dir->i_ino; |
| 62 | __entry->mode = mode; |
| 63 | ), |
| 64 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 65 | TP_printk("dev %d,%d dir %lu mode 0%o", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 66 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 67 | (unsigned long) __entry->dir, __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 68 | ); |
| 69 | |
| 70 | TRACE_EVENT(ext4_allocate_inode, |
| 71 | TP_PROTO(struct inode *inode, struct inode *dir, int mode), |
| 72 | |
| 73 | TP_ARGS(inode, dir, mode), |
| 74 | |
| 75 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 76 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 77 | __field( ino_t, ino ) |
| 78 | __field( ino_t, dir ) |
| 79 | __field( umode_t, mode ) |
| 80 | ), |
| 81 | |
| 82 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 83 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 84 | __entry->ino = inode->i_ino; |
| 85 | __entry->dir = dir->i_ino; |
| 86 | __entry->mode = mode; |
| 87 | ), |
| 88 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 89 | TP_printk("dev %d,%d ino %lu dir %lu mode 0%o", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 90 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 91 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 92 | (unsigned long) __entry->dir, __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 93 | ); |
| 94 | |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 95 | TRACE_EVENT(ext4_evict_inode, |
| 96 | TP_PROTO(struct inode *inode), |
| 97 | |
| 98 | TP_ARGS(inode), |
| 99 | |
| 100 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 101 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 102 | __field( ino_t, ino ) |
| 103 | __field( int, nlink ) |
| 104 | ), |
| 105 | |
| 106 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 107 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 108 | __entry->ino = inode->i_ino; |
| 109 | __entry->nlink = inode->i_nlink; |
| 110 | ), |
| 111 | |
| 112 | TP_printk("dev %d,%d ino %lu nlink %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 113 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 114 | (unsigned long) __entry->ino, __entry->nlink) |
| 115 | ); |
| 116 | |
| 117 | TRACE_EVENT(ext4_drop_inode, |
| 118 | TP_PROTO(struct inode *inode, int drop), |
| 119 | |
| 120 | TP_ARGS(inode, drop), |
| 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 | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 124 | __field( ino_t, ino ) |
| 125 | __field( int, drop ) |
| 126 | ), |
| 127 | |
| 128 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 129 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 130 | __entry->ino = inode->i_ino; |
| 131 | __entry->drop = drop; |
| 132 | ), |
| 133 | |
| 134 | TP_printk("dev %d,%d ino %lu drop %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 135 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 136 | (unsigned long) __entry->ino, __entry->drop) |
| 137 | ); |
| 138 | |
| 139 | TRACE_EVENT(ext4_mark_inode_dirty, |
| 140 | TP_PROTO(struct inode *inode, unsigned long IP), |
| 141 | |
| 142 | TP_ARGS(inode, IP), |
| 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 | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 146 | __field( ino_t, ino ) |
| 147 | __field(unsigned long, ip ) |
| 148 | ), |
| 149 | |
| 150 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 151 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 152 | __entry->ino = inode->i_ino; |
| 153 | __entry->ip = IP; |
| 154 | ), |
| 155 | |
| 156 | TP_printk("dev %d,%d ino %lu caller %pF", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 157 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 158 | (unsigned long) __entry->ino, (void *)__entry->ip) |
| 159 | ); |
| 160 | |
| 161 | TRACE_EVENT(ext4_begin_ordered_truncate, |
| 162 | TP_PROTO(struct inode *inode, loff_t new_size), |
| 163 | |
| 164 | TP_ARGS(inode, new_size), |
| 165 | |
| 166 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 167 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 168 | __field( ino_t, ino ) |
| 169 | __field( loff_t, new_size ) |
| 170 | ), |
| 171 | |
| 172 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 173 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 174 | __entry->ino = inode->i_ino; |
| 175 | __entry->new_size = new_size; |
| 176 | ), |
| 177 | |
| 178 | TP_printk("dev %d,%d ino %lu new_size %lld", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 179 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 180 | (unsigned long) __entry->ino, |
| 181 | (long long) __entry->new_size) |
| 182 | ); |
| 183 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 184 | DECLARE_EVENT_CLASS(ext4__write_begin, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 185 | |
| 186 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 187 | unsigned int flags), |
| 188 | |
| 189 | TP_ARGS(inode, pos, len, flags), |
| 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 | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 193 | __field( ino_t, ino ) |
| 194 | __field( loff_t, pos ) |
| 195 | __field( unsigned int, len ) |
| 196 | __field( unsigned int, flags ) |
| 197 | ), |
| 198 | |
| 199 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 200 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 201 | __entry->ino = inode->i_ino; |
| 202 | __entry->pos = pos; |
| 203 | __entry->len = len; |
| 204 | __entry->flags = flags; |
| 205 | ), |
| 206 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 207 | TP_printk("dev %d,%d ino %lu pos %llu len %u flags %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 208 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 209 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 210 | __entry->pos, __entry->len, __entry->flags) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 211 | ); |
| 212 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 213 | DEFINE_EVENT(ext4__write_begin, ext4_write_begin, |
| 214 | |
| 215 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 216 | unsigned int flags), |
| 217 | |
| 218 | TP_ARGS(inode, pos, len, flags) |
| 219 | ); |
| 220 | |
| 221 | DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin, |
| 222 | |
| 223 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 224 | unsigned int flags), |
| 225 | |
| 226 | TP_ARGS(inode, pos, len, flags) |
| 227 | ); |
| 228 | |
| 229 | DECLARE_EVENT_CLASS(ext4__write_end, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 230 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 231 | unsigned int copied), |
| 232 | |
| 233 | TP_ARGS(inode, pos, len, copied), |
| 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 | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 237 | __field( ino_t, ino ) |
| 238 | __field( loff_t, pos ) |
| 239 | __field( unsigned int, len ) |
| 240 | __field( unsigned int, copied ) |
| 241 | ), |
| 242 | |
| 243 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 244 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 245 | __entry->ino = inode->i_ino; |
| 246 | __entry->pos = pos; |
| 247 | __entry->len = len; |
| 248 | __entry->copied = copied; |
| 249 | ), |
| 250 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 251 | TP_printk("dev %d,%d ino %lu pos %llu len %u copied %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 252 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 253 | (unsigned long) __entry->ino, |
| 254 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 255 | ); |
| 256 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 257 | DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, |
| 258 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 259 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 260 | unsigned int copied), |
| 261 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 262 | TP_ARGS(inode, pos, len, copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 263 | ); |
| 264 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 265 | DEFINE_EVENT(ext4__write_end, ext4_writeback_write_end, |
| 266 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 267 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 268 | unsigned int copied), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 269 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 270 | TP_ARGS(inode, pos, len, copied) |
| 271 | ); |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 272 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 273 | DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 274 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 275 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 276 | unsigned int copied), |
| 277 | |
| 278 | TP_ARGS(inode, pos, len, copied) |
| 279 | ); |
| 280 | |
| 281 | DEFINE_EVENT(ext4__write_end, ext4_da_write_end, |
| 282 | |
| 283 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 284 | unsigned int copied), |
| 285 | |
| 286 | TP_ARGS(inode, pos, len, copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 287 | ); |
| 288 | |
Aneesh Kumar K.V | 43ce1d2 | 2009-06-14 17:58:45 -0400 | [diff] [blame] | 289 | TRACE_EVENT(ext4_writepage, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 290 | TP_PROTO(struct inode *inode, struct page *page), |
| 291 | |
| 292 | TP_ARGS(inode, page), |
| 293 | |
| 294 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 295 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 296 | __field( ino_t, ino ) |
| 297 | __field( pgoff_t, index ) |
| 298 | |
| 299 | ), |
| 300 | |
| 301 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 302 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 303 | __entry->ino = inode->i_ino; |
| 304 | __entry->index = page->index; |
| 305 | ), |
| 306 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 307 | TP_printk("dev %d,%d ino %lu page_index %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 308 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 309 | (unsigned long) __entry->ino, __entry->index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 310 | ); |
| 311 | |
| 312 | TRACE_EVENT(ext4_da_writepages, |
| 313 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), |
| 314 | |
| 315 | TP_ARGS(inode, wbc), |
| 316 | |
| 317 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 318 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 319 | __field( ino_t, ino ) |
| 320 | __field( long, nr_to_write ) |
| 321 | __field( long, pages_skipped ) |
| 322 | __field( loff_t, range_start ) |
| 323 | __field( loff_t, range_end ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 324 | __field( int, sync_mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 325 | __field( char, for_kupdate ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 326 | __field( char, range_cyclic ) |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 327 | __field( pgoff_t, writeback_index ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 328 | ), |
| 329 | |
| 330 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 331 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 332 | __entry->ino = inode->i_ino; |
| 333 | __entry->nr_to_write = wbc->nr_to_write; |
| 334 | __entry->pages_skipped = wbc->pages_skipped; |
| 335 | __entry->range_start = wbc->range_start; |
| 336 | __entry->range_end = wbc->range_end; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 337 | __entry->sync_mode = wbc->sync_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 338 | __entry->for_kupdate = wbc->for_kupdate; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 339 | __entry->range_cyclic = wbc->range_cyclic; |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 340 | __entry->writeback_index = inode->i_mapping->writeback_index; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 341 | ), |
| 342 | |
Theodore Ts'o | a107e5a | 2010-10-27 23:44:47 -0400 | [diff] [blame] | 343 | TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld " |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 344 | "range_start %llu range_end %llu sync_mode %d" |
| 345 | "for_kupdate %d range_cyclic %d writeback_index %lu", |
| 346 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 347 | (unsigned long) __entry->ino, __entry->nr_to_write, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 348 | __entry->pages_skipped, __entry->range_start, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 349 | __entry->range_end, __entry->sync_mode, |
| 350 | __entry->for_kupdate, __entry->range_cyclic, |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 351 | (unsigned long) __entry->writeback_index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 352 | ); |
| 353 | |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 354 | TRACE_EVENT(ext4_da_write_pages, |
| 355 | TP_PROTO(struct inode *inode, struct mpage_da_data *mpd), |
| 356 | |
| 357 | TP_ARGS(inode, mpd), |
| 358 | |
| 359 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 360 | __field( dev_t, dev ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 361 | __field( ino_t, ino ) |
| 362 | __field( __u64, b_blocknr ) |
| 363 | __field( __u32, b_size ) |
| 364 | __field( __u32, b_state ) |
| 365 | __field( unsigned long, first_page ) |
| 366 | __field( int, io_done ) |
| 367 | __field( int, pages_written ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 368 | __field( int, sync_mode ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 369 | ), |
| 370 | |
| 371 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 372 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 373 | __entry->ino = inode->i_ino; |
| 374 | __entry->b_blocknr = mpd->b_blocknr; |
| 375 | __entry->b_size = mpd->b_size; |
| 376 | __entry->b_state = mpd->b_state; |
| 377 | __entry->first_page = mpd->first_page; |
| 378 | __entry->io_done = mpd->io_done; |
| 379 | __entry->pages_written = mpd->pages_written; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 380 | __entry->sync_mode = mpd->wbc->sync_mode; |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 381 | ), |
| 382 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 383 | TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x " |
| 384 | "first_page %lu io_done %d pages_written %d sync_mode %d", |
| 385 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 386 | (unsigned long) __entry->ino, |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 387 | __entry->b_blocknr, __entry->b_size, |
| 388 | __entry->b_state, __entry->first_page, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 389 | __entry->io_done, __entry->pages_written, |
| 390 | __entry->sync_mode |
| 391 | ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 392 | ); |
| 393 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 394 | TRACE_EVENT(ext4_da_writepages_result, |
| 395 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, |
| 396 | int ret, int pages_written), |
| 397 | |
| 398 | TP_ARGS(inode, wbc, ret, pages_written), |
| 399 | |
| 400 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 401 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 402 | __field( ino_t, ino ) |
| 403 | __field( int, ret ) |
| 404 | __field( int, pages_written ) |
| 405 | __field( long, pages_skipped ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 406 | __field( int, sync_mode ) |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 407 | __field( pgoff_t, writeback_index ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 408 | ), |
| 409 | |
| 410 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 411 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 412 | __entry->ino = inode->i_ino; |
| 413 | __entry->ret = ret; |
| 414 | __entry->pages_written = pages_written; |
| 415 | __entry->pages_skipped = wbc->pages_skipped; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 416 | __entry->sync_mode = wbc->sync_mode; |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 417 | __entry->writeback_index = inode->i_mapping->writeback_index; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 418 | ), |
| 419 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 420 | 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^] | 421 | "sync_mode %d writeback_index %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 422 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 423 | (unsigned long) __entry->ino, __entry->ret, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 424 | __entry->pages_written, __entry->pages_skipped, |
Wu Fengguang | b7a2441 | 2010-07-21 22:19:51 -0600 | [diff] [blame^] | 425 | __entry->sync_mode, |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 426 | (unsigned long) __entry->writeback_index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 427 | ); |
| 428 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 429 | DECLARE_EVENT_CLASS(ext4__page_op, |
| 430 | TP_PROTO(struct page *page), |
| 431 | |
| 432 | TP_ARGS(page), |
| 433 | |
| 434 | TP_STRUCT__entry( |
| 435 | __field( pgoff_t, index ) |
| 436 | __field( ino_t, ino ) |
| 437 | __field( dev_t, dev ) |
| 438 | |
| 439 | ), |
| 440 | |
| 441 | TP_fast_assign( |
| 442 | __entry->index = page->index; |
| 443 | __entry->ino = page->mapping->host->i_ino; |
| 444 | __entry->dev = page->mapping->host->i_sb->s_dev; |
| 445 | ), |
| 446 | |
| 447 | TP_printk("dev %d,%d ino %lu page_index %lu", |
| 448 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 449 | (unsigned long) __entry->ino, |
| 450 | __entry->index) |
| 451 | ); |
| 452 | |
| 453 | DEFINE_EVENT(ext4__page_op, ext4_readpage, |
| 454 | |
| 455 | TP_PROTO(struct page *page), |
| 456 | |
| 457 | TP_ARGS(page) |
| 458 | ); |
| 459 | |
| 460 | DEFINE_EVENT(ext4__page_op, ext4_releasepage, |
| 461 | |
| 462 | TP_PROTO(struct page *page), |
| 463 | |
| 464 | TP_ARGS(page) |
| 465 | ); |
| 466 | |
| 467 | TRACE_EVENT(ext4_invalidatepage, |
| 468 | TP_PROTO(struct page *page, unsigned long offset), |
| 469 | |
| 470 | TP_ARGS(page, offset), |
| 471 | |
| 472 | TP_STRUCT__entry( |
| 473 | __field( pgoff_t, index ) |
| 474 | __field( unsigned long, offset ) |
| 475 | __field( ino_t, ino ) |
| 476 | __field( dev_t, dev ) |
| 477 | |
| 478 | ), |
| 479 | |
| 480 | TP_fast_assign( |
| 481 | __entry->index = page->index; |
| 482 | __entry->offset = offset; |
| 483 | __entry->ino = page->mapping->host->i_ino; |
| 484 | __entry->dev = page->mapping->host->i_sb->s_dev; |
| 485 | ), |
| 486 | |
| 487 | TP_printk("dev %d,%d ino %lu page_index %lu offset %lu", |
| 488 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 489 | (unsigned long) __entry->ino, |
| 490 | __entry->index, __entry->offset) |
| 491 | ); |
| 492 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 493 | TRACE_EVENT(ext4_discard_blocks, |
| 494 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
| 495 | unsigned long long count), |
| 496 | |
| 497 | TP_ARGS(sb, blk, count), |
| 498 | |
| 499 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 500 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 501 | __field( __u64, blk ) |
| 502 | __field( __u64, count ) |
| 503 | |
| 504 | ), |
| 505 | |
| 506 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 507 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 508 | __entry->blk = blk; |
| 509 | __entry->count = count; |
| 510 | ), |
| 511 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 512 | TP_printk("dev %d,%d blk %llu count %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 513 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 514 | __entry->blk, __entry->count) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 515 | ); |
| 516 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 517 | DECLARE_EVENT_CLASS(ext4__mb_new_pa, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 518 | TP_PROTO(struct ext4_allocation_context *ac, |
| 519 | struct ext4_prealloc_space *pa), |
| 520 | |
| 521 | TP_ARGS(ac, pa), |
| 522 | |
| 523 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 524 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 525 | __field( ino_t, ino ) |
| 526 | __field( __u64, pa_pstart ) |
| 527 | __field( __u32, pa_len ) |
| 528 | __field( __u64, pa_lstart ) |
| 529 | |
| 530 | ), |
| 531 | |
| 532 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 533 | __entry->dev = ac->ac_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 534 | __entry->ino = ac->ac_inode->i_ino; |
| 535 | __entry->pa_pstart = pa->pa_pstart; |
| 536 | __entry->pa_len = pa->pa_len; |
| 537 | __entry->pa_lstart = pa->pa_lstart; |
| 538 | ), |
| 539 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 540 | 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] | 541 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 542 | (unsigned long) __entry->ino, |
| 543 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 544 | ); |
| 545 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 546 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, |
| 547 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 548 | TP_PROTO(struct ext4_allocation_context *ac, |
| 549 | struct ext4_prealloc_space *pa), |
| 550 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 551 | TP_ARGS(ac, pa) |
| 552 | ); |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 553 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 554 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 555 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 556 | TP_PROTO(struct ext4_allocation_context *ac, |
| 557 | struct ext4_prealloc_space *pa), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 558 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 559 | TP_ARGS(ac, pa) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 560 | ); |
| 561 | |
| 562 | TRACE_EVENT(ext4_mb_release_inode_pa, |
Theodore Ts'o | e5880d7 | 2010-07-27 11:56:04 -0400 | [diff] [blame] | 563 | TP_PROTO(struct super_block *sb, |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 564 | struct inode *inode, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 565 | struct ext4_prealloc_space *pa, |
| 566 | unsigned long long block, unsigned int count), |
| 567 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 568 | TP_ARGS(sb, inode, pa, block, count), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 569 | |
| 570 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 571 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 572 | __field( ino_t, ino ) |
| 573 | __field( __u64, block ) |
| 574 | __field( __u32, count ) |
| 575 | |
| 576 | ), |
| 577 | |
| 578 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 579 | __entry->dev = sb->s_dev; |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 580 | __entry->ino = inode->i_ino; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 581 | __entry->block = block; |
| 582 | __entry->count = count; |
| 583 | ), |
| 584 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 585 | TP_printk("dev %d,%d ino %lu block %llu count %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 586 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 587 | (unsigned long) __entry->ino, |
| 588 | __entry->block, __entry->count) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 589 | ); |
| 590 | |
| 591 | TRACE_EVENT(ext4_mb_release_group_pa, |
Theodore Ts'o | e5880d7 | 2010-07-27 11:56:04 -0400 | [diff] [blame] | 592 | TP_PROTO(struct super_block *sb, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 593 | struct ext4_prealloc_space *pa), |
| 594 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 595 | TP_ARGS(sb, pa), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 596 | |
| 597 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 598 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 599 | __field( __u64, pa_pstart ) |
| 600 | __field( __u32, pa_len ) |
| 601 | |
| 602 | ), |
| 603 | |
| 604 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 605 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 606 | __entry->pa_pstart = pa->pa_pstart; |
| 607 | __entry->pa_len = pa->pa_len; |
| 608 | ), |
| 609 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 610 | TP_printk("dev %d,%d pstart %llu len %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 611 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 612 | __entry->pa_pstart, __entry->pa_len) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 613 | ); |
| 614 | |
| 615 | TRACE_EVENT(ext4_discard_preallocations, |
| 616 | TP_PROTO(struct inode *inode), |
| 617 | |
| 618 | TP_ARGS(inode), |
| 619 | |
| 620 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 621 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 622 | __field( ino_t, ino ) |
| 623 | |
| 624 | ), |
| 625 | |
| 626 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 627 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 628 | __entry->ino = inode->i_ino; |
| 629 | ), |
| 630 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 631 | TP_printk("dev %d,%d ino %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 632 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 633 | (unsigned long) __entry->ino) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 634 | ); |
| 635 | |
| 636 | TRACE_EVENT(ext4_mb_discard_preallocations, |
| 637 | TP_PROTO(struct super_block *sb, int needed), |
| 638 | |
| 639 | TP_ARGS(sb, needed), |
| 640 | |
| 641 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 642 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 643 | __field( int, needed ) |
| 644 | |
| 645 | ), |
| 646 | |
| 647 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 648 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 649 | __entry->needed = needed; |
| 650 | ), |
| 651 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 652 | TP_printk("dev %d,%d needed %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 653 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 654 | __entry->needed) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 655 | ); |
| 656 | |
| 657 | TRACE_EVENT(ext4_request_blocks, |
| 658 | TP_PROTO(struct ext4_allocation_request *ar), |
| 659 | |
| 660 | TP_ARGS(ar), |
| 661 | |
| 662 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 663 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 664 | __field( ino_t, ino ) |
| 665 | __field( unsigned int, flags ) |
| 666 | __field( unsigned int, len ) |
| 667 | __field( __u64, logical ) |
| 668 | __field( __u64, goal ) |
| 669 | __field( __u64, lleft ) |
| 670 | __field( __u64, lright ) |
| 671 | __field( __u64, pleft ) |
| 672 | __field( __u64, pright ) |
| 673 | ), |
| 674 | |
| 675 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 676 | __entry->dev = ar->inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 677 | __entry->ino = ar->inode->i_ino; |
| 678 | __entry->flags = ar->flags; |
| 679 | __entry->len = ar->len; |
| 680 | __entry->logical = ar->logical; |
| 681 | __entry->goal = ar->goal; |
| 682 | __entry->lleft = ar->lleft; |
| 683 | __entry->lright = ar->lright; |
| 684 | __entry->pleft = ar->pleft; |
| 685 | __entry->pright = ar->pright; |
| 686 | ), |
| 687 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 688 | TP_printk("dev %d,%d ino %lu flags %u len %u lblk %llu goal %llu " |
| 689 | "lleft %llu lright %llu pleft %llu pright %llu ", |
| 690 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 691 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 692 | __entry->flags, __entry->len, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 693 | (unsigned long long) __entry->logical, |
| 694 | (unsigned long long) __entry->goal, |
| 695 | (unsigned long long) __entry->lleft, |
| 696 | (unsigned long long) __entry->lright, |
| 697 | (unsigned long long) __entry->pleft, |
| 698 | (unsigned long long) __entry->pright) |
| 699 | ); |
| 700 | |
| 701 | TRACE_EVENT(ext4_allocate_blocks, |
| 702 | TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), |
| 703 | |
| 704 | TP_ARGS(ar, block), |
| 705 | |
| 706 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 707 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 708 | __field( ino_t, ino ) |
| 709 | __field( __u64, block ) |
| 710 | __field( unsigned int, flags ) |
| 711 | __field( unsigned int, len ) |
| 712 | __field( __u64, logical ) |
| 713 | __field( __u64, goal ) |
| 714 | __field( __u64, lleft ) |
| 715 | __field( __u64, lright ) |
| 716 | __field( __u64, pleft ) |
| 717 | __field( __u64, pright ) |
| 718 | ), |
| 719 | |
| 720 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 721 | __entry->dev = ar->inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 722 | __entry->ino = ar->inode->i_ino; |
| 723 | __entry->block = block; |
| 724 | __entry->flags = ar->flags; |
| 725 | __entry->len = ar->len; |
| 726 | __entry->logical = ar->logical; |
| 727 | __entry->goal = ar->goal; |
| 728 | __entry->lleft = ar->lleft; |
| 729 | __entry->lright = ar->lright; |
| 730 | __entry->pleft = ar->pleft; |
| 731 | __entry->pright = ar->pright; |
| 732 | ), |
| 733 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 734 | TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %llu " |
| 735 | "goal %llu lleft %llu lright %llu pleft %llu pright %llu", |
| 736 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 737 | (unsigned long) __entry->ino, |
| 738 | __entry->flags, __entry->len, __entry->block, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 739 | (unsigned long long) __entry->logical, |
| 740 | (unsigned long long) __entry->goal, |
| 741 | (unsigned long long) __entry->lleft, |
| 742 | (unsigned long long) __entry->lright, |
| 743 | (unsigned long long) __entry->pleft, |
| 744 | (unsigned long long) __entry->pright) |
| 745 | ); |
| 746 | |
| 747 | TRACE_EVENT(ext4_free_blocks, |
| 748 | TP_PROTO(struct inode *inode, __u64 block, unsigned long count, |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 749 | int flags), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 750 | |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 751 | TP_ARGS(inode, block, count, flags), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 752 | |
| 753 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 754 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 755 | __field( ino_t, ino ) |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 756 | __field( umode_t, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 757 | __field( __u64, block ) |
| 758 | __field( unsigned long, count ) |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 759 | __field( int, flags ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 760 | ), |
| 761 | |
| 762 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 763 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 764 | __entry->ino = inode->i_ino; |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 765 | __entry->mode = inode->i_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 766 | __entry->block = block; |
| 767 | __entry->count = count; |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 768 | __entry->flags = flags; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 769 | ), |
| 770 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 771 | TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 772 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 773 | (unsigned long) __entry->ino, |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 774 | __entry->mode, __entry->block, __entry->count, |
| 775 | __entry->flags) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 776 | ); |
| 777 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 778 | TRACE_EVENT(ext4_sync_file_enter, |
Christoph Hellwig | 7ea8085 | 2010-05-26 17:53:25 +0200 | [diff] [blame] | 779 | TP_PROTO(struct file *file, int datasync), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 780 | |
Christoph Hellwig | 7ea8085 | 2010-05-26 17:53:25 +0200 | [diff] [blame] | 781 | TP_ARGS(file, datasync), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 782 | |
| 783 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 784 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 785 | __field( ino_t, ino ) |
| 786 | __field( ino_t, parent ) |
| 787 | __field( int, datasync ) |
| 788 | ), |
| 789 | |
| 790 | TP_fast_assign( |
Christoph Hellwig | 7ea8085 | 2010-05-26 17:53:25 +0200 | [diff] [blame] | 791 | struct dentry *dentry = file->f_path.dentry; |
| 792 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 793 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 794 | __entry->ino = dentry->d_inode->i_ino; |
| 795 | __entry->datasync = datasync; |
| 796 | __entry->parent = dentry->d_parent->d_inode->i_ino; |
| 797 | ), |
| 798 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 799 | TP_printk("dev %d,%d ino %ld parent %ld datasync %d ", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 800 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 801 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 802 | (unsigned long) __entry->parent, __entry->datasync) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 803 | ); |
| 804 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 805 | TRACE_EVENT(ext4_sync_file_exit, |
| 806 | TP_PROTO(struct inode *inode, int ret), |
| 807 | |
| 808 | TP_ARGS(inode, ret), |
| 809 | |
| 810 | TP_STRUCT__entry( |
| 811 | __field( int, ret ) |
| 812 | __field( ino_t, ino ) |
| 813 | __field( dev_t, dev ) |
| 814 | ), |
| 815 | |
| 816 | TP_fast_assign( |
| 817 | __entry->ret = ret; |
| 818 | __entry->ino = inode->i_ino; |
| 819 | __entry->dev = inode->i_sb->s_dev; |
| 820 | ), |
| 821 | |
| 822 | TP_printk("dev %d,%d ino %ld ret %d", |
| 823 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 824 | (unsigned long) __entry->ino, |
| 825 | __entry->ret) |
| 826 | ); |
| 827 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 828 | TRACE_EVENT(ext4_sync_fs, |
| 829 | TP_PROTO(struct super_block *sb, int wait), |
| 830 | |
| 831 | TP_ARGS(sb, wait), |
| 832 | |
| 833 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 834 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 835 | __field( int, wait ) |
| 836 | |
| 837 | ), |
| 838 | |
| 839 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 840 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 841 | __entry->wait = wait; |
| 842 | ), |
| 843 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 844 | TP_printk("dev %d,%d wait %d", |
| 845 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 846 | __entry->wait) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 847 | ); |
| 848 | |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 849 | TRACE_EVENT(ext4_alloc_da_blocks, |
| 850 | TP_PROTO(struct inode *inode), |
| 851 | |
| 852 | TP_ARGS(inode), |
| 853 | |
| 854 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 855 | __field( dev_t, dev ) |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 856 | __field( ino_t, ino ) |
| 857 | __field( unsigned int, data_blocks ) |
| 858 | __field( unsigned int, meta_blocks ) |
| 859 | ), |
| 860 | |
| 861 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 862 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 863 | __entry->ino = inode->i_ino; |
| 864 | __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 865 | __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 866 | ), |
| 867 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 868 | 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] | 869 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 870 | (unsigned long) __entry->ino, |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 871 | __entry->data_blocks, __entry->meta_blocks) |
| 872 | ); |
| 873 | |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 874 | TRACE_EVENT(ext4_mballoc_alloc, |
| 875 | TP_PROTO(struct ext4_allocation_context *ac), |
| 876 | |
| 877 | TP_ARGS(ac), |
| 878 | |
| 879 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 880 | __field( dev_t, dev ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 881 | __field( ino_t, ino ) |
| 882 | __field( __u16, found ) |
| 883 | __field( __u16, groups ) |
| 884 | __field( __u16, buddy ) |
| 885 | __field( __u16, flags ) |
| 886 | __field( __u16, tail ) |
| 887 | __field( __u8, cr ) |
| 888 | __field( __u32, orig_logical ) |
| 889 | __field( int, orig_start ) |
| 890 | __field( __u32, orig_group ) |
| 891 | __field( int, orig_len ) |
| 892 | __field( __u32, goal_logical ) |
| 893 | __field( int, goal_start ) |
| 894 | __field( __u32, goal_group ) |
| 895 | __field( int, goal_len ) |
| 896 | __field( __u32, result_logical ) |
| 897 | __field( int, result_start ) |
| 898 | __field( __u32, result_group ) |
| 899 | __field( int, result_len ) |
| 900 | ), |
| 901 | |
| 902 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 903 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 904 | __entry->ino = ac->ac_inode->i_ino; |
| 905 | __entry->found = ac->ac_found; |
| 906 | __entry->flags = ac->ac_flags; |
| 907 | __entry->groups = ac->ac_groups_scanned; |
| 908 | __entry->buddy = ac->ac_buddy; |
| 909 | __entry->tail = ac->ac_tail; |
| 910 | __entry->cr = ac->ac_criteria; |
| 911 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
| 912 | __entry->orig_start = ac->ac_o_ex.fe_start; |
| 913 | __entry->orig_group = ac->ac_o_ex.fe_group; |
| 914 | __entry->orig_len = ac->ac_o_ex.fe_len; |
| 915 | __entry->goal_logical = ac->ac_g_ex.fe_logical; |
| 916 | __entry->goal_start = ac->ac_g_ex.fe_start; |
| 917 | __entry->goal_group = ac->ac_g_ex.fe_group; |
| 918 | __entry->goal_len = ac->ac_g_ex.fe_len; |
| 919 | __entry->result_logical = ac->ac_f_ex.fe_logical; |
| 920 | __entry->result_start = ac->ac_f_ex.fe_start; |
| 921 | __entry->result_group = ac->ac_f_ex.fe_group; |
| 922 | __entry->result_len = ac->ac_f_ex.fe_len; |
| 923 | ), |
| 924 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 925 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 926 | "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " |
| 927 | "tail %u broken %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 928 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 929 | (unsigned long) __entry->ino, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 930 | __entry->orig_group, __entry->orig_start, |
| 931 | __entry->orig_len, __entry->orig_logical, |
| 932 | __entry->goal_group, __entry->goal_start, |
| 933 | __entry->goal_len, __entry->goal_logical, |
| 934 | __entry->result_group, __entry->result_start, |
| 935 | __entry->result_len, __entry->result_logical, |
| 936 | __entry->found, __entry->groups, __entry->cr, |
| 937 | __entry->flags, __entry->tail, |
| 938 | __entry->buddy ? 1 << __entry->buddy : 0) |
| 939 | ); |
| 940 | |
| 941 | TRACE_EVENT(ext4_mballoc_prealloc, |
| 942 | TP_PROTO(struct ext4_allocation_context *ac), |
| 943 | |
| 944 | TP_ARGS(ac), |
| 945 | |
| 946 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 947 | __field( dev_t, dev ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 948 | __field( ino_t, ino ) |
| 949 | __field( __u32, orig_logical ) |
| 950 | __field( int, orig_start ) |
| 951 | __field( __u32, orig_group ) |
| 952 | __field( int, orig_len ) |
| 953 | __field( __u32, result_logical ) |
| 954 | __field( int, result_start ) |
| 955 | __field( __u32, result_group ) |
| 956 | __field( int, result_len ) |
| 957 | ), |
| 958 | |
| 959 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 960 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 961 | __entry->ino = ac->ac_inode->i_ino; |
| 962 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
| 963 | __entry->orig_start = ac->ac_o_ex.fe_start; |
| 964 | __entry->orig_group = ac->ac_o_ex.fe_group; |
| 965 | __entry->orig_len = ac->ac_o_ex.fe_len; |
| 966 | __entry->result_logical = ac->ac_b_ex.fe_logical; |
| 967 | __entry->result_start = ac->ac_b_ex.fe_start; |
| 968 | __entry->result_group = ac->ac_b_ex.fe_group; |
| 969 | __entry->result_len = ac->ac_b_ex.fe_len; |
| 970 | ), |
| 971 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 972 | 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] | 973 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 974 | (unsigned long) __entry->ino, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 975 | __entry->orig_group, __entry->orig_start, |
| 976 | __entry->orig_len, __entry->orig_logical, |
| 977 | __entry->result_group, __entry->result_start, |
| 978 | __entry->result_len, __entry->result_logical) |
| 979 | ); |
| 980 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 981 | DECLARE_EVENT_CLASS(ext4__mballoc, |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 982 | TP_PROTO(struct super_block *sb, |
| 983 | struct inode *inode, |
| 984 | ext4_group_t group, |
| 985 | ext4_grpblk_t start, |
| 986 | ext4_grpblk_t len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 987 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 988 | TP_ARGS(sb, inode, group, start, len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 989 | |
| 990 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 991 | __field( dev_t, dev ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 992 | __field( ino_t, ino ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 993 | __field( int, result_start ) |
| 994 | __field( __u32, result_group ) |
| 995 | __field( int, result_len ) |
| 996 | ), |
| 997 | |
| 998 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 999 | __entry->dev = sb->s_dev; |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1000 | __entry->ino = inode ? inode->i_ino : 0; |
| 1001 | __entry->result_start = start; |
| 1002 | __entry->result_group = group; |
| 1003 | __entry->result_len = len; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1004 | ), |
| 1005 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1006 | TP_printk("dev %d,%d inode %lu extent %u/%d/%u ", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1007 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1008 | (unsigned long) __entry->ino, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1009 | __entry->result_group, __entry->result_start, |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1010 | __entry->result_len) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1011 | ); |
| 1012 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 1013 | DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard, |
| 1014 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1015 | TP_PROTO(struct super_block *sb, |
| 1016 | struct inode *inode, |
| 1017 | ext4_group_t group, |
| 1018 | ext4_grpblk_t start, |
| 1019 | ext4_grpblk_t len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1020 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1021 | TP_ARGS(sb, inode, group, start, len) |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 1022 | ); |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1023 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 1024 | DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1025 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1026 | TP_PROTO(struct super_block *sb, |
| 1027 | struct inode *inode, |
| 1028 | ext4_group_t group, |
| 1029 | ext4_grpblk_t start, |
| 1030 | ext4_grpblk_t len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1031 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1032 | TP_ARGS(sb, inode, group, start, len) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1033 | ); |
| 1034 | |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1035 | TRACE_EVENT(ext4_forget, |
| 1036 | TP_PROTO(struct inode *inode, int is_metadata, __u64 block), |
| 1037 | |
| 1038 | TP_ARGS(inode, is_metadata, block), |
| 1039 | |
| 1040 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1041 | __field( dev_t, dev ) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1042 | __field( ino_t, ino ) |
| 1043 | __field( umode_t, mode ) |
| 1044 | __field( int, is_metadata ) |
| 1045 | __field( __u64, block ) |
| 1046 | ), |
| 1047 | |
| 1048 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1049 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1050 | __entry->ino = inode->i_ino; |
| 1051 | __entry->mode = inode->i_mode; |
| 1052 | __entry->is_metadata = is_metadata; |
| 1053 | __entry->block = block; |
| 1054 | ), |
| 1055 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1056 | 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] | 1057 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1058 | (unsigned long) __entry->ino, |
| 1059 | __entry->mode, __entry->is_metadata, __entry->block) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1060 | ); |
| 1061 | |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1062 | TRACE_EVENT(ext4_da_update_reserve_space, |
| 1063 | TP_PROTO(struct inode *inode, int used_blocks), |
| 1064 | |
| 1065 | TP_ARGS(inode, used_blocks), |
| 1066 | |
| 1067 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1068 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1069 | __field( ino_t, ino ) |
| 1070 | __field( umode_t, mode ) |
| 1071 | __field( __u64, i_blocks ) |
| 1072 | __field( int, used_blocks ) |
| 1073 | __field( int, reserved_data_blocks ) |
| 1074 | __field( int, reserved_meta_blocks ) |
| 1075 | __field( int, allocated_meta_blocks ) |
| 1076 | ), |
| 1077 | |
| 1078 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1079 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1080 | __entry->ino = inode->i_ino; |
| 1081 | __entry->mode = inode->i_mode; |
| 1082 | __entry->i_blocks = inode->i_blocks; |
| 1083 | __entry->used_blocks = used_blocks; |
| 1084 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 1085 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 1086 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; |
| 1087 | ), |
| 1088 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1089 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " |
| 1090 | "reserved_data_blocks %d reserved_meta_blocks %d " |
| 1091 | "allocated_meta_blocks %d", |
| 1092 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1093 | (unsigned long) __entry->ino, |
| 1094 | __entry->mode, (unsigned long long) __entry->i_blocks, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1095 | __entry->used_blocks, __entry->reserved_data_blocks, |
| 1096 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) |
| 1097 | ); |
| 1098 | |
| 1099 | TRACE_EVENT(ext4_da_reserve_space, |
| 1100 | TP_PROTO(struct inode *inode, int md_needed), |
| 1101 | |
| 1102 | TP_ARGS(inode, md_needed), |
| 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 | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1106 | __field( ino_t, ino ) |
| 1107 | __field( umode_t, mode ) |
| 1108 | __field( __u64, i_blocks ) |
| 1109 | __field( int, md_needed ) |
| 1110 | __field( int, reserved_data_blocks ) |
| 1111 | __field( int, reserved_meta_blocks ) |
| 1112 | ), |
| 1113 | |
| 1114 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1115 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1116 | __entry->ino = inode->i_ino; |
| 1117 | __entry->mode = inode->i_mode; |
| 1118 | __entry->i_blocks = inode->i_blocks; |
| 1119 | __entry->md_needed = md_needed; |
| 1120 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 1121 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 1122 | ), |
| 1123 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1124 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d " |
| 1125 | "reserved_data_blocks %d reserved_meta_blocks %d", |
| 1126 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1127 | (unsigned long) __entry->ino, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1128 | __entry->mode, (unsigned long long) __entry->i_blocks, |
| 1129 | __entry->md_needed, __entry->reserved_data_blocks, |
| 1130 | __entry->reserved_meta_blocks) |
| 1131 | ); |
| 1132 | |
| 1133 | TRACE_EVENT(ext4_da_release_space, |
| 1134 | TP_PROTO(struct inode *inode, int freed_blocks), |
| 1135 | |
| 1136 | TP_ARGS(inode, freed_blocks), |
| 1137 | |
| 1138 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1139 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1140 | __field( ino_t, ino ) |
| 1141 | __field( umode_t, mode ) |
| 1142 | __field( __u64, i_blocks ) |
| 1143 | __field( int, freed_blocks ) |
| 1144 | __field( int, reserved_data_blocks ) |
| 1145 | __field( int, reserved_meta_blocks ) |
| 1146 | __field( int, allocated_meta_blocks ) |
| 1147 | ), |
| 1148 | |
| 1149 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1150 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1151 | __entry->ino = inode->i_ino; |
| 1152 | __entry->mode = inode->i_mode; |
| 1153 | __entry->i_blocks = inode->i_blocks; |
| 1154 | __entry->freed_blocks = freed_blocks; |
| 1155 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 1156 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 1157 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; |
| 1158 | ), |
| 1159 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1160 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d " |
| 1161 | "reserved_data_blocks %d reserved_meta_blocks %d " |
| 1162 | "allocated_meta_blocks %d", |
| 1163 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1164 | (unsigned long) __entry->ino, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1165 | __entry->mode, (unsigned long long) __entry->i_blocks, |
| 1166 | __entry->freed_blocks, __entry->reserved_data_blocks, |
| 1167 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) |
| 1168 | ); |
| 1169 | |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1170 | DECLARE_EVENT_CLASS(ext4__bitmap_load, |
| 1171 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1172 | |
| 1173 | TP_ARGS(sb, group), |
| 1174 | |
| 1175 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1176 | __field( dev_t, dev ) |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1177 | __field( __u32, group ) |
| 1178 | |
| 1179 | ), |
| 1180 | |
| 1181 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1182 | __entry->dev = sb->s_dev; |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1183 | __entry->group = group; |
| 1184 | ), |
| 1185 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1186 | TP_printk("dev %d,%d group %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1187 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1188 | __entry->group) |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1189 | ); |
| 1190 | |
| 1191 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, |
| 1192 | |
| 1193 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1194 | |
| 1195 | TP_ARGS(sb, group) |
| 1196 | ); |
| 1197 | |
| 1198 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load, |
| 1199 | |
| 1200 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1201 | |
| 1202 | TP_ARGS(sb, group) |
| 1203 | ); |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1204 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1205 | DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load, |
| 1206 | |
| 1207 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1208 | |
| 1209 | TP_ARGS(sb, group) |
| 1210 | ); |
| 1211 | |
| 1212 | DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap, |
| 1213 | |
| 1214 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1215 | |
| 1216 | TP_ARGS(sb, group) |
| 1217 | ); |
| 1218 | |
| 1219 | TRACE_EVENT(ext4_direct_IO_enter, |
| 1220 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), |
| 1221 | |
| 1222 | TP_ARGS(inode, offset, len, rw), |
| 1223 | |
| 1224 | TP_STRUCT__entry( |
| 1225 | __field( ino_t, ino ) |
| 1226 | __field( dev_t, dev ) |
| 1227 | __field( loff_t, pos ) |
| 1228 | __field( unsigned long, len ) |
| 1229 | __field( int, rw ) |
| 1230 | ), |
| 1231 | |
| 1232 | TP_fast_assign( |
| 1233 | __entry->ino = inode->i_ino; |
| 1234 | __entry->dev = inode->i_sb->s_dev; |
| 1235 | __entry->pos = offset; |
| 1236 | __entry->len = len; |
| 1237 | __entry->rw = rw; |
| 1238 | ), |
| 1239 | |
| 1240 | TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d", |
| 1241 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1242 | (unsigned long) __entry->ino, |
| 1243 | (unsigned long long) __entry->pos, __entry->len, __entry->rw) |
| 1244 | ); |
| 1245 | |
| 1246 | TRACE_EVENT(ext4_direct_IO_exit, |
| 1247 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw, int ret), |
| 1248 | |
| 1249 | TP_ARGS(inode, offset, len, rw, ret), |
| 1250 | |
| 1251 | TP_STRUCT__entry( |
| 1252 | __field( ino_t, ino ) |
| 1253 | __field( dev_t, dev ) |
| 1254 | __field( loff_t, pos ) |
| 1255 | __field( unsigned long, len ) |
| 1256 | __field( int, rw ) |
| 1257 | __field( int, ret ) |
| 1258 | ), |
| 1259 | |
| 1260 | TP_fast_assign( |
| 1261 | __entry->ino = inode->i_ino; |
| 1262 | __entry->dev = inode->i_sb->s_dev; |
| 1263 | __entry->pos = offset; |
| 1264 | __entry->len = len; |
| 1265 | __entry->rw = rw; |
| 1266 | __entry->ret = ret; |
| 1267 | ), |
| 1268 | |
| 1269 | TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d ret %d", |
| 1270 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1271 | (unsigned long) __entry->ino, |
| 1272 | (unsigned long long) __entry->pos, __entry->len, |
| 1273 | __entry->rw, __entry->ret) |
| 1274 | ); |
| 1275 | |
| 1276 | TRACE_EVENT(ext4_fallocate_enter, |
| 1277 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), |
| 1278 | |
| 1279 | TP_ARGS(inode, offset, len, mode), |
| 1280 | |
| 1281 | TP_STRUCT__entry( |
| 1282 | __field( ino_t, ino ) |
| 1283 | __field( dev_t, dev ) |
| 1284 | __field( loff_t, pos ) |
| 1285 | __field( loff_t, len ) |
| 1286 | __field( int, mode ) |
| 1287 | ), |
| 1288 | |
| 1289 | TP_fast_assign( |
| 1290 | __entry->ino = inode->i_ino; |
| 1291 | __entry->dev = inode->i_sb->s_dev; |
| 1292 | __entry->pos = offset; |
| 1293 | __entry->len = len; |
| 1294 | __entry->mode = mode; |
| 1295 | ), |
| 1296 | |
| 1297 | TP_printk("dev %d,%d ino %ld pos %llu len %llu mode %d", |
| 1298 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1299 | (unsigned long) __entry->ino, |
| 1300 | (unsigned long long) __entry->pos, |
| 1301 | (unsigned long long) __entry->len, __entry->mode) |
| 1302 | ); |
| 1303 | |
| 1304 | TRACE_EVENT(ext4_fallocate_exit, |
| 1305 | TP_PROTO(struct inode *inode, loff_t offset, unsigned int max_blocks, int ret), |
| 1306 | |
| 1307 | TP_ARGS(inode, offset, max_blocks, ret), |
| 1308 | |
| 1309 | TP_STRUCT__entry( |
| 1310 | __field( ino_t, ino ) |
| 1311 | __field( dev_t, dev ) |
| 1312 | __field( loff_t, pos ) |
| 1313 | __field( unsigned, blocks ) |
| 1314 | __field( int, ret ) |
| 1315 | ), |
| 1316 | |
| 1317 | TP_fast_assign( |
| 1318 | __entry->ino = inode->i_ino; |
| 1319 | __entry->dev = inode->i_sb->s_dev; |
| 1320 | __entry->pos = offset; |
| 1321 | __entry->blocks = max_blocks; |
| 1322 | __entry->ret = ret; |
| 1323 | ), |
| 1324 | |
| 1325 | TP_printk("dev %d,%d ino %ld pos %llu blocks %d ret %d", |
| 1326 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1327 | (unsigned long) __entry->ino, |
| 1328 | (unsigned long long) __entry->pos, __entry->blocks, |
| 1329 | __entry->ret) |
| 1330 | ); |
| 1331 | |
| 1332 | TRACE_EVENT(ext4_unlink_enter, |
| 1333 | TP_PROTO(struct inode *parent, struct dentry *dentry), |
| 1334 | |
| 1335 | TP_ARGS(parent, dentry), |
| 1336 | |
| 1337 | TP_STRUCT__entry( |
| 1338 | __field( ino_t, parent ) |
| 1339 | __field( ino_t, ino ) |
| 1340 | __field( loff_t, size ) |
| 1341 | __field( dev_t, dev ) |
| 1342 | ), |
| 1343 | |
| 1344 | TP_fast_assign( |
| 1345 | __entry->parent = parent->i_ino; |
| 1346 | __entry->ino = dentry->d_inode->i_ino; |
| 1347 | __entry->size = dentry->d_inode->i_size; |
| 1348 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
| 1349 | ), |
| 1350 | |
| 1351 | TP_printk("dev %d,%d ino %ld size %lld parent %ld", |
| 1352 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1353 | (unsigned long) __entry->ino, __entry->size, |
| 1354 | (unsigned long) __entry->parent) |
| 1355 | ); |
| 1356 | |
| 1357 | TRACE_EVENT(ext4_unlink_exit, |
| 1358 | TP_PROTO(struct dentry *dentry, int ret), |
| 1359 | |
| 1360 | TP_ARGS(dentry, ret), |
| 1361 | |
| 1362 | TP_STRUCT__entry( |
| 1363 | __field( ino_t, ino ) |
| 1364 | __field( dev_t, dev ) |
| 1365 | __field( int, ret ) |
| 1366 | ), |
| 1367 | |
| 1368 | TP_fast_assign( |
| 1369 | __entry->ino = dentry->d_inode->i_ino; |
| 1370 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
| 1371 | __entry->ret = ret; |
| 1372 | ), |
| 1373 | |
| 1374 | TP_printk("dev %d,%d ino %ld ret %d", |
| 1375 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1376 | (unsigned long) __entry->ino, |
| 1377 | __entry->ret) |
| 1378 | ); |
| 1379 | |
| 1380 | DECLARE_EVENT_CLASS(ext4__truncate, |
| 1381 | TP_PROTO(struct inode *inode), |
| 1382 | |
| 1383 | TP_ARGS(inode), |
| 1384 | |
| 1385 | TP_STRUCT__entry( |
| 1386 | __field( ino_t, ino ) |
| 1387 | __field( dev_t, dev ) |
| 1388 | __field( blkcnt_t, blocks ) |
| 1389 | ), |
| 1390 | |
| 1391 | TP_fast_assign( |
| 1392 | __entry->ino = inode->i_ino; |
| 1393 | __entry->dev = inode->i_sb->s_dev; |
| 1394 | __entry->blocks = inode->i_blocks; |
| 1395 | ), |
| 1396 | |
| 1397 | TP_printk("dev %d,%d ino %lu blocks %lu", |
| 1398 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1399 | (unsigned long) __entry->ino, (unsigned long) __entry->blocks) |
| 1400 | ); |
| 1401 | |
| 1402 | DEFINE_EVENT(ext4__truncate, ext4_truncate_enter, |
| 1403 | |
| 1404 | TP_PROTO(struct inode *inode), |
| 1405 | |
| 1406 | TP_ARGS(inode) |
| 1407 | ); |
| 1408 | |
| 1409 | DEFINE_EVENT(ext4__truncate, ext4_truncate_exit, |
| 1410 | |
| 1411 | TP_PROTO(struct inode *inode), |
| 1412 | |
| 1413 | TP_ARGS(inode) |
| 1414 | ); |
| 1415 | |
| 1416 | DECLARE_EVENT_CLASS(ext4__map_blocks_enter, |
| 1417 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1418 | unsigned len, unsigned flags), |
| 1419 | |
| 1420 | TP_ARGS(inode, lblk, len, flags), |
| 1421 | |
| 1422 | TP_STRUCT__entry( |
| 1423 | __field( ino_t, ino ) |
| 1424 | __field( dev_t, dev ) |
| 1425 | __field( ext4_lblk_t, lblk ) |
| 1426 | __field( unsigned, len ) |
| 1427 | __field( unsigned, flags ) |
| 1428 | ), |
| 1429 | |
| 1430 | TP_fast_assign( |
| 1431 | __entry->ino = inode->i_ino; |
| 1432 | __entry->dev = inode->i_sb->s_dev; |
| 1433 | __entry->lblk = lblk; |
| 1434 | __entry->len = len; |
| 1435 | __entry->flags = flags; |
| 1436 | ), |
| 1437 | |
| 1438 | TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u", |
| 1439 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1440 | (unsigned long) __entry->ino, |
| 1441 | (unsigned) __entry->lblk, __entry->len, __entry->flags) |
| 1442 | ); |
| 1443 | |
| 1444 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter, |
| 1445 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1446 | unsigned len, unsigned flags), |
| 1447 | |
| 1448 | TP_ARGS(inode, lblk, len, flags) |
| 1449 | ); |
| 1450 | |
| 1451 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter, |
| 1452 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1453 | unsigned len, unsigned flags), |
| 1454 | |
| 1455 | TP_ARGS(inode, lblk, len, flags) |
| 1456 | ); |
| 1457 | |
| 1458 | DECLARE_EVENT_CLASS(ext4__map_blocks_exit, |
| 1459 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1460 | ext4_fsblk_t pblk, unsigned len, int ret), |
| 1461 | |
| 1462 | TP_ARGS(inode, lblk, pblk, len, ret), |
| 1463 | |
| 1464 | TP_STRUCT__entry( |
| 1465 | __field( ino_t, ino ) |
| 1466 | __field( dev_t, dev ) |
| 1467 | __field( ext4_lblk_t, lblk ) |
| 1468 | __field( ext4_fsblk_t, pblk ) |
| 1469 | __field( unsigned, len ) |
| 1470 | __field( int, ret ) |
| 1471 | ), |
| 1472 | |
| 1473 | TP_fast_assign( |
| 1474 | __entry->ino = inode->i_ino; |
| 1475 | __entry->dev = inode->i_sb->s_dev; |
| 1476 | __entry->lblk = lblk; |
| 1477 | __entry->pblk = pblk; |
| 1478 | __entry->len = len; |
| 1479 | __entry->ret = ret; |
| 1480 | ), |
| 1481 | |
| 1482 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d", |
| 1483 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1484 | (unsigned long) __entry->ino, |
| 1485 | (unsigned) __entry->lblk, (unsigned long long) __entry->pblk, |
| 1486 | __entry->len, __entry->ret) |
| 1487 | ); |
| 1488 | |
| 1489 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, |
| 1490 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1491 | ext4_fsblk_t pblk, unsigned len, int ret), |
| 1492 | |
| 1493 | TP_ARGS(inode, lblk, pblk, len, ret) |
| 1494 | ); |
| 1495 | |
| 1496 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, |
| 1497 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1498 | ext4_fsblk_t pblk, unsigned len, int ret), |
| 1499 | |
| 1500 | TP_ARGS(inode, lblk, pblk, len, ret) |
| 1501 | ); |
| 1502 | |
| 1503 | TRACE_EVENT(ext4_ext_load_extent, |
| 1504 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk), |
| 1505 | |
| 1506 | TP_ARGS(inode, lblk, pblk), |
| 1507 | |
| 1508 | TP_STRUCT__entry( |
| 1509 | __field( ino_t, ino ) |
| 1510 | __field( dev_t, dev ) |
| 1511 | __field( ext4_lblk_t, lblk ) |
| 1512 | __field( ext4_fsblk_t, pblk ) |
| 1513 | ), |
| 1514 | |
| 1515 | TP_fast_assign( |
| 1516 | __entry->ino = inode->i_ino; |
| 1517 | __entry->dev = inode->i_sb->s_dev; |
| 1518 | __entry->lblk = lblk; |
| 1519 | __entry->pblk = pblk; |
| 1520 | ), |
| 1521 | |
| 1522 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu", |
| 1523 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1524 | (unsigned long) __entry->ino, |
| 1525 | (unsigned) __entry->lblk, (unsigned long long) __entry->pblk) |
| 1526 | ); |
| 1527 | |
| 1528 | TRACE_EVENT(ext4_load_inode, |
| 1529 | TP_PROTO(struct inode *inode), |
| 1530 | |
| 1531 | TP_ARGS(inode), |
| 1532 | |
| 1533 | TP_STRUCT__entry( |
| 1534 | __field( ino_t, ino ) |
| 1535 | __field( dev_t, dev ) |
| 1536 | ), |
| 1537 | |
| 1538 | TP_fast_assign( |
| 1539 | __entry->ino = inode->i_ino; |
| 1540 | __entry->dev = inode->i_sb->s_dev; |
| 1541 | ), |
| 1542 | |
| 1543 | TP_printk("dev %d,%d ino %ld", |
| 1544 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1545 | (unsigned long) __entry->ino) |
| 1546 | ); |
| 1547 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 1548 | #endif /* _TRACE_EXT4_H */ |
| 1549 | |
| 1550 | /* This part must be outside protection */ |
| 1551 | #include <trace/define_trace.h> |