mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 00:29:36 -04:00
xfs: pass objects to the xrep_ibt_walk_rmap tracepoint
Pass the perag structure and the irec so that the decoding is only done when tracing is actually enabled and the call sites look a lot neater, and remove the pointless class indirection. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
committed by
Darrick J. Wong
parent
1209d360eb
commit
618a27a94d
@@ -421,9 +421,7 @@ xrep_ibt_record_inode_blocks(
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
trace_xrep_ibt_walk_rmap(mp, ri->sc->sa.pag->pag_agno,
|
||||
rec->rm_startblock, rec->rm_blockcount, rec->rm_owner,
|
||||
rec->rm_offset, rec->rm_flags);
|
||||
trace_xrep_ibt_walk_rmap(ri->sc->sa.pag, rec);
|
||||
|
||||
/*
|
||||
* Record the free/hole masks for each inode cluster that could be
|
||||
|
||||
@@ -1984,11 +1984,9 @@ DEFINE_EVENT(xrep_reap_find_class, name, \
|
||||
DEFINE_REPAIR_REAP_FIND_EVENT(xreap_agextent_select);
|
||||
DEFINE_REPAIR_REAP_FIND_EVENT(xreap_bmapi_select);
|
||||
|
||||
DECLARE_EVENT_CLASS(xrep_rmap_class,
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
|
||||
xfs_agblock_t agbno, xfs_extlen_t len,
|
||||
uint64_t owner, uint64_t offset, unsigned int flags),
|
||||
TP_ARGS(mp, agno, agbno, len, owner, offset, flags),
|
||||
TRACE_EVENT(xrep_ibt_walk_rmap,
|
||||
TP_PROTO(const struct xfs_perag *pag, const struct xfs_rmap_irec *rec),
|
||||
TP_ARGS(pag, rec),
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
__field(xfs_agnumber_t, agno)
|
||||
@@ -1999,13 +1997,13 @@ DECLARE_EVENT_CLASS(xrep_rmap_class,
|
||||
__field(unsigned int, flags)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->dev = mp->m_super->s_dev;
|
||||
__entry->agno = agno;
|
||||
__entry->agbno = agbno;
|
||||
__entry->len = len;
|
||||
__entry->owner = owner;
|
||||
__entry->offset = offset;
|
||||
__entry->flags = flags;
|
||||
__entry->dev = pag->pag_mount->m_super->s_dev;
|
||||
__entry->agno = pag->pag_agno;
|
||||
__entry->agbno = rec->rm_startblock;
|
||||
__entry->len = rec->rm_blockcount;
|
||||
__entry->owner = rec->rm_owner;
|
||||
__entry->offset = rec->rm_offset;
|
||||
__entry->flags = rec->rm_flags;
|
||||
),
|
||||
TP_printk("dev %d:%d agno 0x%x agbno 0x%x fsbcount 0x%x owner 0x%llx fileoff 0x%llx flags 0x%x",
|
||||
MAJOR(__entry->dev), MINOR(__entry->dev),
|
||||
@@ -2016,13 +2014,6 @@ DECLARE_EVENT_CLASS(xrep_rmap_class,
|
||||
__entry->offset,
|
||||
__entry->flags)
|
||||
);
|
||||
#define DEFINE_REPAIR_RMAP_EVENT(name) \
|
||||
DEFINE_EVENT(xrep_rmap_class, name, \
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
|
||||
xfs_agblock_t agbno, xfs_extlen_t len, \
|
||||
uint64_t owner, uint64_t offset, unsigned int flags), \
|
||||
TP_ARGS(mp, agno, agbno, len, owner, offset, flags))
|
||||
DEFINE_REPAIR_RMAP_EVENT(xrep_ibt_walk_rmap);
|
||||
|
||||
TRACE_EVENT(xrep_abt_found,
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
|
||||
|
||||
Reference in New Issue
Block a user