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