Skip to content

Commit c46eef3

Browse files
author
Darrick J. Wong
committed
xfs: capture buffer ops in the xfs_buf tracepoints
Record the buffer ops in the xfs_buf tracepoints so that we can monitor the alleged type of the buffer. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Dave Chinner <[email protected]>
1 parent a44a027 commit c46eef3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fs/xfs/xfs_trace.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ DECLARE_EVENT_CLASS(xfs_buf_class,
418418
__field(unsigned, lockval)
419419
__field(unsigned, flags)
420420
__field(unsigned long, caller_ip)
421+
__field(const void *, buf_ops)
421422
),
422423
TP_fast_assign(
423424
__entry->dev = bp->b_target->bt_dev;
@@ -428,16 +429,18 @@ DECLARE_EVENT_CLASS(xfs_buf_class,
428429
__entry->lockval = bp->b_sema.count;
429430
__entry->flags = bp->b_flags;
430431
__entry->caller_ip = caller_ip;
432+
__entry->buf_ops = bp->b_ops;
431433
),
432434
TP_printk("dev %d:%d daddr 0x%llx bbcount 0x%x hold %d pincount %d "
433-
"lock %d flags %s caller %pS",
435+
"lock %d flags %s bufops %pS caller %pS",
434436
MAJOR(__entry->dev), MINOR(__entry->dev),
435437
(unsigned long long)__entry->bno,
436438
__entry->nblks,
437439
__entry->hold,
438440
__entry->pincount,
439441
__entry->lockval,
440442
__print_flags(__entry->flags, "|", XFS_BUF_FLAGS),
443+
__entry->buf_ops,
441444
(void *)__entry->caller_ip)
442445
)
443446

0 commit comments

Comments
 (0)