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