diff options
Diffstat (limited to 'fs/xfs/xfs_trace.h')
-rw-r--r-- | fs/xfs/xfs_trace.h | 84 |
1 files changed, 83 insertions, 1 deletions
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index 47910e638c18..425dfa45b9a0 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h | |||
@@ -31,8 +31,8 @@ struct xfs_da_args; | |||
31 | struct xfs_da_node_entry; | 31 | struct xfs_da_node_entry; |
32 | struct xfs_dquot; | 32 | struct xfs_dquot; |
33 | struct xfs_log_item; | 33 | struct xfs_log_item; |
34 | struct xlog_ticket; | ||
35 | struct xlog; | 34 | struct xlog; |
35 | struct xlog_ticket; | ||
36 | struct xlog_recover; | 36 | struct xlog_recover; |
37 | struct xlog_recover_item; | 37 | struct xlog_recover_item; |
38 | struct xfs_buf_log_format; | 38 | struct xfs_buf_log_format; |
@@ -135,6 +135,31 @@ DEFINE_PERAG_REF_EVENT(xfs_perag_clear_reclaim); | |||
135 | DEFINE_PERAG_REF_EVENT(xfs_perag_set_eofblocks); | 135 | DEFINE_PERAG_REF_EVENT(xfs_perag_set_eofblocks); |
136 | DEFINE_PERAG_REF_EVENT(xfs_perag_clear_eofblocks); | 136 | DEFINE_PERAG_REF_EVENT(xfs_perag_clear_eofblocks); |
137 | 137 | ||
138 | DECLARE_EVENT_CLASS(xfs_ag_class, | ||
139 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno), | ||
140 | TP_ARGS(mp, agno), | ||
141 | TP_STRUCT__entry( | ||
142 | __field(dev_t, dev) | ||
143 | __field(xfs_agnumber_t, agno) | ||
144 | ), | ||
145 | TP_fast_assign( | ||
146 | __entry->dev = mp->m_super->s_dev; | ||
147 | __entry->agno = agno; | ||
148 | ), | ||
149 | TP_printk("dev %d:%d agno %u", | ||
150 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
151 | __entry->agno) | ||
152 | ); | ||
153 | #define DEFINE_AG_EVENT(name) \ | ||
154 | DEFINE_EVENT(xfs_ag_class, name, \ | ||
155 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno), \ | ||
156 | TP_ARGS(mp, agno)) | ||
157 | |||
158 | DEFINE_AG_EVENT(xfs_read_agf); | ||
159 | DEFINE_AG_EVENT(xfs_alloc_read_agf); | ||
160 | DEFINE_AG_EVENT(xfs_read_agi); | ||
161 | DEFINE_AG_EVENT(xfs_ialloc_read_agi); | ||
162 | |||
138 | TRACE_EVENT(xfs_attr_list_node_descend, | 163 | TRACE_EVENT(xfs_attr_list_node_descend, |
139 | TP_PROTO(struct xfs_attr_list_context *ctx, | 164 | TP_PROTO(struct xfs_attr_list_context *ctx, |
140 | struct xfs_da_node_entry *btree), | 165 | struct xfs_da_node_entry *btree), |
@@ -938,6 +963,63 @@ DEFINE_LOG_ITEM_EVENT(xfs_ail_pinned); | |||
938 | DEFINE_LOG_ITEM_EVENT(xfs_ail_locked); | 963 | DEFINE_LOG_ITEM_EVENT(xfs_ail_locked); |
939 | DEFINE_LOG_ITEM_EVENT(xfs_ail_flushing); | 964 | DEFINE_LOG_ITEM_EVENT(xfs_ail_flushing); |
940 | 965 | ||
966 | DECLARE_EVENT_CLASS(xfs_ail_class, | ||
967 | TP_PROTO(struct xfs_log_item *lip, xfs_lsn_t old_lsn, xfs_lsn_t new_lsn), | ||
968 | TP_ARGS(lip, old_lsn, new_lsn), | ||
969 | TP_STRUCT__entry( | ||
970 | __field(dev_t, dev) | ||
971 | __field(void *, lip) | ||
972 | __field(uint, type) | ||
973 | __field(uint, flags) | ||
974 | __field(xfs_lsn_t, old_lsn) | ||
975 | __field(xfs_lsn_t, new_lsn) | ||
976 | ), | ||
977 | TP_fast_assign( | ||
978 | __entry->dev = lip->li_mountp->m_super->s_dev; | ||
979 | __entry->lip = lip; | ||
980 | __entry->type = lip->li_type; | ||
981 | __entry->flags = lip->li_flags; | ||
982 | __entry->old_lsn = old_lsn; | ||
983 | __entry->new_lsn = new_lsn; | ||
984 | ), | ||
985 | TP_printk("dev %d:%d lip 0x%p old lsn %d/%d new lsn %d/%d type %s flags %s", | ||
986 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
987 | __entry->lip, | ||
988 | CYCLE_LSN(__entry->old_lsn), BLOCK_LSN(__entry->old_lsn), | ||
989 | CYCLE_LSN(__entry->new_lsn), BLOCK_LSN(__entry->new_lsn), | ||
990 | __print_symbolic(__entry->type, XFS_LI_TYPE_DESC), | ||
991 | __print_flags(__entry->flags, "|", XFS_LI_FLAGS)) | ||
992 | ) | ||
993 | |||
994 | #define DEFINE_AIL_EVENT(name) \ | ||
995 | DEFINE_EVENT(xfs_ail_class, name, \ | ||
996 | TP_PROTO(struct xfs_log_item *lip, xfs_lsn_t old_lsn, xfs_lsn_t new_lsn), \ | ||
997 | TP_ARGS(lip, old_lsn, new_lsn)) | ||
998 | DEFINE_AIL_EVENT(xfs_ail_insert); | ||
999 | DEFINE_AIL_EVENT(xfs_ail_move); | ||
1000 | DEFINE_AIL_EVENT(xfs_ail_delete); | ||
1001 | |||
1002 | TRACE_EVENT(xfs_log_assign_tail_lsn, | ||
1003 | TP_PROTO(struct xlog *log, xfs_lsn_t new_lsn), | ||
1004 | TP_ARGS(log, new_lsn), | ||
1005 | TP_STRUCT__entry( | ||
1006 | __field(dev_t, dev) | ||
1007 | __field(xfs_lsn_t, new_lsn) | ||
1008 | __field(xfs_lsn_t, old_lsn) | ||
1009 | __field(xfs_lsn_t, last_sync_lsn) | ||
1010 | ), | ||
1011 | TP_fast_assign( | ||
1012 | __entry->dev = log->l_mp->m_super->s_dev; | ||
1013 | __entry->new_lsn = new_lsn; | ||
1014 | __entry->old_lsn = atomic64_read(&log->l_tail_lsn); | ||
1015 | __entry->last_sync_lsn = atomic64_read(&log->l_last_sync_lsn); | ||
1016 | ), | ||
1017 | TP_printk("dev %d:%d new tail lsn %d/%d, old lsn %d/%d, last sync %d/%d", | ||
1018 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1019 | CYCLE_LSN(__entry->new_lsn), BLOCK_LSN(__entry->new_lsn), | ||
1020 | CYCLE_LSN(__entry->old_lsn), BLOCK_LSN(__entry->old_lsn), | ||
1021 | CYCLE_LSN(__entry->last_sync_lsn), BLOCK_LSN(__entry->last_sync_lsn)) | ||
1022 | ) | ||
941 | 1023 | ||
942 | DECLARE_EVENT_CLASS(xfs_file_class, | 1024 | DECLARE_EVENT_CLASS(xfs_file_class, |
943 | TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), | 1025 | TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), |