diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/f2fs.h | 148 |
1 files changed, 70 insertions, 78 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index bbc4de9baef7..5422dbfaf97d 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h | |||
@@ -72,6 +72,7 @@ | |||
72 | #define show_cpreason(type) \ | 72 | #define show_cpreason(type) \ |
73 | __print_symbolic(type, \ | 73 | __print_symbolic(type, \ |
74 | { CP_UMOUNT, "Umount" }, \ | 74 | { CP_UMOUNT, "Umount" }, \ |
75 | { CP_FASTBOOT, "Fastboot" }, \ | ||
75 | { CP_SYNC, "Sync" }, \ | 76 | { CP_SYNC, "Sync" }, \ |
76 | { CP_DISCARD, "Discard" }) | 77 | { CP_DISCARD, "Discard" }) |
77 | 78 | ||
@@ -148,14 +149,14 @@ DEFINE_EVENT(f2fs__inode, f2fs_sync_file_enter, | |||
148 | 149 | ||
149 | TRACE_EVENT(f2fs_sync_file_exit, | 150 | TRACE_EVENT(f2fs_sync_file_exit, |
150 | 151 | ||
151 | TP_PROTO(struct inode *inode, bool need_cp, int datasync, int ret), | 152 | TP_PROTO(struct inode *inode, int need_cp, int datasync, int ret), |
152 | 153 | ||
153 | TP_ARGS(inode, need_cp, datasync, ret), | 154 | TP_ARGS(inode, need_cp, datasync, ret), |
154 | 155 | ||
155 | TP_STRUCT__entry( | 156 | TP_STRUCT__entry( |
156 | __field(dev_t, dev) | 157 | __field(dev_t, dev) |
157 | __field(ino_t, ino) | 158 | __field(ino_t, ino) |
158 | __field(bool, need_cp) | 159 | __field(int, need_cp) |
159 | __field(int, datasync) | 160 | __field(int, datasync) |
160 | __field(int, ret) | 161 | __field(int, ret) |
161 | ), | 162 | ), |
@@ -190,7 +191,7 @@ TRACE_EVENT(f2fs_sync_fs, | |||
190 | 191 | ||
191 | TP_fast_assign( | 192 | TP_fast_assign( |
192 | __entry->dev = sb->s_dev; | 193 | __entry->dev = sb->s_dev; |
193 | __entry->dirty = F2FS_SB(sb)->s_dirty; | 194 | __entry->dirty = is_sbi_flag_set(F2FS_SB(sb), SBI_IS_DIRTY); |
194 | __entry->wait = wait; | 195 | __entry->wait = wait; |
195 | ), | 196 | ), |
196 | 197 | ||
@@ -440,38 +441,6 @@ TRACE_EVENT(f2fs_truncate_partial_nodes, | |||
440 | __entry->err) | 441 | __entry->err) |
441 | ); | 442 | ); |
442 | 443 | ||
443 | TRACE_EVENT_CONDITION(f2fs_submit_page_bio, | ||
444 | |||
445 | TP_PROTO(struct page *page, sector_t blkaddr, int type), | ||
446 | |||
447 | TP_ARGS(page, blkaddr, type), | ||
448 | |||
449 | TP_CONDITION(page->mapping), | ||
450 | |||
451 | TP_STRUCT__entry( | ||
452 | __field(dev_t, dev) | ||
453 | __field(ino_t, ino) | ||
454 | __field(pgoff_t, index) | ||
455 | __field(sector_t, blkaddr) | ||
456 | __field(int, type) | ||
457 | ), | ||
458 | |||
459 | TP_fast_assign( | ||
460 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
461 | __entry->ino = page->mapping->host->i_ino; | ||
462 | __entry->index = page->index; | ||
463 | __entry->blkaddr = blkaddr; | ||
464 | __entry->type = type; | ||
465 | ), | ||
466 | |||
467 | TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, " | ||
468 | "blkaddr = 0x%llx, bio_type = %s%s", | ||
469 | show_dev_ino(__entry), | ||
470 | (unsigned long)__entry->index, | ||
471 | (unsigned long long)__entry->blkaddr, | ||
472 | show_bio_type(__entry->type)) | ||
473 | ); | ||
474 | |||
475 | TRACE_EVENT(f2fs_get_data_block, | 444 | TRACE_EVENT(f2fs_get_data_block, |
476 | TP_PROTO(struct inode *inode, sector_t iblock, | 445 | TP_PROTO(struct inode *inode, sector_t iblock, |
477 | struct buffer_head *bh, int ret), | 446 | struct buffer_head *bh, int ret), |
@@ -680,11 +649,63 @@ TRACE_EVENT(f2fs_reserve_new_block, | |||
680 | __entry->ofs_in_node) | 649 | __entry->ofs_in_node) |
681 | ); | 650 | ); |
682 | 651 | ||
652 | DECLARE_EVENT_CLASS(f2fs__submit_page_bio, | ||
653 | |||
654 | TP_PROTO(struct page *page, struct f2fs_io_info *fio), | ||
655 | |||
656 | TP_ARGS(page, fio), | ||
657 | |||
658 | TP_STRUCT__entry( | ||
659 | __field(dev_t, dev) | ||
660 | __field(ino_t, ino) | ||
661 | __field(pgoff_t, index) | ||
662 | __field(block_t, blkaddr) | ||
663 | __field(int, rw) | ||
664 | __field(int, type) | ||
665 | ), | ||
666 | |||
667 | TP_fast_assign( | ||
668 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
669 | __entry->ino = page->mapping->host->i_ino; | ||
670 | __entry->index = page->index; | ||
671 | __entry->blkaddr = fio->blk_addr; | ||
672 | __entry->rw = fio->rw; | ||
673 | __entry->type = fio->type; | ||
674 | ), | ||
675 | |||
676 | TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, " | ||
677 | "blkaddr = 0x%llx, rw = %s%s, type = %s", | ||
678 | show_dev_ino(__entry), | ||
679 | (unsigned long)__entry->index, | ||
680 | (unsigned long long)__entry->blkaddr, | ||
681 | show_bio_type(__entry->rw), | ||
682 | show_block_type(__entry->type)) | ||
683 | ); | ||
684 | |||
685 | DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_bio, | ||
686 | |||
687 | TP_PROTO(struct page *page, struct f2fs_io_info *fio), | ||
688 | |||
689 | TP_ARGS(page, fio), | ||
690 | |||
691 | TP_CONDITION(page->mapping) | ||
692 | ); | ||
693 | |||
694 | DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_mbio, | ||
695 | |||
696 | TP_PROTO(struct page *page, struct f2fs_io_info *fio), | ||
697 | |||
698 | TP_ARGS(page, fio), | ||
699 | |||
700 | TP_CONDITION(page->mapping) | ||
701 | ); | ||
702 | |||
683 | DECLARE_EVENT_CLASS(f2fs__submit_bio, | 703 | DECLARE_EVENT_CLASS(f2fs__submit_bio, |
684 | 704 | ||
685 | TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio), | 705 | TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio, |
706 | struct bio *bio), | ||
686 | 707 | ||
687 | TP_ARGS(sb, rw, type, bio), | 708 | TP_ARGS(sb, fio, bio), |
688 | 709 | ||
689 | TP_STRUCT__entry( | 710 | TP_STRUCT__entry( |
690 | __field(dev_t, dev) | 711 | __field(dev_t, dev) |
@@ -696,8 +717,8 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio, | |||
696 | 717 | ||
697 | TP_fast_assign( | 718 | TP_fast_assign( |
698 | __entry->dev = sb->s_dev; | 719 | __entry->dev = sb->s_dev; |
699 | __entry->rw = rw; | 720 | __entry->rw = fio->rw; |
700 | __entry->type = type; | 721 | __entry->type = fio->type; |
701 | __entry->sector = bio->bi_iter.bi_sector; | 722 | __entry->sector = bio->bi_iter.bi_sector; |
702 | __entry->size = bio->bi_iter.bi_size; | 723 | __entry->size = bio->bi_iter.bi_size; |
703 | ), | 724 | ), |
@@ -712,18 +733,20 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio, | |||
712 | 733 | ||
713 | DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_write_bio, | 734 | DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_write_bio, |
714 | 735 | ||
715 | TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio), | 736 | TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio, |
737 | struct bio *bio), | ||
716 | 738 | ||
717 | TP_ARGS(sb, rw, type, bio), | 739 | TP_ARGS(sb, fio, bio), |
718 | 740 | ||
719 | TP_CONDITION(bio) | 741 | TP_CONDITION(bio) |
720 | ); | 742 | ); |
721 | 743 | ||
722 | DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_read_bio, | 744 | DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_read_bio, |
723 | 745 | ||
724 | TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio), | 746 | TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio, |
747 | struct bio *bio), | ||
725 | 748 | ||
726 | TP_ARGS(sb, rw, type, bio), | 749 | TP_ARGS(sb, fio, bio), |
727 | 750 | ||
728 | TP_CONDITION(bio) | 751 | TP_CONDITION(bio) |
729 | ); | 752 | ); |
@@ -916,38 +939,6 @@ TRACE_EVENT(f2fs_writepages, | |||
916 | __entry->for_sync) | 939 | __entry->for_sync) |
917 | ); | 940 | ); |
918 | 941 | ||
919 | TRACE_EVENT(f2fs_submit_page_mbio, | ||
920 | |||
921 | TP_PROTO(struct page *page, int rw, int type, block_t blk_addr), | ||
922 | |||
923 | TP_ARGS(page, rw, type, blk_addr), | ||
924 | |||
925 | TP_STRUCT__entry( | ||
926 | __field(dev_t, dev) | ||
927 | __field(ino_t, ino) | ||
928 | __field(int, rw) | ||
929 | __field(int, type) | ||
930 | __field(pgoff_t, index) | ||
931 | __field(block_t, block) | ||
932 | ), | ||
933 | |||
934 | TP_fast_assign( | ||
935 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
936 | __entry->ino = page->mapping->host->i_ino; | ||
937 | __entry->rw = rw; | ||
938 | __entry->type = type; | ||
939 | __entry->index = page->index; | ||
940 | __entry->block = blk_addr; | ||
941 | ), | ||
942 | |||
943 | TP_printk("dev = (%d,%d), ino = %lu, %s%s, %s, index = %lu, blkaddr = 0x%llx", | ||
944 | show_dev_ino(__entry), | ||
945 | show_bio_type(__entry->rw), | ||
946 | show_block_type(__entry->type), | ||
947 | (unsigned long)__entry->index, | ||
948 | (unsigned long long)__entry->block) | ||
949 | ); | ||
950 | |||
951 | TRACE_EVENT(f2fs_write_checkpoint, | 942 | TRACE_EVENT(f2fs_write_checkpoint, |
952 | 943 | ||
953 | TP_PROTO(struct super_block *sb, int reason, char *msg), | 944 | TP_PROTO(struct super_block *sb, int reason, char *msg), |
@@ -998,14 +989,15 @@ TRACE_EVENT(f2fs_issue_discard, | |||
998 | 989 | ||
999 | TRACE_EVENT(f2fs_issue_flush, | 990 | TRACE_EVENT(f2fs_issue_flush, |
1000 | 991 | ||
1001 | TP_PROTO(struct super_block *sb, bool nobarrier, bool flush_merge), | 992 | TP_PROTO(struct super_block *sb, unsigned int nobarrier, |
993 | unsigned int flush_merge), | ||
1002 | 994 | ||
1003 | TP_ARGS(sb, nobarrier, flush_merge), | 995 | TP_ARGS(sb, nobarrier, flush_merge), |
1004 | 996 | ||
1005 | TP_STRUCT__entry( | 997 | TP_STRUCT__entry( |
1006 | __field(dev_t, dev) | 998 | __field(dev_t, dev) |
1007 | __field(bool, nobarrier) | 999 | __field(unsigned int, nobarrier) |
1008 | __field(bool, flush_merge) | 1000 | __field(unsigned int, flush_merge) |
1009 | ), | 1001 | ), |
1010 | 1002 | ||
1011 | TP_fast_assign( | 1003 | TP_fast_assign( |