diff options
Diffstat (limited to 'include/trace/events/ext4.h')
-rw-r--r-- | include/trace/events/ext4.h | 125 |
1 files changed, 67 insertions, 58 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 2aa6aa3e8f61..01e9e0076a92 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -306,7 +306,6 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
306 | __field( int, pages_written ) | 306 | __field( int, pages_written ) |
307 | __field( long, pages_skipped ) | 307 | __field( long, pages_skipped ) |
308 | __field( char, more_io ) | 308 | __field( char, more_io ) |
309 | __field( char, no_nrwrite_index_update ) | ||
310 | __field( pgoff_t, writeback_index ) | 309 | __field( pgoff_t, writeback_index ) |
311 | ), | 310 | ), |
312 | 311 | ||
@@ -317,16 +316,14 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
317 | __entry->pages_written = pages_written; | 316 | __entry->pages_written = pages_written; |
318 | __entry->pages_skipped = wbc->pages_skipped; | 317 | __entry->pages_skipped = wbc->pages_skipped; |
319 | __entry->more_io = wbc->more_io; | 318 | __entry->more_io = wbc->more_io; |
320 | __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; | ||
321 | __entry->writeback_index = inode->i_mapping->writeback_index; | 319 | __entry->writeback_index = inode->i_mapping->writeback_index; |
322 | ), | 320 | ), |
323 | 321 | ||
324 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld more_io %d no_nrwrite_index_update %d writeback_index %lu", | 322 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld more_io %d writeback_index %lu", |
325 | jbd2_dev_to_name(__entry->dev), | 323 | jbd2_dev_to_name(__entry->dev), |
326 | (unsigned long) __entry->ino, __entry->ret, | 324 | (unsigned long) __entry->ino, __entry->ret, |
327 | __entry->pages_written, __entry->pages_skipped, | 325 | __entry->pages_written, __entry->pages_skipped, |
328 | __entry->more_io, | 326 | __entry->more_io, |
329 | __entry->no_nrwrite_index_update, | ||
330 | (unsigned long) __entry->writeback_index) | 327 | (unsigned long) __entry->writeback_index) |
331 | ); | 328 | ); |
332 | 329 | ||
@@ -353,7 +350,7 @@ TRACE_EVENT(ext4_discard_blocks, | |||
353 | jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count) | 350 | jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count) |
354 | ); | 351 | ); |
355 | 352 | ||
356 | TRACE_EVENT(ext4_mb_new_inode_pa, | 353 | DECLARE_EVENT_CLASS(ext4__mb_new_pa, |
357 | TP_PROTO(struct ext4_allocation_context *ac, | 354 | TP_PROTO(struct ext4_allocation_context *ac, |
358 | struct ext4_prealloc_space *pa), | 355 | struct ext4_prealloc_space *pa), |
359 | 356 | ||
@@ -381,40 +378,29 @@ TRACE_EVENT(ext4_mb_new_inode_pa, | |||
381 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) | 378 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
382 | ); | 379 | ); |
383 | 380 | ||
384 | TRACE_EVENT(ext4_mb_new_group_pa, | 381 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, |
382 | |||
385 | TP_PROTO(struct ext4_allocation_context *ac, | 383 | TP_PROTO(struct ext4_allocation_context *ac, |
386 | struct ext4_prealloc_space *pa), | 384 | struct ext4_prealloc_space *pa), |
387 | 385 | ||
388 | TP_ARGS(ac, pa), | 386 | TP_ARGS(ac, pa) |
387 | ); | ||
389 | 388 | ||
390 | TP_STRUCT__entry( | 389 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa, |
391 | __field( dev_t, dev ) | ||
392 | __field( ino_t, ino ) | ||
393 | __field( __u64, pa_pstart ) | ||
394 | __field( __u32, pa_len ) | ||
395 | __field( __u64, pa_lstart ) | ||
396 | 390 | ||
397 | ), | 391 | TP_PROTO(struct ext4_allocation_context *ac, |
398 | 392 | struct ext4_prealloc_space *pa), | |
399 | TP_fast_assign( | ||
400 | __entry->dev = ac->ac_sb->s_dev; | ||
401 | __entry->ino = ac->ac_inode->i_ino; | ||
402 | __entry->pa_pstart = pa->pa_pstart; | ||
403 | __entry->pa_len = pa->pa_len; | ||
404 | __entry->pa_lstart = pa->pa_lstart; | ||
405 | ), | ||
406 | 393 | ||
407 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", | 394 | TP_ARGS(ac, pa) |
408 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
409 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) | ||
410 | ); | 395 | ); |
411 | 396 | ||
412 | TRACE_EVENT(ext4_mb_release_inode_pa, | 397 | TRACE_EVENT(ext4_mb_release_inode_pa, |
413 | TP_PROTO(struct ext4_allocation_context *ac, | 398 | TP_PROTO(struct super_block *sb, |
399 | struct ext4_allocation_context *ac, | ||
414 | struct ext4_prealloc_space *pa, | 400 | struct ext4_prealloc_space *pa, |
415 | unsigned long long block, unsigned int count), | 401 | unsigned long long block, unsigned int count), |
416 | 402 | ||
417 | TP_ARGS(ac, pa, block, count), | 403 | TP_ARGS(sb, ac, pa, block, count), |
418 | 404 | ||
419 | TP_STRUCT__entry( | 405 | TP_STRUCT__entry( |
420 | __field( dev_t, dev ) | 406 | __field( dev_t, dev ) |
@@ -425,8 +411,9 @@ TRACE_EVENT(ext4_mb_release_inode_pa, | |||
425 | ), | 411 | ), |
426 | 412 | ||
427 | TP_fast_assign( | 413 | TP_fast_assign( |
428 | __entry->dev = ac->ac_sb->s_dev; | 414 | __entry->dev = sb->s_dev; |
429 | __entry->ino = ac->ac_inode->i_ino; | 415 | __entry->ino = (ac && ac->ac_inode) ? |
416 | ac->ac_inode->i_ino : 0; | ||
430 | __entry->block = block; | 417 | __entry->block = block; |
431 | __entry->count = count; | 418 | __entry->count = count; |
432 | ), | 419 | ), |
@@ -437,10 +424,11 @@ TRACE_EVENT(ext4_mb_release_inode_pa, | |||
437 | ); | 424 | ); |
438 | 425 | ||
439 | TRACE_EVENT(ext4_mb_release_group_pa, | 426 | TRACE_EVENT(ext4_mb_release_group_pa, |
440 | TP_PROTO(struct ext4_allocation_context *ac, | 427 | TP_PROTO(struct super_block *sb, |
428 | struct ext4_allocation_context *ac, | ||
441 | struct ext4_prealloc_space *pa), | 429 | struct ext4_prealloc_space *pa), |
442 | 430 | ||
443 | TP_ARGS(ac, pa), | 431 | TP_ARGS(sb, ac, pa), |
444 | 432 | ||
445 | TP_STRUCT__entry( | 433 | TP_STRUCT__entry( |
446 | __field( dev_t, dev ) | 434 | __field( dev_t, dev ) |
@@ -451,8 +439,9 @@ TRACE_EVENT(ext4_mb_release_group_pa, | |||
451 | ), | 439 | ), |
452 | 440 | ||
453 | TP_fast_assign( | 441 | TP_fast_assign( |
454 | __entry->dev = ac->ac_sb->s_dev; | 442 | __entry->dev = sb->s_dev; |
455 | __entry->ino = ac->ac_inode->i_ino; | 443 | __entry->ino = (ac && ac->ac_inode) ? |
444 | ac->ac_inode->i_ino : 0; | ||
456 | __entry->pa_pstart = pa->pa_pstart; | 445 | __entry->pa_pstart = pa->pa_pstart; |
457 | __entry->pa_len = pa->pa_len; | 446 | __entry->pa_len = pa->pa_len; |
458 | ), | 447 | ), |
@@ -618,9 +607,9 @@ TRACE_EVENT(ext4_free_blocks, | |||
618 | ); | 607 | ); |
619 | 608 | ||
620 | TRACE_EVENT(ext4_sync_file, | 609 | TRACE_EVENT(ext4_sync_file, |
621 | TP_PROTO(struct file *file, struct dentry *dentry, int datasync), | 610 | TP_PROTO(struct file *file, int datasync), |
622 | 611 | ||
623 | TP_ARGS(file, dentry, datasync), | 612 | TP_ARGS(file, datasync), |
624 | 613 | ||
625 | TP_STRUCT__entry( | 614 | TP_STRUCT__entry( |
626 | __field( dev_t, dev ) | 615 | __field( dev_t, dev ) |
@@ -630,6 +619,8 @@ TRACE_EVENT(ext4_sync_file, | |||
630 | ), | 619 | ), |
631 | 620 | ||
632 | TP_fast_assign( | 621 | TP_fast_assign( |
622 | struct dentry *dentry = file->f_path.dentry; | ||
623 | |||
633 | __entry->dev = dentry->d_inode->i_sb->s_dev; | 624 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
634 | __entry->ino = dentry->d_inode->i_ino; | 625 | __entry->ino = dentry->d_inode->i_ino; |
635 | __entry->datasync = datasync; | 626 | __entry->datasync = datasync; |
@@ -790,7 +781,7 @@ TRACE_EVENT(ext4_mballoc_prealloc, | |||
790 | __entry->result_len, __entry->result_logical) | 781 | __entry->result_len, __entry->result_logical) |
791 | ); | 782 | ); |
792 | 783 | ||
793 | TRACE_EVENT(ext4_mballoc_discard, | 784 | DECLARE_EVENT_CLASS(ext4__mballoc, |
794 | TP_PROTO(struct ext4_allocation_context *ac), | 785 | TP_PROTO(struct ext4_allocation_context *ac), |
795 | 786 | ||
796 | TP_ARGS(ac), | 787 | TP_ARGS(ac), |
@@ -819,33 +810,18 @@ TRACE_EVENT(ext4_mballoc_discard, | |||
819 | __entry->result_len, __entry->result_logical) | 810 | __entry->result_len, __entry->result_logical) |
820 | ); | 811 | ); |
821 | 812 | ||
822 | TRACE_EVENT(ext4_mballoc_free, | 813 | DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard, |
814 | |||
823 | TP_PROTO(struct ext4_allocation_context *ac), | 815 | TP_PROTO(struct ext4_allocation_context *ac), |
824 | 816 | ||
825 | TP_ARGS(ac), | 817 | TP_ARGS(ac) |
818 | ); | ||
826 | 819 | ||
827 | TP_STRUCT__entry( | 820 | DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free, |
828 | __field( dev_t, dev ) | ||
829 | __field( ino_t, ino ) | ||
830 | __field( __u32, result_logical ) | ||
831 | __field( int, result_start ) | ||
832 | __field( __u32, result_group ) | ||
833 | __field( int, result_len ) | ||
834 | ), | ||
835 | 821 | ||
836 | TP_fast_assign( | 822 | TP_PROTO(struct ext4_allocation_context *ac), |
837 | __entry->dev = ac->ac_inode->i_sb->s_dev; | ||
838 | __entry->ino = ac->ac_inode->i_ino; | ||
839 | __entry->result_logical = ac->ac_b_ex.fe_logical; | ||
840 | __entry->result_start = ac->ac_b_ex.fe_start; | ||
841 | __entry->result_group = ac->ac_b_ex.fe_group; | ||
842 | __entry->result_len = ac->ac_b_ex.fe_len; | ||
843 | ), | ||
844 | 823 | ||
845 | TP_printk("dev %s inode %lu extent %u/%d/%u@%u ", | 824 | TP_ARGS(ac) |
846 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
847 | __entry->result_group, __entry->result_start, | ||
848 | __entry->result_len, __entry->result_logical) | ||
849 | ); | 825 | ); |
850 | 826 | ||
851 | TRACE_EVENT(ext4_forget, | 827 | TRACE_EVENT(ext4_forget, |
@@ -974,6 +950,39 @@ TRACE_EVENT(ext4_da_release_space, | |||
974 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) | 950 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) |
975 | ); | 951 | ); |
976 | 952 | ||
953 | DECLARE_EVENT_CLASS(ext4__bitmap_load, | ||
954 | TP_PROTO(struct super_block *sb, unsigned long group), | ||
955 | |||
956 | TP_ARGS(sb, group), | ||
957 | |||
958 | TP_STRUCT__entry( | ||
959 | __field( dev_t, dev ) | ||
960 | __field( __u32, group ) | ||
961 | |||
962 | ), | ||
963 | |||
964 | TP_fast_assign( | ||
965 | __entry->dev = sb->s_dev; | ||
966 | __entry->group = group; | ||
967 | ), | ||
968 | |||
969 | TP_printk("dev %s group %u", | ||
970 | jbd2_dev_to_name(__entry->dev), __entry->group) | ||
971 | ); | ||
972 | |||
973 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, | ||
974 | |||
975 | TP_PROTO(struct super_block *sb, unsigned long group), | ||
976 | |||
977 | TP_ARGS(sb, group) | ||
978 | ); | ||
979 | |||
980 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load, | ||
981 | |||
982 | TP_PROTO(struct super_block *sb, unsigned long group), | ||
983 | |||
984 | TP_ARGS(sb, group) | ||
985 | ); | ||
977 | 986 | ||
978 | #endif /* _TRACE_EXT4_H */ | 987 | #endif /* _TRACE_EXT4_H */ |
979 | 988 | ||