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