xfs: split tracepoint classes for deferred items
We're about to start adding support for deferred log intent items for realtime extents, so split these four types into separate classes so that we can customize them as the transition happens. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
7fbaab57a8
commit
ef2d4a00df
@ -2655,7 +2655,25 @@ DEFINE_EVENT(xfs_defer_pending_class, name, \
|
||||
TP_PROTO(struct xfs_mount *mp, struct xfs_defer_pending *dfp), \
|
||||
TP_ARGS(mp, dfp))
|
||||
|
||||
DECLARE_EVENT_CLASS(xfs_phys_extent_deferred_class,
|
||||
DEFINE_DEFER_EVENT(xfs_defer_cancel);
|
||||
DEFINE_DEFER_EVENT(xfs_defer_trans_roll);
|
||||
DEFINE_DEFER_EVENT(xfs_defer_trans_abort);
|
||||
DEFINE_DEFER_EVENT(xfs_defer_finish);
|
||||
DEFINE_DEFER_EVENT(xfs_defer_finish_done);
|
||||
|
||||
DEFINE_DEFER_ERROR_EVENT(xfs_defer_trans_roll_error);
|
||||
DEFINE_DEFER_ERROR_EVENT(xfs_defer_finish_error);
|
||||
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_create_intent);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_cancel_list);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_finish);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_abort);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_relog_intent);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_isolate_paused);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_item_pause);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_item_unpause);
|
||||
|
||||
DECLARE_EVENT_CLASS(xfs_free_extent_deferred_class,
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
|
||||
int type, xfs_agblock_t agbno, xfs_extlen_t len),
|
||||
TP_ARGS(mp, agno, type, agbno, len),
|
||||
@ -2680,92 +2698,17 @@ DECLARE_EVENT_CLASS(xfs_phys_extent_deferred_class,
|
||||
__entry->agbno,
|
||||
__entry->len)
|
||||
);
|
||||
#define DEFINE_PHYS_EXTENT_DEFERRED_EVENT(name) \
|
||||
DEFINE_EVENT(xfs_phys_extent_deferred_class, name, \
|
||||
#define DEFINE_FREE_EXTENT_DEFERRED_EVENT(name) \
|
||||
DEFINE_EVENT(xfs_free_extent_deferred_class, name, \
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
|
||||
int type, \
|
||||
xfs_agblock_t bno, \
|
||||
xfs_extlen_t len), \
|
||||
TP_ARGS(mp, agno, type, bno, len))
|
||||
|
||||
DECLARE_EVENT_CLASS(xfs_map_extent_deferred_class,
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
|
||||
int op,
|
||||
xfs_agblock_t agbno,
|
||||
xfs_ino_t ino,
|
||||
int whichfork,
|
||||
xfs_fileoff_t offset,
|
||||
xfs_filblks_t len,
|
||||
xfs_exntst_t state),
|
||||
TP_ARGS(mp, agno, op, agbno, ino, whichfork, offset, len, state),
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
__field(xfs_agnumber_t, agno)
|
||||
__field(xfs_ino_t, ino)
|
||||
__field(xfs_agblock_t, agbno)
|
||||
__field(int, whichfork)
|
||||
__field(xfs_fileoff_t, l_loff)
|
||||
__field(xfs_filblks_t, l_len)
|
||||
__field(xfs_exntst_t, l_state)
|
||||
__field(int, op)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->dev = mp->m_super->s_dev;
|
||||
__entry->agno = agno;
|
||||
__entry->ino = ino;
|
||||
__entry->agbno = agbno;
|
||||
__entry->whichfork = whichfork;
|
||||
__entry->l_loff = offset;
|
||||
__entry->l_len = len;
|
||||
__entry->l_state = state;
|
||||
__entry->op = op;
|
||||
),
|
||||
TP_printk("dev %d:%d op %d agno 0x%x agbno 0x%x owner 0x%llx %s fileoff 0x%llx fsbcount 0x%llx state %d",
|
||||
MAJOR(__entry->dev), MINOR(__entry->dev),
|
||||
__entry->op,
|
||||
__entry->agno,
|
||||
__entry->agbno,
|
||||
__entry->ino,
|
||||
__print_symbolic(__entry->whichfork, XFS_WHICHFORK_STRINGS),
|
||||
__entry->l_loff,
|
||||
__entry->l_len,
|
||||
__entry->l_state)
|
||||
);
|
||||
#define DEFINE_MAP_EXTENT_DEFERRED_EVENT(name) \
|
||||
DEFINE_EVENT(xfs_map_extent_deferred_class, name, \
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
|
||||
int op, \
|
||||
xfs_agblock_t agbno, \
|
||||
xfs_ino_t ino, \
|
||||
int whichfork, \
|
||||
xfs_fileoff_t offset, \
|
||||
xfs_filblks_t len, \
|
||||
xfs_exntst_t state), \
|
||||
TP_ARGS(mp, agno, op, agbno, ino, whichfork, offset, len, state))
|
||||
|
||||
DEFINE_DEFER_EVENT(xfs_defer_cancel);
|
||||
DEFINE_DEFER_EVENT(xfs_defer_trans_roll);
|
||||
DEFINE_DEFER_EVENT(xfs_defer_trans_abort);
|
||||
DEFINE_DEFER_EVENT(xfs_defer_finish);
|
||||
DEFINE_DEFER_EVENT(xfs_defer_finish_done);
|
||||
|
||||
DEFINE_DEFER_ERROR_EVENT(xfs_defer_trans_roll_error);
|
||||
DEFINE_DEFER_ERROR_EVENT(xfs_defer_finish_error);
|
||||
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_create_intent);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_cancel_list);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_finish);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_abort);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_relog_intent);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_isolate_paused);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_item_pause);
|
||||
DEFINE_DEFER_PENDING_EVENT(xfs_defer_item_unpause);
|
||||
|
||||
#define DEFINE_BMAP_FREE_DEFERRED_EVENT DEFINE_PHYS_EXTENT_DEFERRED_EVENT
|
||||
DEFINE_BMAP_FREE_DEFERRED_EVENT(xfs_bmap_free_defer);
|
||||
DEFINE_BMAP_FREE_DEFERRED_EVENT(xfs_bmap_free_deferred);
|
||||
DEFINE_BMAP_FREE_DEFERRED_EVENT(xfs_agfl_free_defer);
|
||||
DEFINE_BMAP_FREE_DEFERRED_EVENT(xfs_agfl_free_deferred);
|
||||
DEFINE_FREE_EXTENT_DEFERRED_EVENT(xfs_bmap_free_defer);
|
||||
DEFINE_FREE_EXTENT_DEFERRED_EVENT(xfs_bmap_free_deferred);
|
||||
DEFINE_FREE_EXTENT_DEFERRED_EVENT(xfs_agfl_free_defer);
|
||||
DEFINE_FREE_EXTENT_DEFERRED_EVENT(xfs_agfl_free_deferred);
|
||||
|
||||
DECLARE_EVENT_CLASS(xfs_defer_pending_item_class,
|
||||
TP_PROTO(struct xfs_mount *mp, struct xfs_defer_pending *dfp,
|
||||
@ -2930,7 +2873,60 @@ DEFINE_EVENT(xfs_rmapbt_class, name, \
|
||||
uint64_t owner, uint64_t offset, unsigned int flags), \
|
||||
TP_ARGS(mp, agno, agbno, len, owner, offset, flags))
|
||||
|
||||
#define DEFINE_RMAP_DEFERRED_EVENT DEFINE_MAP_EXTENT_DEFERRED_EVENT
|
||||
DECLARE_EVENT_CLASS(xfs_rmap_deferred_class,
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
|
||||
int op,
|
||||
xfs_agblock_t agbno,
|
||||
xfs_ino_t ino,
|
||||
int whichfork,
|
||||
xfs_fileoff_t offset,
|
||||
xfs_filblks_t len,
|
||||
xfs_exntst_t state),
|
||||
TP_ARGS(mp, agno, op, agbno, ino, whichfork, offset, len, state),
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
__field(xfs_agnumber_t, agno)
|
||||
__field(xfs_ino_t, ino)
|
||||
__field(xfs_agblock_t, agbno)
|
||||
__field(int, whichfork)
|
||||
__field(xfs_fileoff_t, l_loff)
|
||||
__field(xfs_filblks_t, l_len)
|
||||
__field(xfs_exntst_t, l_state)
|
||||
__field(int, op)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->dev = mp->m_super->s_dev;
|
||||
__entry->agno = agno;
|
||||
__entry->ino = ino;
|
||||
__entry->agbno = agbno;
|
||||
__entry->whichfork = whichfork;
|
||||
__entry->l_loff = offset;
|
||||
__entry->l_len = len;
|
||||
__entry->l_state = state;
|
||||
__entry->op = op;
|
||||
),
|
||||
TP_printk("dev %d:%d op %d agno 0x%x agbno 0x%x owner 0x%llx %s fileoff 0x%llx fsbcount 0x%llx state %d",
|
||||
MAJOR(__entry->dev), MINOR(__entry->dev),
|
||||
__entry->op,
|
||||
__entry->agno,
|
||||
__entry->agbno,
|
||||
__entry->ino,
|
||||
__print_symbolic(__entry->whichfork, XFS_WHICHFORK_STRINGS),
|
||||
__entry->l_loff,
|
||||
__entry->l_len,
|
||||
__entry->l_state)
|
||||
);
|
||||
#define DEFINE_RMAP_DEFERRED_EVENT(name) \
|
||||
DEFINE_EVENT(xfs_rmap_deferred_class, name, \
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
|
||||
int op, \
|
||||
xfs_agblock_t agbno, \
|
||||
xfs_ino_t ino, \
|
||||
int whichfork, \
|
||||
xfs_fileoff_t offset, \
|
||||
xfs_filblks_t len, \
|
||||
xfs_exntst_t state), \
|
||||
TP_ARGS(mp, agno, op, agbno, ino, whichfork, offset, len, state))
|
||||
DEFINE_RMAP_DEFERRED_EVENT(xfs_rmap_defer);
|
||||
DEFINE_RMAP_DEFERRED_EVENT(xfs_rmap_deferred);
|
||||
|
||||
@ -2950,7 +2946,60 @@ DEFINE_RMAPBT_EVENT(xfs_rmap_find_right_neighbor_result);
|
||||
DEFINE_RMAPBT_EVENT(xfs_rmap_find_left_neighbor_result);
|
||||
|
||||
/* deferred bmbt updates */
|
||||
#define DEFINE_BMAP_DEFERRED_EVENT DEFINE_RMAP_DEFERRED_EVENT
|
||||
DECLARE_EVENT_CLASS(xfs_bmap_deferred_class,
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
|
||||
int op,
|
||||
xfs_agblock_t agbno,
|
||||
xfs_ino_t ino,
|
||||
int whichfork,
|
||||
xfs_fileoff_t offset,
|
||||
xfs_filblks_t len,
|
||||
xfs_exntst_t state),
|
||||
TP_ARGS(mp, agno, op, agbno, ino, whichfork, offset, len, state),
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
__field(xfs_agnumber_t, agno)
|
||||
__field(xfs_ino_t, ino)
|
||||
__field(xfs_agblock_t, agbno)
|
||||
__field(int, whichfork)
|
||||
__field(xfs_fileoff_t, l_loff)
|
||||
__field(xfs_filblks_t, l_len)
|
||||
__field(xfs_exntst_t, l_state)
|
||||
__field(int, op)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->dev = mp->m_super->s_dev;
|
||||
__entry->agno = agno;
|
||||
__entry->ino = ino;
|
||||
__entry->agbno = agbno;
|
||||
__entry->whichfork = whichfork;
|
||||
__entry->l_loff = offset;
|
||||
__entry->l_len = len;
|
||||
__entry->l_state = state;
|
||||
__entry->op = op;
|
||||
),
|
||||
TP_printk("dev %d:%d op %d agno 0x%x agbno 0x%x owner 0x%llx %s fileoff 0x%llx fsbcount 0x%llx state %d",
|
||||
MAJOR(__entry->dev), MINOR(__entry->dev),
|
||||
__entry->op,
|
||||
__entry->agno,
|
||||
__entry->agbno,
|
||||
__entry->ino,
|
||||
__print_symbolic(__entry->whichfork, XFS_WHICHFORK_STRINGS),
|
||||
__entry->l_loff,
|
||||
__entry->l_len,
|
||||
__entry->l_state)
|
||||
);
|
||||
#define DEFINE_BMAP_DEFERRED_EVENT(name) \
|
||||
DEFINE_EVENT(xfs_bmap_deferred_class, name, \
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
|
||||
int op, \
|
||||
xfs_agblock_t agbno, \
|
||||
xfs_ino_t ino, \
|
||||
int whichfork, \
|
||||
xfs_fileoff_t offset, \
|
||||
xfs_filblks_t len, \
|
||||
xfs_exntst_t state), \
|
||||
TP_ARGS(mp, agno, op, agbno, ino, whichfork, offset, len, state))
|
||||
DEFINE_BMAP_DEFERRED_EVENT(xfs_bmap_defer);
|
||||
DEFINE_BMAP_DEFERRED_EVENT(xfs_bmap_deferred);
|
||||
|
||||
@ -3327,7 +3376,39 @@ DEFINE_AG_ERROR_EVENT(xfs_refcount_find_right_extent_error);
|
||||
DEFINE_AG_EXTENT_EVENT(xfs_refcount_find_shared);
|
||||
DEFINE_AG_EXTENT_EVENT(xfs_refcount_find_shared_result);
|
||||
DEFINE_AG_ERROR_EVENT(xfs_refcount_find_shared_error);
|
||||
#define DEFINE_REFCOUNT_DEFERRED_EVENT DEFINE_PHYS_EXTENT_DEFERRED_EVENT
|
||||
|
||||
DECLARE_EVENT_CLASS(xfs_refcount_deferred_class,
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
|
||||
int type, xfs_agblock_t agbno, xfs_extlen_t len),
|
||||
TP_ARGS(mp, agno, type, agbno, len),
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
__field(xfs_agnumber_t, agno)
|
||||
__field(int, type)
|
||||
__field(xfs_agblock_t, agbno)
|
||||
__field(xfs_extlen_t, len)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->dev = mp->m_super->s_dev;
|
||||
__entry->agno = agno;
|
||||
__entry->type = type;
|
||||
__entry->agbno = agbno;
|
||||
__entry->len = len;
|
||||
),
|
||||
TP_printk("dev %d:%d op %d agno 0x%x agbno 0x%x fsbcount 0x%x",
|
||||
MAJOR(__entry->dev), MINOR(__entry->dev),
|
||||
__entry->type,
|
||||
__entry->agno,
|
||||
__entry->agbno,
|
||||
__entry->len)
|
||||
);
|
||||
#define DEFINE_REFCOUNT_DEFERRED_EVENT(name) \
|
||||
DEFINE_EVENT(xfs_refcount_deferred_class, name, \
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
|
||||
int type, \
|
||||
xfs_agblock_t bno, \
|
||||
xfs_extlen_t len), \
|
||||
TP_ARGS(mp, agno, type, bno, len))
|
||||
DEFINE_REFCOUNT_DEFERRED_EVENT(xfs_refcount_defer);
|
||||
DEFINE_REFCOUNT_DEFERRED_EVENT(xfs_refcount_deferred);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user