diff options
author | J. Bruce Fields <bfields@redhat.com> | 2010-08-26 13:22:27 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2010-08-26 13:22:27 -0400 |
commit | f632265d0ffb5acf331252d98c64939849d96bb2 (patch) | |
tree | 31187d9a726bf1ca6ca12e26ad8e7c609eaf4d8b /fs/xfs/linux-2.6/xfs_trace.h | |
parent | 7d94784293096c0a46897acdb83be5abd9278ece (diff) | |
parent | da5cabf80e2433131bf0ed8993abc0f7ea618c73 (diff) |
Merge commit 'v2.6.36-rc1' into HEAD
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_trace.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_trace.h | 473 |
1 files changed, 280 insertions, 193 deletions
diff --git a/fs/xfs/linux-2.6/xfs_trace.h b/fs/xfs/linux-2.6/xfs_trace.h index ff6bc797baf2..be5dffd282a1 100644 --- a/fs/xfs/linux-2.6/xfs_trace.h +++ b/fs/xfs/linux-2.6/xfs_trace.h | |||
@@ -82,33 +82,6 @@ DECLARE_EVENT_CLASS(xfs_attr_list_class, | |||
82 | ) | 82 | ) |
83 | ) | 83 | ) |
84 | 84 | ||
85 | #define DEFINE_PERAG_REF_EVENT(name) \ | ||
86 | TRACE_EVENT(name, \ | ||
87 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, \ | ||
88 | unsigned long caller_ip), \ | ||
89 | TP_ARGS(mp, agno, refcount, caller_ip), \ | ||
90 | TP_STRUCT__entry( \ | ||
91 | __field(dev_t, dev) \ | ||
92 | __field(xfs_agnumber_t, agno) \ | ||
93 | __field(int, refcount) \ | ||
94 | __field(unsigned long, caller_ip) \ | ||
95 | ), \ | ||
96 | TP_fast_assign( \ | ||
97 | __entry->dev = mp->m_super->s_dev; \ | ||
98 | __entry->agno = agno; \ | ||
99 | __entry->refcount = refcount; \ | ||
100 | __entry->caller_ip = caller_ip; \ | ||
101 | ), \ | ||
102 | TP_printk("dev %d:%d agno %u refcount %d caller %pf", \ | ||
103 | MAJOR(__entry->dev), MINOR(__entry->dev), \ | ||
104 | __entry->agno, \ | ||
105 | __entry->refcount, \ | ||
106 | (char *)__entry->caller_ip) \ | ||
107 | ); | ||
108 | |||
109 | DEFINE_PERAG_REF_EVENT(xfs_perag_get) | ||
110 | DEFINE_PERAG_REF_EVENT(xfs_perag_put) | ||
111 | |||
112 | #define DEFINE_ATTR_LIST_EVENT(name) \ | 85 | #define DEFINE_ATTR_LIST_EVENT(name) \ |
113 | DEFINE_EVENT(xfs_attr_list_class, name, \ | 86 | DEFINE_EVENT(xfs_attr_list_class, name, \ |
114 | TP_PROTO(struct xfs_attr_list_context *ctx), \ | 87 | TP_PROTO(struct xfs_attr_list_context *ctx), \ |
@@ -122,6 +95,40 @@ DEFINE_ATTR_LIST_EVENT(xfs_attr_list_add); | |||
122 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_wrong_blk); | 95 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_wrong_blk); |
123 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_notfound); | 96 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_notfound); |
124 | 97 | ||
98 | DECLARE_EVENT_CLASS(xfs_perag_class, | ||
99 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, | ||
100 | unsigned long caller_ip), | ||
101 | TP_ARGS(mp, agno, refcount, caller_ip), | ||
102 | TP_STRUCT__entry( | ||
103 | __field(dev_t, dev) | ||
104 | __field(xfs_agnumber_t, agno) | ||
105 | __field(int, refcount) | ||
106 | __field(unsigned long, caller_ip) | ||
107 | ), | ||
108 | TP_fast_assign( | ||
109 | __entry->dev = mp->m_super->s_dev; | ||
110 | __entry->agno = agno; | ||
111 | __entry->refcount = refcount; | ||
112 | __entry->caller_ip = caller_ip; | ||
113 | ), | ||
114 | TP_printk("dev %d:%d agno %u refcount %d caller %pf", | ||
115 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
116 | __entry->agno, | ||
117 | __entry->refcount, | ||
118 | (char *)__entry->caller_ip) | ||
119 | ); | ||
120 | |||
121 | #define DEFINE_PERAG_REF_EVENT(name) \ | ||
122 | DEFINE_EVENT(xfs_perag_class, name, \ | ||
123 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, \ | ||
124 | unsigned long caller_ip), \ | ||
125 | TP_ARGS(mp, agno, refcount, caller_ip)) | ||
126 | DEFINE_PERAG_REF_EVENT(xfs_perag_get); | ||
127 | DEFINE_PERAG_REF_EVENT(xfs_perag_get_reclaim); | ||
128 | DEFINE_PERAG_REF_EVENT(xfs_perag_put); | ||
129 | DEFINE_PERAG_REF_EVENT(xfs_perag_set_reclaim); | ||
130 | DEFINE_PERAG_REF_EVENT(xfs_perag_clear_reclaim); | ||
131 | |||
125 | TRACE_EVENT(xfs_attr_list_node_descend, | 132 | TRACE_EVENT(xfs_attr_list_node_descend, |
126 | TP_PROTO(struct xfs_attr_list_context *ctx, | 133 | TP_PROTO(struct xfs_attr_list_context *ctx, |
127 | struct xfs_da_node_entry *btree), | 134 | struct xfs_da_node_entry *btree), |
@@ -310,8 +317,6 @@ DEFINE_BUF_EVENT(xfs_buf_init); | |||
310 | DEFINE_BUF_EVENT(xfs_buf_free); | 317 | DEFINE_BUF_EVENT(xfs_buf_free); |
311 | DEFINE_BUF_EVENT(xfs_buf_hold); | 318 | DEFINE_BUF_EVENT(xfs_buf_hold); |
312 | DEFINE_BUF_EVENT(xfs_buf_rele); | 319 | DEFINE_BUF_EVENT(xfs_buf_rele); |
313 | DEFINE_BUF_EVENT(xfs_buf_pin); | ||
314 | DEFINE_BUF_EVENT(xfs_buf_unpin); | ||
315 | DEFINE_BUF_EVENT(xfs_buf_iodone); | 320 | DEFINE_BUF_EVENT(xfs_buf_iodone); |
316 | DEFINE_BUF_EVENT(xfs_buf_iorequest); | 321 | DEFINE_BUF_EVENT(xfs_buf_iorequest); |
317 | DEFINE_BUF_EVENT(xfs_buf_bawrite); | 322 | DEFINE_BUF_EVENT(xfs_buf_bawrite); |
@@ -534,7 +539,7 @@ DEFINE_LOCK_EVENT(xfs_ilock_nowait); | |||
534 | DEFINE_LOCK_EVENT(xfs_ilock_demote); | 539 | DEFINE_LOCK_EVENT(xfs_ilock_demote); |
535 | DEFINE_LOCK_EVENT(xfs_iunlock); | 540 | DEFINE_LOCK_EVENT(xfs_iunlock); |
536 | 541 | ||
537 | DECLARE_EVENT_CLASS(xfs_iget_class, | 542 | DECLARE_EVENT_CLASS(xfs_inode_class, |
538 | TP_PROTO(struct xfs_inode *ip), | 543 | TP_PROTO(struct xfs_inode *ip), |
539 | TP_ARGS(ip), | 544 | TP_ARGS(ip), |
540 | TP_STRUCT__entry( | 545 | TP_STRUCT__entry( |
@@ -550,16 +555,38 @@ DECLARE_EVENT_CLASS(xfs_iget_class, | |||
550 | __entry->ino) | 555 | __entry->ino) |
551 | ) | 556 | ) |
552 | 557 | ||
553 | #define DEFINE_IGET_EVENT(name) \ | 558 | #define DEFINE_INODE_EVENT(name) \ |
554 | DEFINE_EVENT(xfs_iget_class, name, \ | 559 | DEFINE_EVENT(xfs_inode_class, name, \ |
555 | TP_PROTO(struct xfs_inode *ip), \ | 560 | TP_PROTO(struct xfs_inode *ip), \ |
556 | TP_ARGS(ip)) | 561 | TP_ARGS(ip)) |
557 | DEFINE_IGET_EVENT(xfs_iget_skip); | 562 | DEFINE_INODE_EVENT(xfs_iget_skip); |
558 | DEFINE_IGET_EVENT(xfs_iget_reclaim); | 563 | DEFINE_INODE_EVENT(xfs_iget_reclaim); |
559 | DEFINE_IGET_EVENT(xfs_iget_found); | 564 | DEFINE_INODE_EVENT(xfs_iget_reclaim_fail); |
560 | DEFINE_IGET_EVENT(xfs_iget_alloc); | 565 | DEFINE_INODE_EVENT(xfs_iget_hit); |
561 | 566 | DEFINE_INODE_EVENT(xfs_iget_miss); | |
562 | DECLARE_EVENT_CLASS(xfs_inode_class, | 567 | |
568 | DEFINE_INODE_EVENT(xfs_getattr); | ||
569 | DEFINE_INODE_EVENT(xfs_setattr); | ||
570 | DEFINE_INODE_EVENT(xfs_readlink); | ||
571 | DEFINE_INODE_EVENT(xfs_alloc_file_space); | ||
572 | DEFINE_INODE_EVENT(xfs_free_file_space); | ||
573 | DEFINE_INODE_EVENT(xfs_readdir); | ||
574 | #ifdef CONFIG_XFS_POSIX_ACL | ||
575 | DEFINE_INODE_EVENT(xfs_check_acl); | ||
576 | #endif | ||
577 | DEFINE_INODE_EVENT(xfs_vm_bmap); | ||
578 | DEFINE_INODE_EVENT(xfs_file_ioctl); | ||
579 | DEFINE_INODE_EVENT(xfs_file_compat_ioctl); | ||
580 | DEFINE_INODE_EVENT(xfs_ioctl_setattr); | ||
581 | DEFINE_INODE_EVENT(xfs_file_fsync); | ||
582 | DEFINE_INODE_EVENT(xfs_destroy_inode); | ||
583 | DEFINE_INODE_EVENT(xfs_write_inode); | ||
584 | DEFINE_INODE_EVENT(xfs_evict_inode); | ||
585 | |||
586 | DEFINE_INODE_EVENT(xfs_dquot_dqalloc); | ||
587 | DEFINE_INODE_EVENT(xfs_dquot_dqdetach); | ||
588 | |||
589 | DECLARE_EVENT_CLASS(xfs_iref_class, | ||
563 | TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), | 590 | TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), |
564 | TP_ARGS(ip, caller_ip), | 591 | TP_ARGS(ip, caller_ip), |
565 | TP_STRUCT__entry( | 592 | TP_STRUCT__entry( |
@@ -584,20 +611,71 @@ DECLARE_EVENT_CLASS(xfs_inode_class, | |||
584 | (char *)__entry->caller_ip) | 611 | (char *)__entry->caller_ip) |
585 | ) | 612 | ) |
586 | 613 | ||
587 | #define DEFINE_INODE_EVENT(name) \ | 614 | #define DEFINE_IREF_EVENT(name) \ |
588 | DEFINE_EVENT(xfs_inode_class, name, \ | 615 | DEFINE_EVENT(xfs_iref_class, name, \ |
589 | TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), \ | 616 | TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), \ |
590 | TP_ARGS(ip, caller_ip)) | 617 | TP_ARGS(ip, caller_ip)) |
591 | DEFINE_INODE_EVENT(xfs_ihold); | 618 | DEFINE_IREF_EVENT(xfs_ihold); |
592 | DEFINE_INODE_EVENT(xfs_irele); | 619 | DEFINE_IREF_EVENT(xfs_irele); |
593 | DEFINE_INODE_EVENT(xfs_inode_pin); | 620 | DEFINE_IREF_EVENT(xfs_inode_pin); |
594 | DEFINE_INODE_EVENT(xfs_inode_unpin); | 621 | DEFINE_IREF_EVENT(xfs_inode_unpin); |
595 | DEFINE_INODE_EVENT(xfs_inode_unpin_nowait); | 622 | DEFINE_IREF_EVENT(xfs_inode_unpin_nowait); |
623 | |||
624 | DECLARE_EVENT_CLASS(xfs_namespace_class, | ||
625 | TP_PROTO(struct xfs_inode *dp, struct xfs_name *name), | ||
626 | TP_ARGS(dp, name), | ||
627 | TP_STRUCT__entry( | ||
628 | __field(dev_t, dev) | ||
629 | __field(xfs_ino_t, dp_ino) | ||
630 | __dynamic_array(char, name, name->len) | ||
631 | ), | ||
632 | TP_fast_assign( | ||
633 | __entry->dev = VFS_I(dp)->i_sb->s_dev; | ||
634 | __entry->dp_ino = dp->i_ino; | ||
635 | memcpy(__get_str(name), name->name, name->len); | ||
636 | ), | ||
637 | TP_printk("dev %d:%d dp ino 0x%llx name %s", | ||
638 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
639 | __entry->dp_ino, | ||
640 | __get_str(name)) | ||
641 | ) | ||
596 | 642 | ||
597 | /* the old xfs_itrace_entry tracer - to be replaced by s.th. in the VFS */ | 643 | #define DEFINE_NAMESPACE_EVENT(name) \ |
598 | DEFINE_INODE_EVENT(xfs_inode); | 644 | DEFINE_EVENT(xfs_namespace_class, name, \ |
599 | #define xfs_itrace_entry(ip) \ | 645 | TP_PROTO(struct xfs_inode *dp, struct xfs_name *name), \ |
600 | trace_xfs_inode(ip, _THIS_IP_) | 646 | TP_ARGS(dp, name)) |
647 | DEFINE_NAMESPACE_EVENT(xfs_remove); | ||
648 | DEFINE_NAMESPACE_EVENT(xfs_link); | ||
649 | DEFINE_NAMESPACE_EVENT(xfs_lookup); | ||
650 | DEFINE_NAMESPACE_EVENT(xfs_create); | ||
651 | DEFINE_NAMESPACE_EVENT(xfs_symlink); | ||
652 | |||
653 | TRACE_EVENT(xfs_rename, | ||
654 | TP_PROTO(struct xfs_inode *src_dp, struct xfs_inode *target_dp, | ||
655 | struct xfs_name *src_name, struct xfs_name *target_name), | ||
656 | TP_ARGS(src_dp, target_dp, src_name, target_name), | ||
657 | TP_STRUCT__entry( | ||
658 | __field(dev_t, dev) | ||
659 | __field(xfs_ino_t, src_dp_ino) | ||
660 | __field(xfs_ino_t, target_dp_ino) | ||
661 | __dynamic_array(char, src_name, src_name->len) | ||
662 | __dynamic_array(char, target_name, target_name->len) | ||
663 | ), | ||
664 | TP_fast_assign( | ||
665 | __entry->dev = VFS_I(src_dp)->i_sb->s_dev; | ||
666 | __entry->src_dp_ino = src_dp->i_ino; | ||
667 | __entry->target_dp_ino = target_dp->i_ino; | ||
668 | memcpy(__get_str(src_name), src_name->name, src_name->len); | ||
669 | memcpy(__get_str(target_name), target_name->name, target_name->len); | ||
670 | ), | ||
671 | TP_printk("dev %d:%d src dp ino 0x%llx target dp ino 0x%llx" | ||
672 | " src name %s target name %s", | ||
673 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
674 | __entry->src_dp_ino, | ||
675 | __entry->target_dp_ino, | ||
676 | __get_str(src_name), | ||
677 | __get_str(target_name)) | ||
678 | ) | ||
601 | 679 | ||
602 | DECLARE_EVENT_CLASS(xfs_dquot_class, | 680 | DECLARE_EVENT_CLASS(xfs_dquot_class, |
603 | TP_PROTO(struct xfs_dquot *dqp), | 681 | TP_PROTO(struct xfs_dquot *dqp), |
@@ -677,9 +755,6 @@ DEFINE_DQUOT_EVENT(xfs_dqrele); | |||
677 | DEFINE_DQUOT_EVENT(xfs_dqflush); | 755 | DEFINE_DQUOT_EVENT(xfs_dqflush); |
678 | DEFINE_DQUOT_EVENT(xfs_dqflush_force); | 756 | DEFINE_DQUOT_EVENT(xfs_dqflush_force); |
679 | DEFINE_DQUOT_EVENT(xfs_dqflush_done); | 757 | DEFINE_DQUOT_EVENT(xfs_dqflush_done); |
680 | /* not really iget events, but we re-use the format */ | ||
681 | DEFINE_IGET_EVENT(xfs_dquot_dqalloc); | ||
682 | DEFINE_IGET_EVENT(xfs_dquot_dqdetach); | ||
683 | 758 | ||
684 | DECLARE_EVENT_CLASS(xfs_loggrant_class, | 759 | DECLARE_EVENT_CLASS(xfs_loggrant_class, |
685 | TP_PROTO(struct log *log, struct xlog_ticket *tic), | 760 | TP_PROTO(struct log *log, struct xlog_ticket *tic), |
@@ -775,165 +850,177 @@ DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_enter); | |||
775 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_exit); | 850 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_exit); |
776 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_sub); | 851 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_sub); |
777 | 852 | ||
778 | #define DEFINE_RW_EVENT(name) \ | 853 | DECLARE_EVENT_CLASS(xfs_file_class, |
779 | TRACE_EVENT(name, \ | 854 | TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), |
780 | TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), \ | 855 | TP_ARGS(ip, count, offset, flags), |
781 | TP_ARGS(ip, count, offset, flags), \ | 856 | TP_STRUCT__entry( |
782 | TP_STRUCT__entry( \ | 857 | __field(dev_t, dev) |
783 | __field(dev_t, dev) \ | 858 | __field(xfs_ino_t, ino) |
784 | __field(xfs_ino_t, ino) \ | 859 | __field(xfs_fsize_t, size) |
785 | __field(xfs_fsize_t, size) \ | 860 | __field(xfs_fsize_t, new_size) |
786 | __field(xfs_fsize_t, new_size) \ | 861 | __field(loff_t, offset) |
787 | __field(loff_t, offset) \ | 862 | __field(size_t, count) |
788 | __field(size_t, count) \ | 863 | __field(int, flags) |
789 | __field(int, flags) \ | 864 | ), |
790 | ), \ | 865 | TP_fast_assign( |
791 | TP_fast_assign( \ | 866 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
792 | __entry->dev = VFS_I(ip)->i_sb->s_dev; \ | 867 | __entry->ino = ip->i_ino; |
793 | __entry->ino = ip->i_ino; \ | 868 | __entry->size = ip->i_d.di_size; |
794 | __entry->size = ip->i_d.di_size; \ | 869 | __entry->new_size = ip->i_new_size; |
795 | __entry->new_size = ip->i_new_size; \ | 870 | __entry->offset = offset; |
796 | __entry->offset = offset; \ | 871 | __entry->count = count; |
797 | __entry->count = count; \ | 872 | __entry->flags = flags; |
798 | __entry->flags = flags; \ | 873 | ), |
799 | ), \ | 874 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " |
800 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " \ | 875 | "offset 0x%llx count 0x%zx ioflags %s", |
801 | "offset 0x%llx count 0x%zx ioflags %s", \ | 876 | MAJOR(__entry->dev), MINOR(__entry->dev), |
802 | MAJOR(__entry->dev), MINOR(__entry->dev), \ | 877 | __entry->ino, |
803 | __entry->ino, \ | 878 | __entry->size, |
804 | __entry->size, \ | 879 | __entry->new_size, |
805 | __entry->new_size, \ | 880 | __entry->offset, |
806 | __entry->offset, \ | 881 | __entry->count, |
807 | __entry->count, \ | 882 | __print_flags(__entry->flags, "|", XFS_IO_FLAGS)) |
808 | __print_flags(__entry->flags, "|", XFS_IO_FLAGS)) \ | ||
809 | ) | 883 | ) |
884 | |||
885 | #define DEFINE_RW_EVENT(name) \ | ||
886 | DEFINE_EVENT(xfs_file_class, name, \ | ||
887 | TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), \ | ||
888 | TP_ARGS(ip, count, offset, flags)) | ||
810 | DEFINE_RW_EVENT(xfs_file_read); | 889 | DEFINE_RW_EVENT(xfs_file_read); |
811 | DEFINE_RW_EVENT(xfs_file_buffered_write); | 890 | DEFINE_RW_EVENT(xfs_file_buffered_write); |
812 | DEFINE_RW_EVENT(xfs_file_direct_write); | 891 | DEFINE_RW_EVENT(xfs_file_direct_write); |
813 | DEFINE_RW_EVENT(xfs_file_splice_read); | 892 | DEFINE_RW_EVENT(xfs_file_splice_read); |
814 | DEFINE_RW_EVENT(xfs_file_splice_write); | 893 | DEFINE_RW_EVENT(xfs_file_splice_write); |
815 | 894 | ||
816 | 895 | DECLARE_EVENT_CLASS(xfs_page_class, | |
817 | #define DEFINE_PAGE_EVENT(name) \ | 896 | TP_PROTO(struct inode *inode, struct page *page, unsigned long off), |
818 | TRACE_EVENT(name, \ | 897 | TP_ARGS(inode, page, off), |
819 | TP_PROTO(struct inode *inode, struct page *page, unsigned long off), \ | 898 | TP_STRUCT__entry( |
820 | TP_ARGS(inode, page, off), \ | 899 | __field(dev_t, dev) |
821 | TP_STRUCT__entry( \ | 900 | __field(xfs_ino_t, ino) |
822 | __field(dev_t, dev) \ | 901 | __field(pgoff_t, pgoff) |
823 | __field(xfs_ino_t, ino) \ | 902 | __field(loff_t, size) |
824 | __field(pgoff_t, pgoff) \ | 903 | __field(unsigned long, offset) |
825 | __field(loff_t, size) \ | 904 | __field(int, delalloc) |
826 | __field(unsigned long, offset) \ | 905 | __field(int, unwritten) |
827 | __field(int, delalloc) \ | 906 | ), |
828 | __field(int, unmapped) \ | 907 | TP_fast_assign( |
829 | __field(int, unwritten) \ | 908 | int delalloc = -1, unwritten = -1; |
830 | ), \ | 909 | |
831 | TP_fast_assign( \ | 910 | if (page_has_buffers(page)) |
832 | int delalloc = -1, unmapped = -1, unwritten = -1; \ | 911 | xfs_count_page_state(page, &delalloc, &unwritten); |
833 | \ | 912 | __entry->dev = inode->i_sb->s_dev; |
834 | if (page_has_buffers(page)) \ | 913 | __entry->ino = XFS_I(inode)->i_ino; |
835 | xfs_count_page_state(page, &delalloc, \ | 914 | __entry->pgoff = page_offset(page); |
836 | &unmapped, &unwritten); \ | 915 | __entry->size = i_size_read(inode); |
837 | __entry->dev = inode->i_sb->s_dev; \ | 916 | __entry->offset = off; |
838 | __entry->ino = XFS_I(inode)->i_ino; \ | 917 | __entry->delalloc = delalloc; |
839 | __entry->pgoff = page_offset(page); \ | 918 | __entry->unwritten = unwritten; |
840 | __entry->size = i_size_read(inode); \ | 919 | ), |
841 | __entry->offset = off; \ | 920 | TP_printk("dev %d:%d ino 0x%llx pgoff 0x%lx size 0x%llx offset %lx " |
842 | __entry->delalloc = delalloc; \ | 921 | "delalloc %d unwritten %d", |
843 | __entry->unmapped = unmapped; \ | 922 | MAJOR(__entry->dev), MINOR(__entry->dev), |
844 | __entry->unwritten = unwritten; \ | 923 | __entry->ino, |
845 | ), \ | 924 | __entry->pgoff, |
846 | TP_printk("dev %d:%d ino 0x%llx pgoff 0x%lx size 0x%llx offset %lx " \ | 925 | __entry->size, |
847 | "delalloc %d unmapped %d unwritten %d", \ | 926 | __entry->offset, |
848 | MAJOR(__entry->dev), MINOR(__entry->dev), \ | 927 | __entry->delalloc, |
849 | __entry->ino, \ | 928 | __entry->unwritten) |
850 | __entry->pgoff, \ | ||
851 | __entry->size, \ | ||
852 | __entry->offset, \ | ||
853 | __entry->delalloc, \ | ||
854 | __entry->unmapped, \ | ||
855 | __entry->unwritten) \ | ||
856 | ) | 929 | ) |
930 | |||
931 | #define DEFINE_PAGE_EVENT(name) \ | ||
932 | DEFINE_EVENT(xfs_page_class, name, \ | ||
933 | TP_PROTO(struct inode *inode, struct page *page, unsigned long off), \ | ||
934 | TP_ARGS(inode, page, off)) | ||
857 | DEFINE_PAGE_EVENT(xfs_writepage); | 935 | DEFINE_PAGE_EVENT(xfs_writepage); |
858 | DEFINE_PAGE_EVENT(xfs_releasepage); | 936 | DEFINE_PAGE_EVENT(xfs_releasepage); |
859 | DEFINE_PAGE_EVENT(xfs_invalidatepage); | 937 | DEFINE_PAGE_EVENT(xfs_invalidatepage); |
860 | 938 | ||
861 | #define DEFINE_IOMAP_EVENT(name) \ | 939 | DECLARE_EVENT_CLASS(xfs_iomap_class, |
862 | TRACE_EVENT(name, \ | 940 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, |
863 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, \ | 941 | int flags, struct xfs_bmbt_irec *irec), |
864 | int flags, struct xfs_bmbt_irec *irec), \ | 942 | TP_ARGS(ip, offset, count, flags, irec), |
865 | TP_ARGS(ip, offset, count, flags, irec), \ | 943 | TP_STRUCT__entry( |
866 | TP_STRUCT__entry( \ | 944 | __field(dev_t, dev) |
867 | __field(dev_t, dev) \ | 945 | __field(xfs_ino_t, ino) |
868 | __field(xfs_ino_t, ino) \ | 946 | __field(loff_t, size) |
869 | __field(loff_t, size) \ | 947 | __field(loff_t, new_size) |
870 | __field(loff_t, new_size) \ | 948 | __field(loff_t, offset) |
871 | __field(loff_t, offset) \ | 949 | __field(size_t, count) |
872 | __field(size_t, count) \ | 950 | __field(int, flags) |
873 | __field(int, flags) \ | 951 | __field(xfs_fileoff_t, startoff) |
874 | __field(xfs_fileoff_t, startoff) \ | 952 | __field(xfs_fsblock_t, startblock) |
875 | __field(xfs_fsblock_t, startblock) \ | 953 | __field(xfs_filblks_t, blockcount) |
876 | __field(xfs_filblks_t, blockcount) \ | 954 | ), |
877 | ), \ | 955 | TP_fast_assign( |
878 | TP_fast_assign( \ | 956 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
879 | __entry->dev = VFS_I(ip)->i_sb->s_dev; \ | 957 | __entry->ino = ip->i_ino; |
880 | __entry->ino = ip->i_ino; \ | 958 | __entry->size = ip->i_d.di_size; |
881 | __entry->size = ip->i_d.di_size; \ | 959 | __entry->new_size = ip->i_new_size; |
882 | __entry->new_size = ip->i_new_size; \ | 960 | __entry->offset = offset; |
883 | __entry->offset = offset; \ | 961 | __entry->count = count; |
884 | __entry->count = count; \ | 962 | __entry->flags = flags; |
885 | __entry->flags = flags; \ | 963 | __entry->startoff = irec ? irec->br_startoff : 0; |
886 | __entry->startoff = irec ? irec->br_startoff : 0; \ | 964 | __entry->startblock = irec ? irec->br_startblock : 0; |
887 | __entry->startblock = irec ? irec->br_startblock : 0; \ | 965 | __entry->blockcount = irec ? irec->br_blockcount : 0; |
888 | __entry->blockcount = irec ? irec->br_blockcount : 0; \ | 966 | ), |
889 | ), \ | 967 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " |
890 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " \ | 968 | "offset 0x%llx count %zd flags %s " |
891 | "offset 0x%llx count %zd flags %s " \ | 969 | "startoff 0x%llx startblock %lld blockcount 0x%llx", |
892 | "startoff 0x%llx startblock %lld blockcount 0x%llx", \ | 970 | MAJOR(__entry->dev), MINOR(__entry->dev), |
893 | MAJOR(__entry->dev), MINOR(__entry->dev), \ | 971 | __entry->ino, |
894 | __entry->ino, \ | 972 | __entry->size, |
895 | __entry->size, \ | 973 | __entry->new_size, |
896 | __entry->new_size, \ | 974 | __entry->offset, |
897 | __entry->offset, \ | 975 | __entry->count, |
898 | __entry->count, \ | 976 | __print_flags(__entry->flags, "|", BMAPI_FLAGS), |
899 | __print_flags(__entry->flags, "|", BMAPI_FLAGS), \ | 977 | __entry->startoff, |
900 | __entry->startoff, \ | 978 | (__int64_t)__entry->startblock, |
901 | (__int64_t)__entry->startblock, \ | 979 | __entry->blockcount) |
902 | __entry->blockcount) \ | ||
903 | ) | 980 | ) |
981 | |||
982 | #define DEFINE_IOMAP_EVENT(name) \ | ||
983 | DEFINE_EVENT(xfs_iomap_class, name, \ | ||
984 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, \ | ||
985 | int flags, struct xfs_bmbt_irec *irec), \ | ||
986 | TP_ARGS(ip, offset, count, flags, irec)) | ||
904 | DEFINE_IOMAP_EVENT(xfs_iomap_enter); | 987 | DEFINE_IOMAP_EVENT(xfs_iomap_enter); |
905 | DEFINE_IOMAP_EVENT(xfs_iomap_found); | 988 | DEFINE_IOMAP_EVENT(xfs_iomap_found); |
906 | DEFINE_IOMAP_EVENT(xfs_iomap_alloc); | 989 | DEFINE_IOMAP_EVENT(xfs_iomap_alloc); |
907 | 990 | ||
908 | #define DEFINE_SIMPLE_IO_EVENT(name) \ | 991 | DECLARE_EVENT_CLASS(xfs_simple_io_class, |
909 | TRACE_EVENT(name, \ | 992 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count), |
910 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count), \ | 993 | TP_ARGS(ip, offset, count), |
911 | TP_ARGS(ip, offset, count), \ | 994 | TP_STRUCT__entry( |
912 | TP_STRUCT__entry( \ | 995 | __field(dev_t, dev) |
913 | __field(dev_t, dev) \ | 996 | __field(xfs_ino_t, ino) |
914 | __field(xfs_ino_t, ino) \ | 997 | __field(loff_t, size) |
915 | __field(loff_t, size) \ | 998 | __field(loff_t, new_size) |
916 | __field(loff_t, new_size) \ | 999 | __field(loff_t, offset) |
917 | __field(loff_t, offset) \ | 1000 | __field(size_t, count) |
918 | __field(size_t, count) \ | 1001 | ), |
919 | ), \ | 1002 | TP_fast_assign( |
920 | TP_fast_assign( \ | 1003 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
921 | __entry->dev = VFS_I(ip)->i_sb->s_dev; \ | 1004 | __entry->ino = ip->i_ino; |
922 | __entry->ino = ip->i_ino; \ | 1005 | __entry->size = ip->i_d.di_size; |
923 | __entry->size = ip->i_d.di_size; \ | 1006 | __entry->new_size = ip->i_new_size; |
924 | __entry->new_size = ip->i_new_size; \ | 1007 | __entry->offset = offset; |
925 | __entry->offset = offset; \ | 1008 | __entry->count = count; |
926 | __entry->count = count; \ | 1009 | ), |
927 | ), \ | 1010 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " |
928 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " \ | 1011 | "offset 0x%llx count %zd", |
929 | "offset 0x%llx count %zd", \ | 1012 | MAJOR(__entry->dev), MINOR(__entry->dev), |
930 | MAJOR(__entry->dev), MINOR(__entry->dev), \ | 1013 | __entry->ino, |
931 | __entry->ino, \ | 1014 | __entry->size, |
932 | __entry->size, \ | 1015 | __entry->new_size, |
933 | __entry->new_size, \ | 1016 | __entry->offset, |
934 | __entry->offset, \ | 1017 | __entry->count) |
935 | __entry->count) \ | ||
936 | ); | 1018 | ); |
1019 | |||
1020 | #define DEFINE_SIMPLE_IO_EVENT(name) \ | ||
1021 | DEFINE_EVENT(xfs_simple_io_class, name, \ | ||
1022 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count), \ | ||
1023 | TP_ARGS(ip, offset, count)) | ||
937 | DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc); | 1024 | DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc); |
938 | DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert); | 1025 | DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert); |
939 | 1026 | ||