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