aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2_trace.h
diff options
context:
space:
mode:
authorTao Ma <boyu.mt@taobao.com>2011-02-21 19:20:04 -0500
committerTao Ma <boyu.mt@taobao.com>2011-02-21 19:20:04 -0500
commit198aac2838731691ca67e15fd8a56f65307d3677 (patch)
tree87d94f9ab6c82ca3a6379d789f29acf5c8c4f9f4 /fs/ocfs2/ocfs2_trace.h
parent81bad69749623062fae2f94e2d98dd43d95a36f4 (diff)
ocfs2: Remove masklog ML_REFCOUNT.
Change all the "mlog(0," in fs/ocfs2/refcounttree.c to trace events. And finally remove masklog ML_REFCOUNT. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Diffstat (limited to 'fs/ocfs2/ocfs2_trace.h')
-rw-r--r--fs/ocfs2/ocfs2_trace.h263
1 files changed, 263 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h
index 335edc50f132..a8b57ca7bdb5 100644
--- a/fs/ocfs2/ocfs2_trace.h
+++ b/fs/ocfs2/ocfs2_trace.h
@@ -133,6 +133,30 @@ DEFINE_EVENT(ocfs2__ull_ull, name, \
133 TP_PROTO(unsigned long long val1, unsigned long long val2), \ 133 TP_PROTO(unsigned long long val1, unsigned long long val2), \
134 TP_ARGS(val1, val2)) 134 TP_ARGS(val1, val2))
135 135
136DECLARE_EVENT_CLASS(ocfs2__ull_ull_uint,
137 TP_PROTO(unsigned long long value1,
138 unsigned long long value2, unsigned int value3),
139 TP_ARGS(value1, value2, value3),
140 TP_STRUCT__entry(
141 __field(unsigned long long, value1)
142 __field(unsigned long long, value2)
143 __field(unsigned int, value3)
144 ),
145 TP_fast_assign(
146 __entry->value1 = value1;
147 __entry->value2 = value2;
148 __entry->value3 = value3;
149 ),
150 TP_printk("%llu %llu %u",
151 __entry->value1, __entry->value2, __entry->value3)
152);
153
154#define DEFINE_OCFS2_ULL_ULL_UINT_EVENT(name) \
155DEFINE_EVENT(ocfs2__ull_ull_uint, name, \
156 TP_PROTO(unsigned long long val1, \
157 unsigned long long val2, unsigned int val3), \
158 TP_ARGS(val1, val2, val3))
159
136DECLARE_EVENT_CLASS(ocfs2__ull_uint_uint, 160DECLARE_EVENT_CLASS(ocfs2__ull_uint_uint,
137 TP_PROTO(unsigned long long value1, 161 TP_PROTO(unsigned long long value1,
138 unsigned int value2, unsigned int value3), 162 unsigned int value2, unsigned int value3),
@@ -705,6 +729,245 @@ DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_test_suballoc_bit);
705DEFINE_OCFS2_ULL_EVENT(ocfs2_test_inode_bit); 729DEFINE_OCFS2_ULL_EVENT(ocfs2_test_inode_bit);
706 730
707/* End of trace events for fs/ocfs2/suballoc.c. */ 731/* End of trace events for fs/ocfs2/suballoc.c. */
732
733/* Trace events for fs/ocfs2/refcounttree.c. */
734
735DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_refcount_block);
736
737DEFINE_OCFS2_ULL_EVENT(ocfs2_purge_refcount_trees);
738
739DEFINE_OCFS2_ULL_EVENT(ocfs2_create_refcount_tree);
740
741DEFINE_OCFS2_ULL_EVENT(ocfs2_create_refcount_tree_blkno);
742
743DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_change_refcount_rec);
744
745DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_expand_inline_ref_root);
746
747DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_divide_leaf_refcount_block);
748
749DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_new_leaf_refcount_block);
750
751DECLARE_EVENT_CLASS(ocfs2__refcount_tree_ops,
752 TP_PROTO(unsigned long long blkno, int index,
753 unsigned long long cpos,
754 unsigned int clusters, unsigned int refcount),
755 TP_ARGS(blkno, index, cpos, clusters, refcount),
756 TP_STRUCT__entry(
757 __field(unsigned long long, blkno)
758 __field(int, index)
759 __field(unsigned long long, cpos)
760 __field(unsigned int, clusters)
761 __field(unsigned int, refcount)
762 ),
763 TP_fast_assign(
764 __entry->blkno = blkno;
765 __entry->index = index;
766 __entry->cpos = cpos;
767 __entry->clusters = clusters;
768 __entry->refcount = refcount;
769 ),
770 TP_printk("%llu %d %llu %u %u", __entry->blkno, __entry->index,
771 __entry->cpos, __entry->clusters, __entry->refcount)
772);
773
774#define DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(name) \
775DEFINE_EVENT(ocfs2__refcount_tree_ops, name, \
776 TP_PROTO(unsigned long long blkno, int index, \
777 unsigned long long cpos, \
778 unsigned int count, unsigned int refcount), \
779 TP_ARGS(blkno, index, cpos, count, refcount))
780
781DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(ocfs2_insert_refcount_rec);
782
783TRACE_EVENT(ocfs2_split_refcount_rec,
784 TP_PROTO(unsigned long long cpos,
785 unsigned int clusters, unsigned int refcount,
786 unsigned long long split_cpos,
787 unsigned int split_clusters, unsigned int split_refcount),
788 TP_ARGS(cpos, clusters, refcount,
789 split_cpos, split_clusters, split_refcount),
790 TP_STRUCT__entry(
791 __field(unsigned long long, cpos)
792 __field(unsigned int, clusters)
793 __field(unsigned int, refcount)
794 __field(unsigned long long, split_cpos)
795 __field(unsigned int, split_clusters)
796 __field(unsigned int, split_refcount)
797 ),
798 TP_fast_assign(
799 __entry->cpos = cpos;
800 __entry->clusters = clusters;
801 __entry->refcount = refcount;
802 __entry->split_cpos = split_cpos;
803 __entry->split_clusters = split_clusters;
804 __entry->split_refcount = split_refcount;
805 ),
806 TP_printk("%llu %u %u %llu %u %u",
807 __entry->cpos, __entry->clusters, __entry->refcount,
808 __entry->split_cpos, __entry->split_clusters,
809 __entry->split_refcount)
810);
811
812DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(ocfs2_split_refcount_rec_insert);
813
814DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_increase_refcount_begin);
815
816DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_increase_refcount_change);
817
818DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_increase_refcount_insert);
819
820DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_increase_refcount_split);
821
822DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_remove_refcount_extent);
823
824DEFINE_OCFS2_ULL_EVENT(ocfs2_restore_refcount_block);
825
826DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_decrease_refcount_rec);
827
828TRACE_EVENT(ocfs2_decrease_refcount,
829 TP_PROTO(unsigned long long owner,
830 unsigned long long cpos,
831 unsigned int len, int delete),
832 TP_ARGS(owner, cpos, len, delete),
833 TP_STRUCT__entry(
834 __field(unsigned long long, owner)
835 __field(unsigned long long, cpos)
836 __field(unsigned int, len)
837 __field(int, delete)
838 ),
839 TP_fast_assign(
840 __entry->owner = owner;
841 __entry->cpos = cpos;
842 __entry->len = len;
843 __entry->delete = delete;
844 ),
845 TP_printk("%llu %llu %u %d",
846 __entry->owner, __entry->cpos, __entry->len, __entry->delete)
847);
848
849DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_mark_extent_refcounted);
850
851DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_calc_refcount_meta_credits);
852
853TRACE_EVENT(ocfs2_calc_refcount_meta_credits_iterate,
854 TP_PROTO(int recs_add, unsigned long long cpos,
855 unsigned int clusters, unsigned long long r_cpos,
856 unsigned int r_clusters, unsigned int refcount, int index),
857 TP_ARGS(recs_add, cpos, clusters, r_cpos, r_clusters, refcount, index),
858 TP_STRUCT__entry(
859 __field(int, recs_add)
860 __field(unsigned long long, cpos)
861 __field(unsigned int, clusters)
862 __field(unsigned long long, r_cpos)
863 __field(unsigned int, r_clusters)
864 __field(unsigned int, refcount)
865 __field(int, index)
866 ),
867 TP_fast_assign(
868 __entry->recs_add = recs_add;
869 __entry->cpos = cpos;
870 __entry->clusters = clusters;
871 __entry->r_cpos = r_cpos;
872 __entry->r_clusters = r_clusters;
873 __entry->refcount = refcount;
874 __entry->index = index;
875 ),
876 TP_printk("%d %llu %u %llu %u %u %d",
877 __entry->recs_add, __entry->cpos, __entry->clusters,
878 __entry->r_cpos, __entry->r_clusters,
879 __entry->refcount, __entry->index)
880);
881
882DEFINE_OCFS2_INT_INT_EVENT(ocfs2_add_refcount_flag);
883
884DEFINE_OCFS2_INT_INT_EVENT(ocfs2_prepare_refcount_change_for_del);
885
886DEFINE_OCFS2_INT_INT_EVENT(ocfs2_lock_refcount_allocators);
887
888DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_duplicate_clusters_by_page);
889
890DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_duplicate_clusters_by_jbd);
891
892TRACE_EVENT(ocfs2_clear_ext_refcount,
893 TP_PROTO(unsigned long long ino, unsigned int cpos,
894 unsigned int len, unsigned int p_cluster,
895 unsigned int ext_flags),
896 TP_ARGS(ino, cpos, len, p_cluster, ext_flags),
897 TP_STRUCT__entry(
898 __field(unsigned long long, ino)
899 __field(unsigned int, cpos)
900 __field(unsigned int, len)
901 __field(unsigned int, p_cluster)
902 __field(unsigned int, ext_flags)
903 ),
904 TP_fast_assign(
905 __entry->ino = ino;
906 __entry->cpos = cpos;
907 __entry->len = len;
908 __entry->p_cluster = p_cluster;
909 __entry->ext_flags = ext_flags;
910 ),
911 TP_printk("%llu %u %u %u %u",
912 __entry->ino, __entry->cpos, __entry->len,
913 __entry->p_cluster, __entry->ext_flags)
914);
915
916TRACE_EVENT(ocfs2_replace_clusters,
917 TP_PROTO(unsigned long long ino, unsigned int cpos,
918 unsigned int old, unsigned int new, unsigned int len,
919 unsigned int ext_flags),
920 TP_ARGS(ino, cpos, old, new, len, ext_flags),
921 TP_STRUCT__entry(
922 __field(unsigned long long, ino)
923 __field(unsigned int, cpos)
924 __field(unsigned int, old)
925 __field(unsigned int, new)
926 __field(unsigned int, len)
927 __field(unsigned int, ext_flags)
928 ),
929 TP_fast_assign(
930 __entry->ino = ino;
931 __entry->cpos = cpos;
932 __entry->old = old;
933 __entry->new = new;
934 __entry->len = len;
935 __entry->ext_flags = ext_flags;
936 ),
937 TP_printk("%llu %u %u %u %u %u",
938 __entry->ino, __entry->cpos, __entry->old, __entry->new,
939 __entry->len, __entry->ext_flags)
940);
941
942DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_make_clusters_writable);
943
944TRACE_EVENT(ocfs2_refcount_cow_hunk,
945 TP_PROTO(unsigned long long ino, unsigned int cpos,
946 unsigned int write_len, unsigned int max_cpos,
947 unsigned int cow_start, unsigned int cow_len),
948 TP_ARGS(ino, cpos, write_len, max_cpos, cow_start, cow_len),
949 TP_STRUCT__entry(
950 __field(unsigned long long, ino)
951 __field(unsigned int, cpos)
952 __field(unsigned int, write_len)
953 __field(unsigned int, max_cpos)
954 __field(unsigned int, cow_start)
955 __field(unsigned int, cow_len)
956 ),
957 TP_fast_assign(
958 __entry->ino = ino;
959 __entry->cpos = cpos;
960 __entry->write_len = write_len;
961 __entry->max_cpos = max_cpos;
962 __entry->cow_start = cow_start;
963 __entry->cow_len = cow_len;
964 ),
965 TP_printk("%llu %u %u %u %u %u",
966 __entry->ino, __entry->cpos, __entry->write_len,
967 __entry->max_cpos, __entry->cow_start, __entry->cow_len)
968);
969
970/* End of trace events for fs/ocfs2/refcounttree.c. */
708#endif /* _TRACE_OCFS2_H */ 971#endif /* _TRACE_OCFS2_H */
709 972
710/* This part must be outside protection */ 973/* This part must be outside protection */