aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_trace.h')
-rw-r--r--fs/xfs/xfs_trace.h59
1 files changed, 58 insertions, 1 deletions
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 47910e638c18..f195476a037c 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -31,8 +31,8 @@ struct xfs_da_args;
31struct xfs_da_node_entry; 31struct xfs_da_node_entry;
32struct xfs_dquot; 32struct xfs_dquot;
33struct xfs_log_item; 33struct xfs_log_item;
34struct xlog_ticket;
35struct xlog; 34struct xlog;
35struct xlog_ticket;
36struct xlog_recover; 36struct xlog_recover;
37struct xlog_recover_item; 37struct xlog_recover_item;
38struct xfs_buf_log_format; 38struct xfs_buf_log_format;
@@ -938,6 +938,63 @@ DEFINE_LOG_ITEM_EVENT(xfs_ail_pinned);
938DEFINE_LOG_ITEM_EVENT(xfs_ail_locked); 938DEFINE_LOG_ITEM_EVENT(xfs_ail_locked);
939DEFINE_LOG_ITEM_EVENT(xfs_ail_flushing); 939DEFINE_LOG_ITEM_EVENT(xfs_ail_flushing);
940 940
941DECLARE_EVENT_CLASS(xfs_ail_class,
942 TP_PROTO(struct xfs_log_item *lip, xfs_lsn_t old_lsn, xfs_lsn_t new_lsn),
943 TP_ARGS(lip, old_lsn, new_lsn),
944 TP_STRUCT__entry(
945 __field(dev_t, dev)
946 __field(void *, lip)
947 __field(uint, type)
948 __field(uint, flags)
949 __field(xfs_lsn_t, old_lsn)
950 __field(xfs_lsn_t, new_lsn)
951 ),
952 TP_fast_assign(
953 __entry->dev = lip->li_mountp->m_super->s_dev;
954 __entry->lip = lip;
955 __entry->type = lip->li_type;
956 __entry->flags = lip->li_flags;
957 __entry->old_lsn = old_lsn;
958 __entry->new_lsn = new_lsn;
959 ),
960 TP_printk("dev %d:%d lip 0x%p old lsn %d/%d new lsn %d/%d type %s flags %s",
961 MAJOR(__entry->dev), MINOR(__entry->dev),
962 __entry->lip,
963 CYCLE_LSN(__entry->old_lsn), BLOCK_LSN(__entry->old_lsn),
964 CYCLE_LSN(__entry->new_lsn), BLOCK_LSN(__entry->new_lsn),
965 __print_symbolic(__entry->type, XFS_LI_TYPE_DESC),
966 __print_flags(__entry->flags, "|", XFS_LI_FLAGS))
967)
968
969#define DEFINE_AIL_EVENT(name) \
970DEFINE_EVENT(xfs_ail_class, name, \
971 TP_PROTO(struct xfs_log_item *lip, xfs_lsn_t old_lsn, xfs_lsn_t new_lsn), \
972 TP_ARGS(lip, old_lsn, new_lsn))
973DEFINE_AIL_EVENT(xfs_ail_insert);
974DEFINE_AIL_EVENT(xfs_ail_move);
975DEFINE_AIL_EVENT(xfs_ail_delete);
976
977TRACE_EVENT(xfs_log_assign_tail_lsn,
978 TP_PROTO(struct xlog *log, xfs_lsn_t new_lsn),
979 TP_ARGS(log, new_lsn),
980 TP_STRUCT__entry(
981 __field(dev_t, dev)
982 __field(xfs_lsn_t, new_lsn)
983 __field(xfs_lsn_t, old_lsn)
984 __field(xfs_lsn_t, last_sync_lsn)
985 ),
986 TP_fast_assign(
987 __entry->dev = log->l_mp->m_super->s_dev;
988 __entry->new_lsn = new_lsn;
989 __entry->old_lsn = atomic64_read(&log->l_tail_lsn);
990 __entry->last_sync_lsn = atomic64_read(&log->l_last_sync_lsn);
991 ),
992 TP_printk("dev %d:%d new tail lsn %d/%d, old lsn %d/%d, last sync %d/%d",
993 MAJOR(__entry->dev), MINOR(__entry->dev),
994 CYCLE_LSN(__entry->new_lsn), BLOCK_LSN(__entry->new_lsn),
995 CYCLE_LSN(__entry->old_lsn), BLOCK_LSN(__entry->old_lsn),
996 CYCLE_LSN(__entry->last_sync_lsn), BLOCK_LSN(__entry->last_sync_lsn))
997)
941 998
942DECLARE_EVENT_CLASS(xfs_file_class, 999DECLARE_EVENT_CLASS(xfs_file_class,
943 TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), 1000 TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags),