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; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame^] | 15 | struct ext4_map_blocks; |
| 16 | struct ext4_extent; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 17 | |
| 18 | #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] | 19 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 20 | TRACE_EVENT(ext4_free_inode, |
| 21 | TP_PROTO(struct inode *inode), |
| 22 | |
| 23 | TP_ARGS(inode), |
| 24 | |
| 25 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 26 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 27 | __field( ino_t, ino ) |
Theodore Ts'o | 59be8e7 | 2011-07-30 12:38:46 -0400 | [diff] [blame] | 28 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 29 | __field( uid_t, uid ) |
| 30 | __field( gid_t, gid ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 31 | __field( __u64, blocks ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 32 | ), |
| 33 | |
| 34 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 35 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 36 | __entry->ino = inode->i_ino; |
| 37 | __entry->mode = inode->i_mode; |
| 38 | __entry->uid = inode->i_uid; |
| 39 | __entry->gid = inode->i_gid; |
| 40 | __entry->blocks = inode->i_blocks; |
| 41 | ), |
| 42 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 43 | 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] | 44 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 45 | (unsigned long) __entry->ino, __entry->mode, |
| 46 | __entry->uid, __entry->gid, __entry->blocks) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 47 | ); |
| 48 | |
| 49 | TRACE_EVENT(ext4_request_inode, |
| 50 | TP_PROTO(struct inode *dir, int mode), |
| 51 | |
| 52 | TP_ARGS(dir, mode), |
| 53 | |
| 54 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 55 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 56 | __field( ino_t, dir ) |
Theodore Ts'o | 59be8e7 | 2011-07-30 12:38:46 -0400 | [diff] [blame] | 57 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 58 | ), |
| 59 | |
| 60 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 61 | __entry->dev = dir->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 62 | __entry->dir = dir->i_ino; |
| 63 | __entry->mode = mode; |
| 64 | ), |
| 65 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 66 | TP_printk("dev %d,%d dir %lu mode 0%o", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 67 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 68 | (unsigned long) __entry->dir, __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 69 | ); |
| 70 | |
| 71 | TRACE_EVENT(ext4_allocate_inode, |
| 72 | TP_PROTO(struct inode *inode, struct inode *dir, int mode), |
| 73 | |
| 74 | TP_ARGS(inode, dir, mode), |
| 75 | |
| 76 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 77 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 78 | __field( ino_t, ino ) |
| 79 | __field( ino_t, dir ) |
Theodore Ts'o | 59be8e7 | 2011-07-30 12:38:46 -0400 | [diff] [blame] | 80 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 81 | ), |
| 82 | |
| 83 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 84 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 85 | __entry->ino = inode->i_ino; |
| 86 | __entry->dir = dir->i_ino; |
| 87 | __entry->mode = mode; |
| 88 | ), |
| 89 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 90 | TP_printk("dev %d,%d ino %lu dir %lu mode 0%o", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 91 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 92 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 93 | (unsigned long) __entry->dir, __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 94 | ); |
| 95 | |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 96 | TRACE_EVENT(ext4_evict_inode, |
| 97 | TP_PROTO(struct inode *inode), |
| 98 | |
| 99 | TP_ARGS(inode), |
| 100 | |
| 101 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 102 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 103 | __field( ino_t, ino ) |
| 104 | __field( int, nlink ) |
| 105 | ), |
| 106 | |
| 107 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 108 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 109 | __entry->ino = inode->i_ino; |
| 110 | __entry->nlink = inode->i_nlink; |
| 111 | ), |
| 112 | |
| 113 | TP_printk("dev %d,%d ino %lu nlink %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 114 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 115 | (unsigned long) __entry->ino, __entry->nlink) |
| 116 | ); |
| 117 | |
| 118 | TRACE_EVENT(ext4_drop_inode, |
| 119 | TP_PROTO(struct inode *inode, int drop), |
| 120 | |
| 121 | TP_ARGS(inode, drop), |
| 122 | |
| 123 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 124 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 125 | __field( ino_t, ino ) |
| 126 | __field( int, drop ) |
| 127 | ), |
| 128 | |
| 129 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 130 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 131 | __entry->ino = inode->i_ino; |
| 132 | __entry->drop = drop; |
| 133 | ), |
| 134 | |
| 135 | TP_printk("dev %d,%d ino %lu drop %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 136 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 137 | (unsigned long) __entry->ino, __entry->drop) |
| 138 | ); |
| 139 | |
| 140 | TRACE_EVENT(ext4_mark_inode_dirty, |
| 141 | TP_PROTO(struct inode *inode, unsigned long IP), |
| 142 | |
| 143 | TP_ARGS(inode, IP), |
| 144 | |
| 145 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 146 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 147 | __field( ino_t, ino ) |
| 148 | __field(unsigned long, ip ) |
| 149 | ), |
| 150 | |
| 151 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 152 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 153 | __entry->ino = inode->i_ino; |
| 154 | __entry->ip = IP; |
| 155 | ), |
| 156 | |
| 157 | TP_printk("dev %d,%d ino %lu caller %pF", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 158 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 159 | (unsigned long) __entry->ino, (void *)__entry->ip) |
| 160 | ); |
| 161 | |
| 162 | TRACE_EVENT(ext4_begin_ordered_truncate, |
| 163 | TP_PROTO(struct inode *inode, loff_t new_size), |
| 164 | |
| 165 | TP_ARGS(inode, new_size), |
| 166 | |
| 167 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 168 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 169 | __field( ino_t, ino ) |
| 170 | __field( loff_t, new_size ) |
| 171 | ), |
| 172 | |
| 173 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 174 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 175 | __entry->ino = inode->i_ino; |
| 176 | __entry->new_size = new_size; |
| 177 | ), |
| 178 | |
| 179 | TP_printk("dev %d,%d ino %lu new_size %lld", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 180 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 181 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 182 | __entry->new_size) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 183 | ); |
| 184 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 185 | DECLARE_EVENT_CLASS(ext4__write_begin, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 186 | |
| 187 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 188 | unsigned int flags), |
| 189 | |
| 190 | TP_ARGS(inode, pos, len, flags), |
| 191 | |
| 192 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 193 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 194 | __field( ino_t, ino ) |
| 195 | __field( loff_t, pos ) |
| 196 | __field( unsigned int, len ) |
| 197 | __field( unsigned int, flags ) |
| 198 | ), |
| 199 | |
| 200 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 201 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 202 | __entry->ino = inode->i_ino; |
| 203 | __entry->pos = pos; |
| 204 | __entry->len = len; |
| 205 | __entry->flags = flags; |
| 206 | ), |
| 207 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 208 | 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] | 209 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 210 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 211 | __entry->pos, __entry->len, __entry->flags) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 212 | ); |
| 213 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 214 | DEFINE_EVENT(ext4__write_begin, ext4_write_begin, |
| 215 | |
| 216 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 217 | unsigned int flags), |
| 218 | |
| 219 | TP_ARGS(inode, pos, len, flags) |
| 220 | ); |
| 221 | |
| 222 | DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin, |
| 223 | |
| 224 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 225 | unsigned int flags), |
| 226 | |
| 227 | TP_ARGS(inode, pos, len, flags) |
| 228 | ); |
| 229 | |
| 230 | DECLARE_EVENT_CLASS(ext4__write_end, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 231 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 232 | unsigned int copied), |
| 233 | |
| 234 | TP_ARGS(inode, pos, len, copied), |
| 235 | |
| 236 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 237 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 238 | __field( ino_t, ino ) |
| 239 | __field( loff_t, pos ) |
| 240 | __field( unsigned int, len ) |
| 241 | __field( unsigned int, copied ) |
| 242 | ), |
| 243 | |
| 244 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 245 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 246 | __entry->ino = inode->i_ino; |
| 247 | __entry->pos = pos; |
| 248 | __entry->len = len; |
| 249 | __entry->copied = copied; |
| 250 | ), |
| 251 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 252 | 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] | 253 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 254 | (unsigned long) __entry->ino, |
| 255 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 256 | ); |
| 257 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 258 | DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, |
| 259 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 260 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 261 | unsigned int copied), |
| 262 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 263 | TP_ARGS(inode, pos, len, copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 264 | ); |
| 265 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 266 | DEFINE_EVENT(ext4__write_end, ext4_writeback_write_end, |
| 267 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 268 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 269 | unsigned int copied), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 270 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 271 | TP_ARGS(inode, pos, len, copied) |
| 272 | ); |
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 | DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 275 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 276 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 277 | unsigned int copied), |
| 278 | |
| 279 | TP_ARGS(inode, pos, len, copied) |
| 280 | ); |
| 281 | |
| 282 | DEFINE_EVENT(ext4__write_end, ext4_da_write_end, |
| 283 | |
| 284 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 285 | unsigned int copied), |
| 286 | |
| 287 | TP_ARGS(inode, pos, len, copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 288 | ); |
| 289 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 290 | TRACE_EVENT(ext4_da_writepages, |
| 291 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), |
| 292 | |
| 293 | TP_ARGS(inode, wbc), |
| 294 | |
| 295 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 296 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 297 | __field( ino_t, ino ) |
| 298 | __field( long, nr_to_write ) |
| 299 | __field( long, pages_skipped ) |
| 300 | __field( loff_t, range_start ) |
| 301 | __field( loff_t, range_end ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 302 | __field( int, sync_mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 303 | __field( char, for_kupdate ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 304 | __field( char, range_cyclic ) |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 305 | __field( pgoff_t, writeback_index ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 306 | ), |
| 307 | |
| 308 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 309 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 310 | __entry->ino = inode->i_ino; |
| 311 | __entry->nr_to_write = wbc->nr_to_write; |
| 312 | __entry->pages_skipped = wbc->pages_skipped; |
| 313 | __entry->range_start = wbc->range_start; |
| 314 | __entry->range_end = wbc->range_end; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 315 | __entry->sync_mode = wbc->sync_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 316 | __entry->for_kupdate = wbc->for_kupdate; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 317 | __entry->range_cyclic = wbc->range_cyclic; |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 318 | __entry->writeback_index = inode->i_mapping->writeback_index; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 319 | ), |
| 320 | |
Theodore Ts'o | a107e5a | 2010-10-27 23:44:47 -0400 | [diff] [blame] | 321 | 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] | 322 | "range_start %lld range_end %lld sync_mode %d" |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 323 | "for_kupdate %d range_cyclic %d writeback_index %lu", |
| 324 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 325 | (unsigned long) __entry->ino, __entry->nr_to_write, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 326 | __entry->pages_skipped, __entry->range_start, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 327 | __entry->range_end, __entry->sync_mode, |
| 328 | __entry->for_kupdate, __entry->range_cyclic, |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 329 | (unsigned long) __entry->writeback_index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 330 | ); |
| 331 | |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 332 | TRACE_EVENT(ext4_da_write_pages, |
| 333 | TP_PROTO(struct inode *inode, struct mpage_da_data *mpd), |
| 334 | |
| 335 | TP_ARGS(inode, mpd), |
| 336 | |
| 337 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 338 | __field( dev_t, dev ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 339 | __field( ino_t, ino ) |
| 340 | __field( __u64, b_blocknr ) |
| 341 | __field( __u32, b_size ) |
| 342 | __field( __u32, b_state ) |
| 343 | __field( unsigned long, first_page ) |
| 344 | __field( int, io_done ) |
| 345 | __field( int, pages_written ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 346 | __field( int, sync_mode ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 347 | ), |
| 348 | |
| 349 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 350 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 351 | __entry->ino = inode->i_ino; |
| 352 | __entry->b_blocknr = mpd->b_blocknr; |
| 353 | __entry->b_size = mpd->b_size; |
| 354 | __entry->b_state = mpd->b_state; |
| 355 | __entry->first_page = mpd->first_page; |
| 356 | __entry->io_done = mpd->io_done; |
| 357 | __entry->pages_written = mpd->pages_written; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 358 | __entry->sync_mode = mpd->wbc->sync_mode; |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 359 | ), |
| 360 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 361 | TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x " |
| 362 | "first_page %lu io_done %d pages_written %d sync_mode %d", |
| 363 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 364 | (unsigned long) __entry->ino, |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 365 | __entry->b_blocknr, __entry->b_size, |
| 366 | __entry->b_state, __entry->first_page, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 367 | __entry->io_done, __entry->pages_written, |
| 368 | __entry->sync_mode |
| 369 | ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 370 | ); |
| 371 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 372 | TRACE_EVENT(ext4_da_writepages_result, |
| 373 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, |
| 374 | int ret, int pages_written), |
| 375 | |
| 376 | TP_ARGS(inode, wbc, ret, pages_written), |
| 377 | |
| 378 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 379 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 380 | __field( ino_t, ino ) |
| 381 | __field( int, ret ) |
| 382 | __field( int, pages_written ) |
| 383 | __field( long, pages_skipped ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 384 | __field( int, sync_mode ) |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 385 | __field( pgoff_t, writeback_index ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 386 | ), |
| 387 | |
| 388 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 389 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 390 | __entry->ino = inode->i_ino; |
| 391 | __entry->ret = ret; |
| 392 | __entry->pages_written = pages_written; |
| 393 | __entry->pages_skipped = wbc->pages_skipped; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 394 | __entry->sync_mode = wbc->sync_mode; |
Theodore Ts'o | 55138e0b | 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 " |
Wu Fengguang | b7a2441 | 2010-07-21 22:19:51 -0600 | [diff] [blame] | 399 | "sync_mode %d writeback_index %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 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, |
Wu Fengguang | b7a2441 | 2010-07-21 22:19:51 -0600 | [diff] [blame] | 403 | __entry->sync_mode, |
Theodore Ts'o | 55138e0b | 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, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame^] | 1037 | TP_PROTO(struct inode *inode, int used_blocks, int quota_claim), |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1038 | |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame^] | 1039 | TP_ARGS(inode, used_blocks, quota_claim), |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 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 ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame^] | 1050 | __field( int, quota_claim ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1051 | ), |
| 1052 | |
| 1053 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1054 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1055 | __entry->ino = inode->i_ino; |
| 1056 | __entry->mode = inode->i_mode; |
| 1057 | __entry->i_blocks = inode->i_blocks; |
| 1058 | __entry->used_blocks = used_blocks; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame^] | 1059 | __entry->reserved_data_blocks = |
| 1060 | EXT4_I(inode)->i_reserved_data_blocks; |
| 1061 | __entry->reserved_meta_blocks = |
| 1062 | EXT4_I(inode)->i_reserved_meta_blocks; |
| 1063 | __entry->allocated_meta_blocks = |
| 1064 | EXT4_I(inode)->i_allocated_meta_blocks; |
| 1065 | __entry->quota_claim = quota_claim; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1066 | ), |
| 1067 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1068 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " |
| 1069 | "reserved_data_blocks %d reserved_meta_blocks %d " |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame^] | 1070 | "allocated_meta_blocks %d quota_claim %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1071 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1072 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1073 | __entry->mode, __entry->i_blocks, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1074 | __entry->used_blocks, __entry->reserved_data_blocks, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame^] | 1075 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks, |
| 1076 | __entry->quota_claim) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1077 | ); |
| 1078 | |
| 1079 | TRACE_EVENT(ext4_da_reserve_space, |
| 1080 | TP_PROTO(struct inode *inode, int md_needed), |
| 1081 | |
| 1082 | TP_ARGS(inode, md_needed), |
| 1083 | |
| 1084 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1085 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1086 | __field( ino_t, ino ) |
Theodore Ts'o | 59be8e7 | 2011-07-30 12:38:46 -0400 | [diff] [blame] | 1087 | __field( __u16, mode ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1088 | __field( __u64, i_blocks ) |
| 1089 | __field( int, md_needed ) |
| 1090 | __field( int, reserved_data_blocks ) |
| 1091 | __field( int, reserved_meta_blocks ) |
| 1092 | ), |
| 1093 | |
| 1094 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1095 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1096 | __entry->ino = inode->i_ino; |
| 1097 | __entry->mode = inode->i_mode; |
| 1098 | __entry->i_blocks = inode->i_blocks; |
| 1099 | __entry->md_needed = md_needed; |
| 1100 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 1101 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 1102 | ), |
| 1103 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1104 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d " |
| 1105 | "reserved_data_blocks %d reserved_meta_blocks %d", |
| 1106 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1107 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1108 | __entry->mode, __entry->i_blocks, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1109 | __entry->md_needed, __entry->reserved_data_blocks, |
| 1110 | __entry->reserved_meta_blocks) |
| 1111 | ); |
| 1112 | |
| 1113 | TRACE_EVENT(ext4_da_release_space, |
| 1114 | TP_PROTO(struct inode *inode, int freed_blocks), |
| 1115 | |
| 1116 | TP_ARGS(inode, freed_blocks), |
| 1117 | |
| 1118 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1119 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1120 | __field( ino_t, ino ) |
Theodore Ts'o | 59be8e7 | 2011-07-30 12:38:46 -0400 | [diff] [blame] | 1121 | __field( __u16, mode ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1122 | __field( __u64, i_blocks ) |
| 1123 | __field( int, freed_blocks ) |
| 1124 | __field( int, reserved_data_blocks ) |
| 1125 | __field( int, reserved_meta_blocks ) |
| 1126 | __field( int, allocated_meta_blocks ) |
| 1127 | ), |
| 1128 | |
| 1129 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1130 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1131 | __entry->ino = inode->i_ino; |
| 1132 | __entry->mode = inode->i_mode; |
| 1133 | __entry->i_blocks = inode->i_blocks; |
| 1134 | __entry->freed_blocks = freed_blocks; |
| 1135 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 1136 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 1137 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; |
| 1138 | ), |
| 1139 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1140 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d " |
| 1141 | "reserved_data_blocks %d reserved_meta_blocks %d " |
| 1142 | "allocated_meta_blocks %d", |
| 1143 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1144 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1145 | __entry->mode, __entry->i_blocks, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1146 | __entry->freed_blocks, __entry->reserved_data_blocks, |
| 1147 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) |
| 1148 | ); |
| 1149 | |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1150 | DECLARE_EVENT_CLASS(ext4__bitmap_load, |
| 1151 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1152 | |
| 1153 | TP_ARGS(sb, group), |
| 1154 | |
| 1155 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1156 | __field( dev_t, dev ) |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1157 | __field( __u32, group ) |
| 1158 | |
| 1159 | ), |
| 1160 | |
| 1161 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1162 | __entry->dev = sb->s_dev; |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1163 | __entry->group = group; |
| 1164 | ), |
| 1165 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1166 | TP_printk("dev %d,%d group %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1167 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1168 | __entry->group) |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1169 | ); |
| 1170 | |
| 1171 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, |
| 1172 | |
| 1173 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1174 | |
| 1175 | TP_ARGS(sb, group) |
| 1176 | ); |
| 1177 | |
| 1178 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load, |
| 1179 | |
| 1180 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1181 | |
| 1182 | TP_ARGS(sb, group) |
| 1183 | ); |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1184 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1185 | DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load, |
| 1186 | |
| 1187 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1188 | |
| 1189 | TP_ARGS(sb, group) |
| 1190 | ); |
| 1191 | |
| 1192 | DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap, |
| 1193 | |
| 1194 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1195 | |
| 1196 | TP_ARGS(sb, group) |
| 1197 | ); |
| 1198 | |
| 1199 | TRACE_EVENT(ext4_direct_IO_enter, |
| 1200 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), |
| 1201 | |
| 1202 | TP_ARGS(inode, offset, len, rw), |
| 1203 | |
| 1204 | TP_STRUCT__entry( |
| 1205 | __field( ino_t, ino ) |
| 1206 | __field( dev_t, dev ) |
| 1207 | __field( loff_t, pos ) |
| 1208 | __field( unsigned long, len ) |
| 1209 | __field( int, rw ) |
| 1210 | ), |
| 1211 | |
| 1212 | TP_fast_assign( |
| 1213 | __entry->ino = inode->i_ino; |
| 1214 | __entry->dev = inode->i_sb->s_dev; |
| 1215 | __entry->pos = offset; |
| 1216 | __entry->len = len; |
| 1217 | __entry->rw = rw; |
| 1218 | ), |
| 1219 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1220 | 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] | 1221 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1222 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1223 | __entry->pos, __entry->len, __entry->rw) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1224 | ); |
| 1225 | |
| 1226 | TRACE_EVENT(ext4_direct_IO_exit, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1227 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, |
| 1228 | int rw, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1229 | |
| 1230 | TP_ARGS(inode, offset, len, rw, ret), |
| 1231 | |
| 1232 | TP_STRUCT__entry( |
| 1233 | __field( ino_t, ino ) |
| 1234 | __field( dev_t, dev ) |
| 1235 | __field( loff_t, pos ) |
| 1236 | __field( unsigned long, len ) |
| 1237 | __field( int, rw ) |
| 1238 | __field( int, ret ) |
| 1239 | ), |
| 1240 | |
| 1241 | TP_fast_assign( |
| 1242 | __entry->ino = inode->i_ino; |
| 1243 | __entry->dev = inode->i_sb->s_dev; |
| 1244 | __entry->pos = offset; |
| 1245 | __entry->len = len; |
| 1246 | __entry->rw = rw; |
| 1247 | __entry->ret = ret; |
| 1248 | ), |
| 1249 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1250 | 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] | 1251 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1252 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1253 | __entry->pos, __entry->len, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1254 | __entry->rw, __entry->ret) |
| 1255 | ); |
| 1256 | |
| 1257 | TRACE_EVENT(ext4_fallocate_enter, |
| 1258 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), |
| 1259 | |
| 1260 | TP_ARGS(inode, offset, len, mode), |
| 1261 | |
| 1262 | TP_STRUCT__entry( |
| 1263 | __field( ino_t, ino ) |
| 1264 | __field( dev_t, dev ) |
| 1265 | __field( loff_t, pos ) |
| 1266 | __field( loff_t, len ) |
| 1267 | __field( int, mode ) |
| 1268 | ), |
| 1269 | |
| 1270 | TP_fast_assign( |
| 1271 | __entry->ino = inode->i_ino; |
| 1272 | __entry->dev = inode->i_sb->s_dev; |
| 1273 | __entry->pos = offset; |
| 1274 | __entry->len = len; |
| 1275 | __entry->mode = mode; |
| 1276 | ), |
| 1277 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1278 | 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] | 1279 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1280 | (unsigned long) __entry->ino, __entry->pos, |
| 1281 | __entry->len, __entry->mode) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1282 | ); |
| 1283 | |
| 1284 | TRACE_EVENT(ext4_fallocate_exit, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1285 | TP_PROTO(struct inode *inode, loff_t offset, |
| 1286 | unsigned int max_blocks, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1287 | |
| 1288 | TP_ARGS(inode, offset, max_blocks, ret), |
| 1289 | |
| 1290 | TP_STRUCT__entry( |
| 1291 | __field( ino_t, ino ) |
| 1292 | __field( dev_t, dev ) |
| 1293 | __field( loff_t, pos ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1294 | __field( unsigned int, blocks ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1295 | __field( int, ret ) |
| 1296 | ), |
| 1297 | |
| 1298 | TP_fast_assign( |
| 1299 | __entry->ino = inode->i_ino; |
| 1300 | __entry->dev = inode->i_sb->s_dev; |
| 1301 | __entry->pos = offset; |
| 1302 | __entry->blocks = max_blocks; |
| 1303 | __entry->ret = ret; |
| 1304 | ), |
| 1305 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1306 | 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] | 1307 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1308 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1309 | __entry->pos, __entry->blocks, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1310 | __entry->ret) |
| 1311 | ); |
| 1312 | |
| 1313 | TRACE_EVENT(ext4_unlink_enter, |
| 1314 | TP_PROTO(struct inode *parent, struct dentry *dentry), |
| 1315 | |
| 1316 | TP_ARGS(parent, dentry), |
| 1317 | |
| 1318 | TP_STRUCT__entry( |
| 1319 | __field( ino_t, parent ) |
| 1320 | __field( ino_t, ino ) |
| 1321 | __field( loff_t, size ) |
| 1322 | __field( dev_t, dev ) |
| 1323 | ), |
| 1324 | |
| 1325 | TP_fast_assign( |
| 1326 | __entry->parent = parent->i_ino; |
| 1327 | __entry->ino = dentry->d_inode->i_ino; |
| 1328 | __entry->size = dentry->d_inode->i_size; |
| 1329 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
| 1330 | ), |
| 1331 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1332 | TP_printk("dev %d,%d ino %lu size %lld parent %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1333 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1334 | (unsigned long) __entry->ino, __entry->size, |
| 1335 | (unsigned long) __entry->parent) |
| 1336 | ); |
| 1337 | |
| 1338 | TRACE_EVENT(ext4_unlink_exit, |
| 1339 | TP_PROTO(struct dentry *dentry, int ret), |
| 1340 | |
| 1341 | TP_ARGS(dentry, ret), |
| 1342 | |
| 1343 | TP_STRUCT__entry( |
| 1344 | __field( ino_t, ino ) |
| 1345 | __field( dev_t, dev ) |
| 1346 | __field( int, ret ) |
| 1347 | ), |
| 1348 | |
| 1349 | TP_fast_assign( |
| 1350 | __entry->ino = dentry->d_inode->i_ino; |
| 1351 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
| 1352 | __entry->ret = ret; |
| 1353 | ), |
| 1354 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1355 | TP_printk("dev %d,%d ino %lu ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1356 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1357 | (unsigned long) __entry->ino, |
| 1358 | __entry->ret) |
| 1359 | ); |
| 1360 | |
| 1361 | DECLARE_EVENT_CLASS(ext4__truncate, |
| 1362 | TP_PROTO(struct inode *inode), |
| 1363 | |
| 1364 | TP_ARGS(inode), |
| 1365 | |
| 1366 | TP_STRUCT__entry( |
| 1367 | __field( ino_t, ino ) |
| 1368 | __field( dev_t, dev ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1369 | __field( __u64, blocks ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1370 | ), |
| 1371 | |
| 1372 | TP_fast_assign( |
| 1373 | __entry->ino = inode->i_ino; |
| 1374 | __entry->dev = inode->i_sb->s_dev; |
| 1375 | __entry->blocks = inode->i_blocks; |
| 1376 | ), |
| 1377 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1378 | TP_printk("dev %d,%d ino %lu blocks %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1379 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1380 | (unsigned long) __entry->ino, __entry->blocks) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1381 | ); |
| 1382 | |
| 1383 | DEFINE_EVENT(ext4__truncate, ext4_truncate_enter, |
| 1384 | |
| 1385 | TP_PROTO(struct inode *inode), |
| 1386 | |
| 1387 | TP_ARGS(inode) |
| 1388 | ); |
| 1389 | |
| 1390 | DEFINE_EVENT(ext4__truncate, ext4_truncate_exit, |
| 1391 | |
| 1392 | TP_PROTO(struct inode *inode), |
| 1393 | |
| 1394 | TP_ARGS(inode) |
| 1395 | ); |
| 1396 | |
| 1397 | DECLARE_EVENT_CLASS(ext4__map_blocks_enter, |
| 1398 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1399 | unsigned int len, unsigned int flags), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1400 | |
| 1401 | TP_ARGS(inode, lblk, len, flags), |
| 1402 | |
| 1403 | TP_STRUCT__entry( |
| 1404 | __field( ino_t, ino ) |
| 1405 | __field( dev_t, dev ) |
| 1406 | __field( ext4_lblk_t, lblk ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1407 | __field( unsigned int, len ) |
| 1408 | __field( unsigned int, flags ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1409 | ), |
| 1410 | |
| 1411 | TP_fast_assign( |
| 1412 | __entry->ino = inode->i_ino; |
| 1413 | __entry->dev = inode->i_sb->s_dev; |
| 1414 | __entry->lblk = lblk; |
| 1415 | __entry->len = len; |
| 1416 | __entry->flags = flags; |
| 1417 | ), |
| 1418 | |
| 1419 | TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u", |
| 1420 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1421 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1422 | __entry->lblk, __entry->len, __entry->flags) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1423 | ); |
| 1424 | |
| 1425 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter, |
| 1426 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1427 | unsigned len, unsigned flags), |
| 1428 | |
| 1429 | TP_ARGS(inode, lblk, len, flags) |
| 1430 | ); |
| 1431 | |
| 1432 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter, |
| 1433 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1434 | unsigned len, unsigned flags), |
| 1435 | |
| 1436 | TP_ARGS(inode, lblk, len, flags) |
| 1437 | ); |
| 1438 | |
| 1439 | DECLARE_EVENT_CLASS(ext4__map_blocks_exit, |
| 1440 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1441 | ext4_fsblk_t pblk, unsigned int len, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1442 | |
| 1443 | TP_ARGS(inode, lblk, pblk, len, ret), |
| 1444 | |
| 1445 | TP_STRUCT__entry( |
| 1446 | __field( ino_t, ino ) |
| 1447 | __field( dev_t, dev ) |
| 1448 | __field( ext4_lblk_t, lblk ) |
| 1449 | __field( ext4_fsblk_t, pblk ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1450 | __field( unsigned int, len ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1451 | __field( int, ret ) |
| 1452 | ), |
| 1453 | |
| 1454 | TP_fast_assign( |
| 1455 | __entry->ino = inode->i_ino; |
| 1456 | __entry->dev = inode->i_sb->s_dev; |
| 1457 | __entry->lblk = lblk; |
| 1458 | __entry->pblk = pblk; |
| 1459 | __entry->len = len; |
| 1460 | __entry->ret = ret; |
| 1461 | ), |
| 1462 | |
| 1463 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d", |
| 1464 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1465 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1466 | __entry->lblk, __entry->pblk, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1467 | __entry->len, __entry->ret) |
| 1468 | ); |
| 1469 | |
| 1470 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, |
| 1471 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1472 | ext4_fsblk_t pblk, unsigned len, int ret), |
| 1473 | |
| 1474 | TP_ARGS(inode, lblk, pblk, len, ret) |
| 1475 | ); |
| 1476 | |
| 1477 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, |
| 1478 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1479 | ext4_fsblk_t pblk, unsigned len, int ret), |
| 1480 | |
| 1481 | TP_ARGS(inode, lblk, pblk, len, ret) |
| 1482 | ); |
| 1483 | |
| 1484 | TRACE_EVENT(ext4_ext_load_extent, |
| 1485 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk), |
| 1486 | |
| 1487 | TP_ARGS(inode, lblk, pblk), |
| 1488 | |
| 1489 | TP_STRUCT__entry( |
| 1490 | __field( ino_t, ino ) |
| 1491 | __field( dev_t, dev ) |
| 1492 | __field( ext4_lblk_t, lblk ) |
| 1493 | __field( ext4_fsblk_t, pblk ) |
| 1494 | ), |
| 1495 | |
| 1496 | TP_fast_assign( |
| 1497 | __entry->ino = inode->i_ino; |
| 1498 | __entry->dev = inode->i_sb->s_dev; |
| 1499 | __entry->lblk = lblk; |
| 1500 | __entry->pblk = pblk; |
| 1501 | ), |
| 1502 | |
| 1503 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu", |
| 1504 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1505 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1506 | __entry->lblk, __entry->pblk) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1507 | ); |
| 1508 | |
| 1509 | TRACE_EVENT(ext4_load_inode, |
| 1510 | TP_PROTO(struct inode *inode), |
| 1511 | |
| 1512 | TP_ARGS(inode), |
| 1513 | |
| 1514 | TP_STRUCT__entry( |
| 1515 | __field( ino_t, ino ) |
| 1516 | __field( dev_t, dev ) |
| 1517 | ), |
| 1518 | |
| 1519 | TP_fast_assign( |
| 1520 | __entry->ino = inode->i_ino; |
| 1521 | __entry->dev = inode->i_sb->s_dev; |
| 1522 | ), |
| 1523 | |
| 1524 | TP_printk("dev %d,%d ino %ld", |
| 1525 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1526 | (unsigned long) __entry->ino) |
| 1527 | ); |
| 1528 | |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1529 | TRACE_EVENT(ext4_journal_start, |
| 1530 | TP_PROTO(struct super_block *sb, int nblocks, unsigned long IP), |
| 1531 | |
| 1532 | TP_ARGS(sb, nblocks, IP), |
| 1533 | |
| 1534 | TP_STRUCT__entry( |
| 1535 | __field( dev_t, dev ) |
| 1536 | __field( int, nblocks ) |
| 1537 | __field(unsigned long, ip ) |
| 1538 | ), |
| 1539 | |
| 1540 | TP_fast_assign( |
| 1541 | __entry->dev = sb->s_dev; |
| 1542 | __entry->nblocks = nblocks; |
| 1543 | __entry->ip = IP; |
| 1544 | ), |
| 1545 | |
| 1546 | TP_printk("dev %d,%d nblocks %d caller %pF", |
| 1547 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1548 | __entry->nblocks, (void *)__entry->ip) |
| 1549 | ); |
| 1550 | |
Tao Ma | b3d4c2b | 2011-07-11 00:01:52 -0400 | [diff] [blame] | 1551 | DECLARE_EVENT_CLASS(ext4__trim, |
| 1552 | TP_PROTO(struct super_block *sb, |
| 1553 | ext4_group_t group, |
| 1554 | ext4_grpblk_t start, |
| 1555 | ext4_grpblk_t len), |
| 1556 | |
| 1557 | TP_ARGS(sb, group, start, len), |
| 1558 | |
| 1559 | TP_STRUCT__entry( |
| 1560 | __field( int, dev_major ) |
| 1561 | __field( int, dev_minor ) |
| 1562 | __field( __u32, group ) |
| 1563 | __field( int, start ) |
| 1564 | __field( int, len ) |
| 1565 | ), |
| 1566 | |
| 1567 | TP_fast_assign( |
| 1568 | __entry->dev_major = MAJOR(sb->s_dev); |
| 1569 | __entry->dev_minor = MINOR(sb->s_dev); |
| 1570 | __entry->group = group; |
| 1571 | __entry->start = start; |
| 1572 | __entry->len = len; |
| 1573 | ), |
| 1574 | |
| 1575 | TP_printk("dev %d,%d group %u, start %d, len %d", |
| 1576 | __entry->dev_major, __entry->dev_minor, |
| 1577 | __entry->group, __entry->start, __entry->len) |
| 1578 | ); |
| 1579 | |
| 1580 | DEFINE_EVENT(ext4__trim, ext4_trim_extent, |
| 1581 | |
| 1582 | TP_PROTO(struct super_block *sb, |
| 1583 | ext4_group_t group, |
| 1584 | ext4_grpblk_t start, |
| 1585 | ext4_grpblk_t len), |
| 1586 | |
| 1587 | TP_ARGS(sb, group, start, len) |
| 1588 | ); |
| 1589 | |
| 1590 | DEFINE_EVENT(ext4__trim, ext4_trim_all_free, |
| 1591 | |
| 1592 | TP_PROTO(struct super_block *sb, |
| 1593 | ext4_group_t group, |
| 1594 | ext4_grpblk_t start, |
| 1595 | ext4_grpblk_t len), |
| 1596 | |
| 1597 | TP_ARGS(sb, group, start, len) |
| 1598 | ); |
| 1599 | |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame^] | 1600 | TRACE_EVENT(ext4_ext_handle_uninitialized_extents, |
| 1601 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, |
| 1602 | unsigned int allocated, ext4_fsblk_t newblock), |
| 1603 | |
| 1604 | TP_ARGS(inode, map, allocated, newblock), |
| 1605 | |
| 1606 | TP_STRUCT__entry( |
| 1607 | __field( ino_t, ino ) |
| 1608 | __field( dev_t, dev ) |
| 1609 | __field( ext4_lblk_t, lblk ) |
| 1610 | __field( ext4_fsblk_t, pblk ) |
| 1611 | __field( unsigned int, len ) |
| 1612 | __field( int, flags ) |
| 1613 | __field( unsigned int, allocated ) |
| 1614 | __field( ext4_fsblk_t, newblk ) |
| 1615 | ), |
| 1616 | |
| 1617 | TP_fast_assign( |
| 1618 | __entry->ino = inode->i_ino; |
| 1619 | __entry->dev = inode->i_sb->s_dev; |
| 1620 | __entry->lblk = map->m_lblk; |
| 1621 | __entry->pblk = map->m_pblk; |
| 1622 | __entry->len = map->m_len; |
| 1623 | __entry->flags = map->m_flags; |
| 1624 | __entry->allocated = allocated; |
| 1625 | __entry->newblk = newblock; |
| 1626 | ), |
| 1627 | |
| 1628 | TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %d" |
| 1629 | "allocated %d newblock %llu", |
| 1630 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1631 | (unsigned long) __entry->ino, |
| 1632 | (unsigned) __entry->lblk, (unsigned long long) __entry->pblk, |
| 1633 | __entry->len, __entry->flags, |
| 1634 | (unsigned int) __entry->allocated, |
| 1635 | (unsigned long long) __entry->newblk) |
| 1636 | ); |
| 1637 | |
| 1638 | TRACE_EVENT(ext4_get_implied_cluster_alloc_exit, |
| 1639 | TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret), |
| 1640 | |
| 1641 | TP_ARGS(sb, map, ret), |
| 1642 | |
| 1643 | TP_STRUCT__entry( |
| 1644 | __field( dev_t, dev ) |
| 1645 | __field( ext4_lblk_t, lblk ) |
| 1646 | __field( ext4_fsblk_t, pblk ) |
| 1647 | __field( unsigned int, len ) |
| 1648 | __field( unsigned int, flags ) |
| 1649 | __field( int, ret ) |
| 1650 | ), |
| 1651 | |
| 1652 | TP_fast_assign( |
| 1653 | __entry->dev = sb->s_dev; |
| 1654 | __entry->lblk = map->m_lblk; |
| 1655 | __entry->pblk = map->m_pblk; |
| 1656 | __entry->len = map->m_len; |
| 1657 | __entry->flags = map->m_flags; |
| 1658 | __entry->ret = ret; |
| 1659 | ), |
| 1660 | |
| 1661 | TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %u ret %d", |
| 1662 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1663 | __entry->lblk, (unsigned long long) __entry->pblk, |
| 1664 | __entry->len, __entry->flags, __entry->ret) |
| 1665 | ); |
| 1666 | |
| 1667 | TRACE_EVENT(ext4_ext_put_in_cache, |
| 1668 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len, |
| 1669 | ext4_fsblk_t start), |
| 1670 | |
| 1671 | TP_ARGS(inode, lblk, len, start), |
| 1672 | |
| 1673 | TP_STRUCT__entry( |
| 1674 | __field( ino_t, ino ) |
| 1675 | __field( dev_t, dev ) |
| 1676 | __field( ext4_lblk_t, lblk ) |
| 1677 | __field( unsigned int, len ) |
| 1678 | __field( ext4_fsblk_t, start ) |
| 1679 | ), |
| 1680 | |
| 1681 | TP_fast_assign( |
| 1682 | __entry->ino = inode->i_ino; |
| 1683 | __entry->dev = inode->i_sb->s_dev; |
| 1684 | __entry->lblk = lblk; |
| 1685 | __entry->len = len; |
| 1686 | __entry->start = start; |
| 1687 | ), |
| 1688 | |
| 1689 | TP_printk("dev %d,%d ino %lu lblk %u len %u start %llu", |
| 1690 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1691 | (unsigned long) __entry->ino, |
| 1692 | (unsigned) __entry->lblk, |
| 1693 | __entry->len, |
| 1694 | (unsigned long long) __entry->start) |
| 1695 | ); |
| 1696 | |
| 1697 | TRACE_EVENT(ext4_ext_in_cache, |
| 1698 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret), |
| 1699 | |
| 1700 | TP_ARGS(inode, lblk, ret), |
| 1701 | |
| 1702 | TP_STRUCT__entry( |
| 1703 | __field( ino_t, ino ) |
| 1704 | __field( dev_t, dev ) |
| 1705 | __field( ext4_lblk_t, lblk ) |
| 1706 | __field( int, ret ) |
| 1707 | ), |
| 1708 | |
| 1709 | TP_fast_assign( |
| 1710 | __entry->ino = inode->i_ino; |
| 1711 | __entry->dev = inode->i_sb->s_dev; |
| 1712 | __entry->lblk = lblk; |
| 1713 | __entry->ret = ret; |
| 1714 | ), |
| 1715 | |
| 1716 | TP_printk("dev %d,%d ino %lu lblk %u ret %d", |
| 1717 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1718 | (unsigned long) __entry->ino, |
| 1719 | (unsigned) __entry->lblk, |
| 1720 | __entry->ret) |
| 1721 | |
| 1722 | ); |
| 1723 | |
| 1724 | TRACE_EVENT(ext4_find_delalloc_range, |
| 1725 | TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to, |
| 1726 | int reverse, int found, ext4_lblk_t found_blk), |
| 1727 | |
| 1728 | TP_ARGS(inode, from, to, reverse, found, found_blk), |
| 1729 | |
| 1730 | TP_STRUCT__entry( |
| 1731 | __field( ino_t, ino ) |
| 1732 | __field( dev_t, dev ) |
| 1733 | __field( ext4_lblk_t, from ) |
| 1734 | __field( ext4_lblk_t, to ) |
| 1735 | __field( int, reverse ) |
| 1736 | __field( int, found ) |
| 1737 | __field( ext4_lblk_t, found_blk ) |
| 1738 | ), |
| 1739 | |
| 1740 | TP_fast_assign( |
| 1741 | __entry->ino = inode->i_ino; |
| 1742 | __entry->dev = inode->i_sb->s_dev; |
| 1743 | __entry->from = from; |
| 1744 | __entry->to = to; |
| 1745 | __entry->reverse = reverse; |
| 1746 | __entry->found = found; |
| 1747 | __entry->found_blk = found_blk; |
| 1748 | ), |
| 1749 | |
| 1750 | TP_printk("dev %d,%d ino %lu from %u to %u reverse %d found %d " |
| 1751 | "(blk = %u)", |
| 1752 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1753 | (unsigned long) __entry->ino, |
| 1754 | (unsigned) __entry->from, (unsigned) __entry->to, |
| 1755 | __entry->reverse, __entry->found, |
| 1756 | (unsigned) __entry->found_blk) |
| 1757 | ); |
| 1758 | |
| 1759 | TRACE_EVENT(ext4_get_reserved_cluster_alloc, |
| 1760 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len), |
| 1761 | |
| 1762 | TP_ARGS(inode, lblk, len), |
| 1763 | |
| 1764 | TP_STRUCT__entry( |
| 1765 | __field( ino_t, ino ) |
| 1766 | __field( dev_t, dev ) |
| 1767 | __field( ext4_lblk_t, lblk ) |
| 1768 | __field( unsigned int, len ) |
| 1769 | ), |
| 1770 | |
| 1771 | TP_fast_assign( |
| 1772 | __entry->ino = inode->i_ino; |
| 1773 | __entry->dev = inode->i_sb->s_dev; |
| 1774 | __entry->lblk = lblk; |
| 1775 | __entry->len = len; |
| 1776 | ), |
| 1777 | |
| 1778 | TP_printk("dev %d,%d ino %lu lblk %u len %u", |
| 1779 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1780 | (unsigned long) __entry->ino, |
| 1781 | (unsigned) __entry->lblk, |
| 1782 | __entry->len) |
| 1783 | ); |
| 1784 | |
| 1785 | TRACE_EVENT(ext4_ext_show_extent, |
| 1786 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk, |
| 1787 | unsigned short len), |
| 1788 | |
| 1789 | TP_ARGS(inode, lblk, pblk, len), |
| 1790 | |
| 1791 | TP_STRUCT__entry( |
| 1792 | __field( ino_t, ino ) |
| 1793 | __field( dev_t, dev ) |
| 1794 | __field( ext4_lblk_t, lblk ) |
| 1795 | __field( ext4_fsblk_t, pblk ) |
| 1796 | __field( unsigned short, len ) |
| 1797 | ), |
| 1798 | |
| 1799 | TP_fast_assign( |
| 1800 | __entry->ino = inode->i_ino; |
| 1801 | __entry->dev = inode->i_sb->s_dev; |
| 1802 | __entry->lblk = lblk; |
| 1803 | __entry->pblk = pblk; |
| 1804 | __entry->len = len; |
| 1805 | ), |
| 1806 | |
| 1807 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u", |
| 1808 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1809 | (unsigned long) __entry->ino, |
| 1810 | (unsigned) __entry->lblk, |
| 1811 | (unsigned long long) __entry->pblk, |
| 1812 | (unsigned short) __entry->len) |
| 1813 | ); |
| 1814 | |
| 1815 | TRACE_EVENT(ext4_remove_blocks, |
| 1816 | TP_PROTO(struct inode *inode, struct ext4_extent *ex, |
| 1817 | ext4_lblk_t from, ext4_fsblk_t to, |
| 1818 | ext4_fsblk_t partial_cluster), |
| 1819 | |
| 1820 | TP_ARGS(inode, ex, from, to, partial_cluster), |
| 1821 | |
| 1822 | TP_STRUCT__entry( |
| 1823 | __field( ino_t, ino ) |
| 1824 | __field( dev_t, dev ) |
| 1825 | __field( ext4_lblk_t, ee_lblk ) |
| 1826 | __field( ext4_fsblk_t, ee_pblk ) |
| 1827 | __field( unsigned short, ee_len ) |
| 1828 | __field( ext4_lblk_t, from ) |
| 1829 | __field( ext4_lblk_t, to ) |
| 1830 | __field( ext4_fsblk_t, partial ) |
| 1831 | ), |
| 1832 | |
| 1833 | TP_fast_assign( |
| 1834 | __entry->ino = inode->i_ino; |
| 1835 | __entry->dev = inode->i_sb->s_dev; |
| 1836 | __entry->ee_lblk = cpu_to_le32(ex->ee_block); |
| 1837 | __entry->ee_pblk = ext4_ext_pblock(ex); |
| 1838 | __entry->ee_len = ext4_ext_get_actual_len(ex); |
| 1839 | __entry->from = from; |
| 1840 | __entry->to = to; |
| 1841 | __entry->partial = partial_cluster; |
| 1842 | ), |
| 1843 | |
| 1844 | TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]" |
| 1845 | "from %u to %u partial_cluster %u", |
| 1846 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1847 | (unsigned long) __entry->ino, |
| 1848 | (unsigned) __entry->ee_lblk, |
| 1849 | (unsigned long long) __entry->ee_pblk, |
| 1850 | (unsigned short) __entry->ee_len, |
| 1851 | (unsigned) __entry->from, |
| 1852 | (unsigned) __entry->to, |
| 1853 | (unsigned) __entry->partial) |
| 1854 | ); |
| 1855 | |
| 1856 | TRACE_EVENT(ext4_ext_rm_leaf, |
| 1857 | TP_PROTO(struct inode *inode, ext4_lblk_t start, |
| 1858 | struct ext4_extent *ex, ext4_fsblk_t partial_cluster), |
| 1859 | |
| 1860 | TP_ARGS(inode, start, ex, partial_cluster), |
| 1861 | |
| 1862 | TP_STRUCT__entry( |
| 1863 | __field( ino_t, ino ) |
| 1864 | __field( dev_t, dev ) |
| 1865 | __field( ext4_lblk_t, start ) |
| 1866 | __field( ext4_lblk_t, ee_lblk ) |
| 1867 | __field( ext4_fsblk_t, ee_pblk ) |
| 1868 | __field( short, ee_len ) |
| 1869 | __field( ext4_fsblk_t, partial ) |
| 1870 | ), |
| 1871 | |
| 1872 | TP_fast_assign( |
| 1873 | __entry->ino = inode->i_ino; |
| 1874 | __entry->dev = inode->i_sb->s_dev; |
| 1875 | __entry->start = start; |
| 1876 | __entry->ee_lblk = le32_to_cpu(ex->ee_block); |
| 1877 | __entry->ee_pblk = ext4_ext_pblock(ex); |
| 1878 | __entry->ee_len = ext4_ext_get_actual_len(ex); |
| 1879 | __entry->partial = partial_cluster; |
| 1880 | ), |
| 1881 | |
| 1882 | TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]" |
| 1883 | "partial_cluster %u", |
| 1884 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1885 | (unsigned long) __entry->ino, |
| 1886 | (unsigned) __entry->start, |
| 1887 | (unsigned) __entry->ee_lblk, |
| 1888 | (unsigned long long) __entry->ee_pblk, |
| 1889 | (unsigned short) __entry->ee_len, |
| 1890 | (unsigned) __entry->partial) |
| 1891 | ); |
| 1892 | |
| 1893 | TRACE_EVENT(ext4_ext_rm_idx, |
| 1894 | TP_PROTO(struct inode *inode, ext4_fsblk_t pblk), |
| 1895 | |
| 1896 | TP_ARGS(inode, pblk), |
| 1897 | |
| 1898 | TP_STRUCT__entry( |
| 1899 | __field( ino_t, ino ) |
| 1900 | __field( dev_t, dev ) |
| 1901 | __field( ext4_fsblk_t, pblk ) |
| 1902 | ), |
| 1903 | |
| 1904 | TP_fast_assign( |
| 1905 | __entry->ino = inode->i_ino; |
| 1906 | __entry->dev = inode->i_sb->s_dev; |
| 1907 | __entry->pblk = pblk; |
| 1908 | ), |
| 1909 | |
| 1910 | TP_printk("dev %d,%d ino %lu index_pblk %llu", |
| 1911 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1912 | (unsigned long) __entry->ino, |
| 1913 | (unsigned long long) __entry->pblk) |
| 1914 | ); |
| 1915 | |
| 1916 | TRACE_EVENT(ext4_ext_remove_space, |
| 1917 | TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth), |
| 1918 | |
| 1919 | TP_ARGS(inode, start, depth), |
| 1920 | |
| 1921 | TP_STRUCT__entry( |
| 1922 | __field( ino_t, ino ) |
| 1923 | __field( dev_t, dev ) |
| 1924 | __field( ext4_lblk_t, start ) |
| 1925 | __field( int, depth ) |
| 1926 | ), |
| 1927 | |
| 1928 | TP_fast_assign( |
| 1929 | __entry->ino = inode->i_ino; |
| 1930 | __entry->dev = inode->i_sb->s_dev; |
| 1931 | __entry->start = start; |
| 1932 | __entry->depth = depth; |
| 1933 | ), |
| 1934 | |
| 1935 | TP_printk("dev %d,%d ino %lu since %u depth %d", |
| 1936 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1937 | (unsigned long) __entry->ino, |
| 1938 | (unsigned) __entry->start, |
| 1939 | __entry->depth) |
| 1940 | ); |
| 1941 | |
| 1942 | TRACE_EVENT(ext4_ext_remove_space_done, |
| 1943 | TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth, |
| 1944 | ext4_lblk_t partial, unsigned short eh_entries), |
| 1945 | |
| 1946 | TP_ARGS(inode, start, depth, partial, eh_entries), |
| 1947 | |
| 1948 | TP_STRUCT__entry( |
| 1949 | __field( ino_t, ino ) |
| 1950 | __field( dev_t, dev ) |
| 1951 | __field( ext4_lblk_t, start ) |
| 1952 | __field( int, depth ) |
| 1953 | __field( ext4_lblk_t, partial ) |
| 1954 | __field( unsigned short, eh_entries ) |
| 1955 | ), |
| 1956 | |
| 1957 | TP_fast_assign( |
| 1958 | __entry->ino = inode->i_ino; |
| 1959 | __entry->dev = inode->i_sb->s_dev; |
| 1960 | __entry->start = start; |
| 1961 | __entry->depth = depth; |
| 1962 | __entry->partial = partial; |
| 1963 | __entry->eh_entries = eh_entries; |
| 1964 | ), |
| 1965 | |
| 1966 | TP_printk("dev %d,%d ino %lu since %u depth %d partial %u " |
| 1967 | "remaining_entries %u", |
| 1968 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1969 | (unsigned long) __entry->ino, |
| 1970 | (unsigned) __entry->start, |
| 1971 | __entry->depth, |
| 1972 | (unsigned) __entry->partial, |
| 1973 | (unsigned short) __entry->eh_entries) |
| 1974 | ); |
| 1975 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 1976 | #endif /* _TRACE_EXT4_H */ |
| 1977 | |
| 1978 | /* This part must be outside protection */ |
| 1979 | #include <trace/define_trace.h> |