mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:02:20 +00:00
xfs: pass objects to the xfs_irec_merge_{pre,post} trace points
Pass the perag structure and the irec to these tracepoints so that the decoding is only done when tracing is actually enabled and the call sites look a lot neater. 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:
parent
835ddb592f
commit
487092ceaa
@ -606,15 +606,12 @@ xfs_inobt_insert_sprec(
|
||||
goto error;
|
||||
}
|
||||
|
||||
trace_xfs_irec_merge_pre(mp, pag->pag_agno, rec.ir_startino,
|
||||
rec.ir_holemask, nrec->ir_startino,
|
||||
nrec->ir_holemask);
|
||||
trace_xfs_irec_merge_pre(pag, &rec, nrec);
|
||||
|
||||
/* merge to nrec to output the updated record */
|
||||
__xfs_inobt_rec_merge(nrec, &rec);
|
||||
|
||||
trace_xfs_irec_merge_post(mp, pag->pag_agno, nrec->ir_startino,
|
||||
nrec->ir_holemask);
|
||||
trace_xfs_irec_merge_post(pag, nrec);
|
||||
|
||||
error = xfs_inobt_rec_check_count(mp, nrec);
|
||||
if (error)
|
||||
|
@ -894,9 +894,10 @@ TRACE_EVENT(xfs_iomap_prealloc_size,
|
||||
)
|
||||
|
||||
TRACE_EVENT(xfs_irec_merge_pre,
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agino_t agino,
|
||||
uint16_t holemask, xfs_agino_t nagino, uint16_t nholemask),
|
||||
TP_ARGS(mp, agno, agino, holemask, nagino, nholemask),
|
||||
TP_PROTO(const struct xfs_perag *pag,
|
||||
const struct xfs_inobt_rec_incore *rec,
|
||||
const struct xfs_inobt_rec_incore *nrec),
|
||||
TP_ARGS(pag, rec, nrec),
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
__field(xfs_agnumber_t, agno)
|
||||
@ -906,12 +907,12 @@ TRACE_EVENT(xfs_irec_merge_pre,
|
||||
__field(uint16_t, nholemask)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->dev = mp->m_super->s_dev;
|
||||
__entry->agno = agno;
|
||||
__entry->agino = agino;
|
||||
__entry->holemask = holemask;
|
||||
__entry->nagino = nagino;
|
||||
__entry->nholemask = holemask;
|
||||
__entry->dev = pag->pag_mount->m_super->s_dev;
|
||||
__entry->agno = pag->pag_agno;
|
||||
__entry->agino = rec->ir_startino;
|
||||
__entry->holemask = rec->ir_holemask;
|
||||
__entry->nagino = nrec->ir_startino;
|
||||
__entry->nholemask = nrec->ir_holemask;
|
||||
),
|
||||
TP_printk("dev %d:%d agno 0x%x agino 0x%x holemask 0x%x new_agino 0x%x new_holemask 0x%x",
|
||||
MAJOR(__entry->dev), MINOR(__entry->dev),
|
||||
@ -923,9 +924,9 @@ TRACE_EVENT(xfs_irec_merge_pre,
|
||||
)
|
||||
|
||||
TRACE_EVENT(xfs_irec_merge_post,
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agino_t agino,
|
||||
uint16_t holemask),
|
||||
TP_ARGS(mp, agno, agino, holemask),
|
||||
TP_PROTO(const struct xfs_perag *pag,
|
||||
const struct xfs_inobt_rec_incore *nrec),
|
||||
TP_ARGS(pag, nrec),
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
__field(xfs_agnumber_t, agno)
|
||||
@ -933,10 +934,10 @@ TRACE_EVENT(xfs_irec_merge_post,
|
||||
__field(uint16_t, holemask)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->dev = mp->m_super->s_dev;
|
||||
__entry->agno = agno;
|
||||
__entry->agino = agino;
|
||||
__entry->holemask = holemask;
|
||||
__entry->dev = pag->pag_mount->m_super->s_dev;
|
||||
__entry->agno = pag->pag_agno;
|
||||
__entry->agino = nrec->ir_startino;
|
||||
__entry->holemask = nrec->ir_holemask;
|
||||
),
|
||||
TP_printk("dev %d:%d agno 0x%x agino 0x%x holemask 0x%x",
|
||||
MAJOR(__entry->dev),
|
||||
|
Loading…
Reference in New Issue
Block a user