Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM ext4 |
| 3 | |
Li Zefan | d0b6e04 | 2009-07-13 10:33:21 +0800 | [diff] [blame] | 4 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_EXT4_H |
| 6 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 7 | #include <linux/writeback.h> |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 8 | #include <linux/tracepoint.h> |
| 9 | |
Theodore Ts'o | 3661d28 | 2009-09-14 22:59:50 -0400 | [diff] [blame^] | 10 | struct ext4_allocation_context; |
| 11 | struct ext4_allocation_request; |
| 12 | struct ext4_prealloc_space; |
| 13 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 14 | TRACE_EVENT(ext4_free_inode, |
| 15 | TP_PROTO(struct inode *inode), |
| 16 | |
| 17 | TP_ARGS(inode), |
| 18 | |
| 19 | TP_STRUCT__entry( |
| 20 | __field( dev_t, dev ) |
| 21 | __field( ino_t, ino ) |
| 22 | __field( umode_t, mode ) |
| 23 | __field( uid_t, uid ) |
| 24 | __field( gid_t, gid ) |
| 25 | __field( blkcnt_t, blocks ) |
| 26 | ), |
| 27 | |
| 28 | TP_fast_assign( |
| 29 | __entry->dev = inode->i_sb->s_dev; |
| 30 | __entry->ino = inode->i_ino; |
| 31 | __entry->mode = inode->i_mode; |
| 32 | __entry->uid = inode->i_uid; |
| 33 | __entry->gid = inode->i_gid; |
| 34 | __entry->blocks = inode->i_blocks; |
| 35 | ), |
| 36 | |
| 37 | TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 38 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 39 | __entry->mode, __entry->uid, __entry->gid, |
Theodore Ts'o | 627ad9f | 2009-06-20 23:21:41 -0400 | [diff] [blame] | 40 | (unsigned long long) __entry->blocks) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 41 | ); |
| 42 | |
| 43 | TRACE_EVENT(ext4_request_inode, |
| 44 | TP_PROTO(struct inode *dir, int mode), |
| 45 | |
| 46 | TP_ARGS(dir, mode), |
| 47 | |
| 48 | TP_STRUCT__entry( |
| 49 | __field( dev_t, dev ) |
| 50 | __field( ino_t, dir ) |
| 51 | __field( umode_t, mode ) |
| 52 | ), |
| 53 | |
| 54 | TP_fast_assign( |
| 55 | __entry->dev = dir->i_sb->s_dev; |
| 56 | __entry->dir = dir->i_ino; |
| 57 | __entry->mode = mode; |
| 58 | ), |
| 59 | |
| 60 | TP_printk("dev %s dir %lu mode %d", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 61 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->dir, |
| 62 | __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 63 | ); |
| 64 | |
| 65 | TRACE_EVENT(ext4_allocate_inode, |
| 66 | TP_PROTO(struct inode *inode, struct inode *dir, int mode), |
| 67 | |
| 68 | TP_ARGS(inode, dir, mode), |
| 69 | |
| 70 | TP_STRUCT__entry( |
| 71 | __field( dev_t, dev ) |
| 72 | __field( ino_t, ino ) |
| 73 | __field( ino_t, dir ) |
| 74 | __field( umode_t, mode ) |
| 75 | ), |
| 76 | |
| 77 | TP_fast_assign( |
| 78 | __entry->dev = inode->i_sb->s_dev; |
| 79 | __entry->ino = inode->i_ino; |
| 80 | __entry->dir = dir->i_ino; |
| 81 | __entry->mode = mode; |
| 82 | ), |
| 83 | |
| 84 | TP_printk("dev %s ino %lu dir %lu mode %d", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 85 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 86 | (unsigned long) __entry->dir, __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 87 | ); |
| 88 | |
| 89 | TRACE_EVENT(ext4_write_begin, |
| 90 | |
| 91 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 92 | unsigned int flags), |
| 93 | |
| 94 | TP_ARGS(inode, pos, len, flags), |
| 95 | |
| 96 | TP_STRUCT__entry( |
| 97 | __field( dev_t, dev ) |
| 98 | __field( ino_t, ino ) |
| 99 | __field( loff_t, pos ) |
| 100 | __field( unsigned int, len ) |
| 101 | __field( unsigned int, flags ) |
| 102 | ), |
| 103 | |
| 104 | TP_fast_assign( |
| 105 | __entry->dev = inode->i_sb->s_dev; |
| 106 | __entry->ino = inode->i_ino; |
| 107 | __entry->pos = pos; |
| 108 | __entry->len = len; |
| 109 | __entry->flags = flags; |
| 110 | ), |
| 111 | |
| 112 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 113 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 114 | __entry->pos, __entry->len, __entry->flags) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 115 | ); |
| 116 | |
| 117 | TRACE_EVENT(ext4_ordered_write_end, |
| 118 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 119 | unsigned int copied), |
| 120 | |
| 121 | TP_ARGS(inode, pos, len, copied), |
| 122 | |
| 123 | TP_STRUCT__entry( |
| 124 | __field( dev_t, dev ) |
| 125 | __field( ino_t, ino ) |
| 126 | __field( loff_t, pos ) |
| 127 | __field( unsigned int, len ) |
| 128 | __field( unsigned int, copied ) |
| 129 | ), |
| 130 | |
| 131 | TP_fast_assign( |
| 132 | __entry->dev = inode->i_sb->s_dev; |
| 133 | __entry->ino = inode->i_ino; |
| 134 | __entry->pos = pos; |
| 135 | __entry->len = len; |
| 136 | __entry->copied = copied; |
| 137 | ), |
| 138 | |
| 139 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 140 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 141 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 142 | ); |
| 143 | |
| 144 | TRACE_EVENT(ext4_writeback_write_end, |
| 145 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 146 | unsigned int copied), |
| 147 | |
| 148 | TP_ARGS(inode, pos, len, copied), |
| 149 | |
| 150 | TP_STRUCT__entry( |
| 151 | __field( dev_t, dev ) |
| 152 | __field( ino_t, ino ) |
| 153 | __field( loff_t, pos ) |
| 154 | __field( unsigned int, len ) |
| 155 | __field( unsigned int, copied ) |
| 156 | ), |
| 157 | |
| 158 | TP_fast_assign( |
| 159 | __entry->dev = inode->i_sb->s_dev; |
| 160 | __entry->ino = inode->i_ino; |
| 161 | __entry->pos = pos; |
| 162 | __entry->len = len; |
| 163 | __entry->copied = copied; |
| 164 | ), |
| 165 | |
| 166 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 167 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 168 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 169 | ); |
| 170 | |
| 171 | TRACE_EVENT(ext4_journalled_write_end, |
| 172 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 173 | unsigned int copied), |
| 174 | TP_ARGS(inode, pos, len, copied), |
| 175 | |
| 176 | TP_STRUCT__entry( |
| 177 | __field( dev_t, dev ) |
| 178 | __field( ino_t, ino ) |
| 179 | __field( loff_t, pos ) |
| 180 | __field( unsigned int, len ) |
| 181 | __field( unsigned int, copied ) |
| 182 | ), |
| 183 | |
| 184 | TP_fast_assign( |
| 185 | __entry->dev = inode->i_sb->s_dev; |
| 186 | __entry->ino = inode->i_ino; |
| 187 | __entry->pos = pos; |
| 188 | __entry->len = len; |
| 189 | __entry->copied = copied; |
| 190 | ), |
| 191 | |
| 192 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 193 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 194 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 195 | ); |
| 196 | |
Aneesh Kumar K.V | 43ce1d2 | 2009-06-14 17:58:45 -0400 | [diff] [blame] | 197 | TRACE_EVENT(ext4_writepage, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 198 | TP_PROTO(struct inode *inode, struct page *page), |
| 199 | |
| 200 | TP_ARGS(inode, page), |
| 201 | |
| 202 | TP_STRUCT__entry( |
| 203 | __field( dev_t, dev ) |
| 204 | __field( ino_t, ino ) |
| 205 | __field( pgoff_t, index ) |
| 206 | |
| 207 | ), |
| 208 | |
| 209 | TP_fast_assign( |
| 210 | __entry->dev = inode->i_sb->s_dev; |
| 211 | __entry->ino = inode->i_ino; |
| 212 | __entry->index = page->index; |
| 213 | ), |
| 214 | |
| 215 | TP_printk("dev %s ino %lu page_index %lu", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 216 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 217 | __entry->index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 218 | ); |
| 219 | |
| 220 | TRACE_EVENT(ext4_da_writepages, |
| 221 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), |
| 222 | |
| 223 | TP_ARGS(inode, wbc), |
| 224 | |
| 225 | TP_STRUCT__entry( |
| 226 | __field( dev_t, dev ) |
| 227 | __field( ino_t, ino ) |
| 228 | __field( long, nr_to_write ) |
| 229 | __field( long, pages_skipped ) |
| 230 | __field( loff_t, range_start ) |
| 231 | __field( loff_t, range_end ) |
| 232 | __field( char, nonblocking ) |
| 233 | __field( char, for_kupdate ) |
| 234 | __field( char, for_reclaim ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 235 | __field( char, range_cyclic ) |
| 236 | ), |
| 237 | |
| 238 | TP_fast_assign( |
| 239 | __entry->dev = inode->i_sb->s_dev; |
| 240 | __entry->ino = inode->i_ino; |
| 241 | __entry->nr_to_write = wbc->nr_to_write; |
| 242 | __entry->pages_skipped = wbc->pages_skipped; |
| 243 | __entry->range_start = wbc->range_start; |
| 244 | __entry->range_end = wbc->range_end; |
| 245 | __entry->nonblocking = wbc->nonblocking; |
| 246 | __entry->for_kupdate = wbc->for_kupdate; |
| 247 | __entry->for_reclaim = wbc->for_reclaim; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 248 | __entry->range_cyclic = wbc->range_cyclic; |
| 249 | ), |
| 250 | |
Theodore Ts'o | 98a56ab | 2009-09-17 08:48:28 -0400 | [diff] [blame] | 251 | TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 252 | jbd2_dev_to_name(__entry->dev), |
| 253 | (unsigned long) __entry->ino, __entry->nr_to_write, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 254 | __entry->pages_skipped, __entry->range_start, |
| 255 | __entry->range_end, __entry->nonblocking, |
| 256 | __entry->for_kupdate, __entry->for_reclaim, |
Jens Axboe | 1fe06ad | 2009-09-15 15:10:20 +0200 | [diff] [blame] | 257 | __entry->range_cyclic) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 258 | ); |
| 259 | |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 260 | TRACE_EVENT(ext4_da_write_pages, |
| 261 | TP_PROTO(struct inode *inode, struct mpage_da_data *mpd), |
| 262 | |
| 263 | TP_ARGS(inode, mpd), |
| 264 | |
| 265 | TP_STRUCT__entry( |
| 266 | __field( dev_t, dev ) |
| 267 | __field( ino_t, ino ) |
| 268 | __field( __u64, b_blocknr ) |
| 269 | __field( __u32, b_size ) |
| 270 | __field( __u32, b_state ) |
| 271 | __field( unsigned long, first_page ) |
| 272 | __field( int, io_done ) |
| 273 | __field( int, pages_written ) |
| 274 | ), |
| 275 | |
| 276 | TP_fast_assign( |
| 277 | __entry->dev = inode->i_sb->s_dev; |
| 278 | __entry->ino = inode->i_ino; |
| 279 | __entry->b_blocknr = mpd->b_blocknr; |
| 280 | __entry->b_size = mpd->b_size; |
| 281 | __entry->b_state = mpd->b_state; |
| 282 | __entry->first_page = mpd->first_page; |
| 283 | __entry->io_done = mpd->io_done; |
| 284 | __entry->pages_written = mpd->pages_written; |
| 285 | ), |
| 286 | |
| 287 | TP_printk("dev %s ino %lu b_blocknr %llu b_size %u b_state 0x%04x first_page %lu io_done %d pages_written %d", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 288 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 289 | __entry->b_blocknr, __entry->b_size, |
| 290 | __entry->b_state, __entry->first_page, |
| 291 | __entry->io_done, __entry->pages_written) |
| 292 | ); |
| 293 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 294 | TRACE_EVENT(ext4_da_writepages_result, |
| 295 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, |
| 296 | int ret, int pages_written), |
| 297 | |
| 298 | TP_ARGS(inode, wbc, ret, pages_written), |
| 299 | |
| 300 | TP_STRUCT__entry( |
| 301 | __field( dev_t, dev ) |
| 302 | __field( ino_t, ino ) |
| 303 | __field( int, ret ) |
| 304 | __field( int, pages_written ) |
| 305 | __field( long, pages_skipped ) |
| 306 | __field( char, encountered_congestion ) |
| 307 | __field( char, more_io ) |
| 308 | __field( char, no_nrwrite_index_update ) |
| 309 | ), |
| 310 | |
| 311 | TP_fast_assign( |
| 312 | __entry->dev = inode->i_sb->s_dev; |
| 313 | __entry->ino = inode->i_ino; |
| 314 | __entry->ret = ret; |
| 315 | __entry->pages_written = pages_written; |
| 316 | __entry->pages_skipped = wbc->pages_skipped; |
| 317 | __entry->encountered_congestion = wbc->encountered_congestion; |
| 318 | __entry->more_io = wbc->more_io; |
| 319 | __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; |
| 320 | ), |
| 321 | |
| 322 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 323 | jbd2_dev_to_name(__entry->dev), |
| 324 | (unsigned long) __entry->ino, __entry->ret, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 325 | __entry->pages_written, __entry->pages_skipped, |
| 326 | __entry->encountered_congestion, __entry->more_io, |
| 327 | __entry->no_nrwrite_index_update) |
| 328 | ); |
| 329 | |
| 330 | TRACE_EVENT(ext4_da_write_begin, |
| 331 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 332 | unsigned int flags), |
| 333 | |
| 334 | TP_ARGS(inode, pos, len, flags), |
| 335 | |
| 336 | TP_STRUCT__entry( |
| 337 | __field( dev_t, dev ) |
| 338 | __field( ino_t, ino ) |
| 339 | __field( loff_t, pos ) |
| 340 | __field( unsigned int, len ) |
| 341 | __field( unsigned int, flags ) |
| 342 | ), |
| 343 | |
| 344 | TP_fast_assign( |
| 345 | __entry->dev = inode->i_sb->s_dev; |
| 346 | __entry->ino = inode->i_ino; |
| 347 | __entry->pos = pos; |
| 348 | __entry->len = len; |
| 349 | __entry->flags = flags; |
| 350 | ), |
| 351 | |
| 352 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 353 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 354 | __entry->pos, __entry->len, __entry->flags) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 355 | ); |
| 356 | |
| 357 | TRACE_EVENT(ext4_da_write_end, |
| 358 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 359 | unsigned int copied), |
| 360 | |
| 361 | TP_ARGS(inode, pos, len, copied), |
| 362 | |
| 363 | TP_STRUCT__entry( |
| 364 | __field( dev_t, dev ) |
| 365 | __field( ino_t, ino ) |
| 366 | __field( loff_t, pos ) |
| 367 | __field( unsigned int, len ) |
| 368 | __field( unsigned int, copied ) |
| 369 | ), |
| 370 | |
| 371 | TP_fast_assign( |
| 372 | __entry->dev = inode->i_sb->s_dev; |
| 373 | __entry->ino = inode->i_ino; |
| 374 | __entry->pos = pos; |
| 375 | __entry->len = len; |
| 376 | __entry->copied = copied; |
| 377 | ), |
| 378 | |
| 379 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 380 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 381 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 382 | ); |
| 383 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 384 | TRACE_EVENT(ext4_discard_blocks, |
| 385 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
| 386 | unsigned long long count), |
| 387 | |
| 388 | TP_ARGS(sb, blk, count), |
| 389 | |
| 390 | TP_STRUCT__entry( |
| 391 | __field( dev_t, dev ) |
| 392 | __field( __u64, blk ) |
| 393 | __field( __u64, count ) |
| 394 | |
| 395 | ), |
| 396 | |
| 397 | TP_fast_assign( |
| 398 | __entry->dev = sb->s_dev; |
| 399 | __entry->blk = blk; |
| 400 | __entry->count = count; |
| 401 | ), |
| 402 | |
| 403 | TP_printk("dev %s blk %llu count %llu", |
| 404 | jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count) |
| 405 | ); |
| 406 | |
| 407 | TRACE_EVENT(ext4_mb_new_inode_pa, |
| 408 | TP_PROTO(struct ext4_allocation_context *ac, |
| 409 | struct ext4_prealloc_space *pa), |
| 410 | |
| 411 | TP_ARGS(ac, pa), |
| 412 | |
| 413 | TP_STRUCT__entry( |
| 414 | __field( dev_t, dev ) |
| 415 | __field( ino_t, ino ) |
| 416 | __field( __u64, pa_pstart ) |
| 417 | __field( __u32, pa_len ) |
| 418 | __field( __u64, pa_lstart ) |
| 419 | |
| 420 | ), |
| 421 | |
| 422 | TP_fast_assign( |
| 423 | __entry->dev = ac->ac_sb->s_dev; |
| 424 | __entry->ino = ac->ac_inode->i_ino; |
| 425 | __entry->pa_pstart = pa->pa_pstart; |
| 426 | __entry->pa_len = pa->pa_len; |
| 427 | __entry->pa_lstart = pa->pa_lstart; |
| 428 | ), |
| 429 | |
| 430 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 431 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 432 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 433 | ); |
| 434 | |
| 435 | TRACE_EVENT(ext4_mb_new_group_pa, |
| 436 | TP_PROTO(struct ext4_allocation_context *ac, |
| 437 | struct ext4_prealloc_space *pa), |
| 438 | |
| 439 | TP_ARGS(ac, pa), |
| 440 | |
| 441 | TP_STRUCT__entry( |
| 442 | __field( dev_t, dev ) |
| 443 | __field( ino_t, ino ) |
| 444 | __field( __u64, pa_pstart ) |
| 445 | __field( __u32, pa_len ) |
| 446 | __field( __u64, pa_lstart ) |
| 447 | |
| 448 | ), |
| 449 | |
| 450 | TP_fast_assign( |
| 451 | __entry->dev = ac->ac_sb->s_dev; |
| 452 | __entry->ino = ac->ac_inode->i_ino; |
| 453 | __entry->pa_pstart = pa->pa_pstart; |
| 454 | __entry->pa_len = pa->pa_len; |
| 455 | __entry->pa_lstart = pa->pa_lstart; |
| 456 | ), |
| 457 | |
| 458 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 459 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 460 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 461 | ); |
| 462 | |
| 463 | TRACE_EVENT(ext4_mb_release_inode_pa, |
| 464 | TP_PROTO(struct ext4_allocation_context *ac, |
| 465 | struct ext4_prealloc_space *pa, |
| 466 | unsigned long long block, unsigned int count), |
| 467 | |
| 468 | TP_ARGS(ac, pa, block, count), |
| 469 | |
| 470 | TP_STRUCT__entry( |
| 471 | __field( dev_t, dev ) |
| 472 | __field( ino_t, ino ) |
| 473 | __field( __u64, block ) |
| 474 | __field( __u32, count ) |
| 475 | |
| 476 | ), |
| 477 | |
| 478 | TP_fast_assign( |
| 479 | __entry->dev = ac->ac_sb->s_dev; |
| 480 | __entry->ino = ac->ac_inode->i_ino; |
| 481 | __entry->block = block; |
| 482 | __entry->count = count; |
| 483 | ), |
| 484 | |
| 485 | TP_printk("dev %s ino %lu block %llu count %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 486 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 487 | __entry->block, __entry->count) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 488 | ); |
| 489 | |
| 490 | TRACE_EVENT(ext4_mb_release_group_pa, |
| 491 | TP_PROTO(struct ext4_allocation_context *ac, |
| 492 | struct ext4_prealloc_space *pa), |
| 493 | |
| 494 | TP_ARGS(ac, pa), |
| 495 | |
| 496 | TP_STRUCT__entry( |
| 497 | __field( dev_t, dev ) |
| 498 | __field( ino_t, ino ) |
| 499 | __field( __u64, pa_pstart ) |
| 500 | __field( __u32, pa_len ) |
| 501 | |
| 502 | ), |
| 503 | |
| 504 | TP_fast_assign( |
| 505 | __entry->dev = ac->ac_sb->s_dev; |
| 506 | __entry->ino = ac->ac_inode->i_ino; |
| 507 | __entry->pa_pstart = pa->pa_pstart; |
| 508 | __entry->pa_len = pa->pa_len; |
| 509 | ), |
| 510 | |
| 511 | TP_printk("dev %s pstart %llu len %u", |
| 512 | jbd2_dev_to_name(__entry->dev), __entry->pa_pstart, __entry->pa_len) |
| 513 | ); |
| 514 | |
| 515 | TRACE_EVENT(ext4_discard_preallocations, |
| 516 | TP_PROTO(struct inode *inode), |
| 517 | |
| 518 | TP_ARGS(inode), |
| 519 | |
| 520 | TP_STRUCT__entry( |
| 521 | __field( dev_t, dev ) |
| 522 | __field( ino_t, ino ) |
| 523 | |
| 524 | ), |
| 525 | |
| 526 | TP_fast_assign( |
| 527 | __entry->dev = inode->i_sb->s_dev; |
| 528 | __entry->ino = inode->i_ino; |
| 529 | ), |
| 530 | |
| 531 | TP_printk("dev %s ino %lu", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 532 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 533 | ); |
| 534 | |
| 535 | TRACE_EVENT(ext4_mb_discard_preallocations, |
| 536 | TP_PROTO(struct super_block *sb, int needed), |
| 537 | |
| 538 | TP_ARGS(sb, needed), |
| 539 | |
| 540 | TP_STRUCT__entry( |
| 541 | __field( dev_t, dev ) |
| 542 | __field( int, needed ) |
| 543 | |
| 544 | ), |
| 545 | |
| 546 | TP_fast_assign( |
| 547 | __entry->dev = sb->s_dev; |
| 548 | __entry->needed = needed; |
| 549 | ), |
| 550 | |
| 551 | TP_printk("dev %s needed %d", |
| 552 | jbd2_dev_to_name(__entry->dev), __entry->needed) |
| 553 | ); |
| 554 | |
| 555 | TRACE_EVENT(ext4_request_blocks, |
| 556 | TP_PROTO(struct ext4_allocation_request *ar), |
| 557 | |
| 558 | TP_ARGS(ar), |
| 559 | |
| 560 | TP_STRUCT__entry( |
| 561 | __field( dev_t, dev ) |
| 562 | __field( ino_t, ino ) |
| 563 | __field( unsigned int, flags ) |
| 564 | __field( unsigned int, len ) |
| 565 | __field( __u64, logical ) |
| 566 | __field( __u64, goal ) |
| 567 | __field( __u64, lleft ) |
| 568 | __field( __u64, lright ) |
| 569 | __field( __u64, pleft ) |
| 570 | __field( __u64, pright ) |
| 571 | ), |
| 572 | |
| 573 | TP_fast_assign( |
| 574 | __entry->dev = ar->inode->i_sb->s_dev; |
| 575 | __entry->ino = ar->inode->i_ino; |
| 576 | __entry->flags = ar->flags; |
| 577 | __entry->len = ar->len; |
| 578 | __entry->logical = ar->logical; |
| 579 | __entry->goal = ar->goal; |
| 580 | __entry->lleft = ar->lleft; |
| 581 | __entry->lright = ar->lright; |
| 582 | __entry->pleft = ar->pleft; |
| 583 | __entry->pright = ar->pright; |
| 584 | ), |
| 585 | |
| 586 | TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 587 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 588 | __entry->flags, __entry->len, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 589 | (unsigned long long) __entry->logical, |
| 590 | (unsigned long long) __entry->goal, |
| 591 | (unsigned long long) __entry->lleft, |
| 592 | (unsigned long long) __entry->lright, |
| 593 | (unsigned long long) __entry->pleft, |
| 594 | (unsigned long long) __entry->pright) |
| 595 | ); |
| 596 | |
| 597 | TRACE_EVENT(ext4_allocate_blocks, |
| 598 | TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), |
| 599 | |
| 600 | TP_ARGS(ar, block), |
| 601 | |
| 602 | TP_STRUCT__entry( |
| 603 | __field( dev_t, dev ) |
| 604 | __field( ino_t, ino ) |
| 605 | __field( __u64, block ) |
| 606 | __field( unsigned int, flags ) |
| 607 | __field( unsigned int, len ) |
| 608 | __field( __u64, logical ) |
| 609 | __field( __u64, goal ) |
| 610 | __field( __u64, lleft ) |
| 611 | __field( __u64, lright ) |
| 612 | __field( __u64, pleft ) |
| 613 | __field( __u64, pright ) |
| 614 | ), |
| 615 | |
| 616 | TP_fast_assign( |
| 617 | __entry->dev = ar->inode->i_sb->s_dev; |
| 618 | __entry->ino = ar->inode->i_ino; |
| 619 | __entry->block = block; |
| 620 | __entry->flags = ar->flags; |
| 621 | __entry->len = ar->len; |
| 622 | __entry->logical = ar->logical; |
| 623 | __entry->goal = ar->goal; |
| 624 | __entry->lleft = ar->lleft; |
| 625 | __entry->lright = ar->lright; |
| 626 | __entry->pleft = ar->pleft; |
| 627 | __entry->pright = ar->pright; |
| 628 | ), |
| 629 | |
| 630 | TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 631 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 632 | __entry->flags, __entry->len, __entry->block, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 633 | (unsigned long long) __entry->logical, |
| 634 | (unsigned long long) __entry->goal, |
| 635 | (unsigned long long) __entry->lleft, |
| 636 | (unsigned long long) __entry->lright, |
| 637 | (unsigned long long) __entry->pleft, |
| 638 | (unsigned long long) __entry->pright) |
| 639 | ); |
| 640 | |
| 641 | TRACE_EVENT(ext4_free_blocks, |
| 642 | TP_PROTO(struct inode *inode, __u64 block, unsigned long count, |
| 643 | int metadata), |
| 644 | |
| 645 | TP_ARGS(inode, block, count, metadata), |
| 646 | |
| 647 | TP_STRUCT__entry( |
| 648 | __field( dev_t, dev ) |
| 649 | __field( ino_t, ino ) |
| 650 | __field( __u64, block ) |
| 651 | __field( unsigned long, count ) |
| 652 | __field( int, metadata ) |
| 653 | |
| 654 | ), |
| 655 | |
| 656 | TP_fast_assign( |
| 657 | __entry->dev = inode->i_sb->s_dev; |
| 658 | __entry->ino = inode->i_ino; |
| 659 | __entry->block = block; |
| 660 | __entry->count = count; |
| 661 | __entry->metadata = metadata; |
| 662 | ), |
| 663 | |
| 664 | TP_printk("dev %s ino %lu block %llu count %lu metadata %d", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 665 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 666 | __entry->block, __entry->count, __entry->metadata) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 667 | ); |
| 668 | |
| 669 | TRACE_EVENT(ext4_sync_file, |
| 670 | TP_PROTO(struct file *file, struct dentry *dentry, int datasync), |
| 671 | |
| 672 | TP_ARGS(file, dentry, datasync), |
| 673 | |
| 674 | TP_STRUCT__entry( |
| 675 | __field( dev_t, dev ) |
| 676 | __field( ino_t, ino ) |
| 677 | __field( ino_t, parent ) |
| 678 | __field( int, datasync ) |
| 679 | ), |
| 680 | |
| 681 | TP_fast_assign( |
| 682 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
| 683 | __entry->ino = dentry->d_inode->i_ino; |
| 684 | __entry->datasync = datasync; |
| 685 | __entry->parent = dentry->d_parent->d_inode->i_ino; |
| 686 | ), |
| 687 | |
| 688 | TP_printk("dev %s ino %ld parent %ld datasync %d ", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 689 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 690 | (unsigned long) __entry->parent, __entry->datasync) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 691 | ); |
| 692 | |
| 693 | TRACE_EVENT(ext4_sync_fs, |
| 694 | TP_PROTO(struct super_block *sb, int wait), |
| 695 | |
| 696 | TP_ARGS(sb, wait), |
| 697 | |
| 698 | TP_STRUCT__entry( |
| 699 | __field( dev_t, dev ) |
| 700 | __field( int, wait ) |
| 701 | |
| 702 | ), |
| 703 | |
| 704 | TP_fast_assign( |
| 705 | __entry->dev = sb->s_dev; |
| 706 | __entry->wait = wait; |
| 707 | ), |
| 708 | |
| 709 | TP_printk("dev %s wait %d", jbd2_dev_to_name(__entry->dev), |
| 710 | __entry->wait) |
| 711 | ); |
| 712 | |
| 713 | #endif /* _TRACE_EXT4_H */ |
| 714 | |
| 715 | /* This part must be outside protection */ |
| 716 | #include <trace/define_trace.h> |