diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2016-08-02 21:43:24 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-08-02 21:43:24 -0400 |
commit | aa966d84aa487c4cb7f6fade1a35ca961652a395 (patch) | |
tree | 06853dc36de333c3ae9fd45a98d1f387b4026aff | |
parent | c543838a1e00a5f8791e59ae570b1030d70906f2 (diff) |
xfs: add tracepoints for the rmap functions
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r-- | fs/xfs/xfs_trace.h | 51 |
1 files changed, 49 insertions, 2 deletions
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index e69912acb23f..7498c7780d99 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h | |||
@@ -2417,8 +2417,6 @@ DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_cancel); | |||
2417 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_finish); | 2417 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_finish); |
2418 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_abort); | 2418 | DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_abort); |
2419 | 2419 | ||
2420 | DEFINE_MAP_EXTENT_DEFERRED_EVENT(xfs_defer_map_extent); | ||
2421 | |||
2422 | #define DEFINE_BMAP_FREE_DEFERRED_EVENT DEFINE_PHYS_EXTENT_DEFERRED_EVENT | 2420 | #define DEFINE_BMAP_FREE_DEFERRED_EVENT DEFINE_PHYS_EXTENT_DEFERRED_EVENT |
2423 | DEFINE_BMAP_FREE_DEFERRED_EVENT(xfs_bmap_free_defer); | 2421 | DEFINE_BMAP_FREE_DEFERRED_EVENT(xfs_bmap_free_defer); |
2424 | DEFINE_BMAP_FREE_DEFERRED_EVENT(xfs_bmap_free_deferred); | 2422 | DEFINE_BMAP_FREE_DEFERRED_EVENT(xfs_bmap_free_deferred); |
@@ -2502,8 +2500,57 @@ DEFINE_RMAP_EVENT(xfs_rmap_map); | |||
2502 | DEFINE_RMAP_EVENT(xfs_rmap_map_done); | 2500 | DEFINE_RMAP_EVENT(xfs_rmap_map_done); |
2503 | DEFINE_AG_ERROR_EVENT(xfs_rmap_map_error); | 2501 | DEFINE_AG_ERROR_EVENT(xfs_rmap_map_error); |
2504 | 2502 | ||
2503 | DECLARE_EVENT_CLASS(xfs_rmapbt_class, | ||
2504 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, | ||
2505 | xfs_agblock_t agbno, xfs_extlen_t len, | ||
2506 | uint64_t owner, uint64_t offset, unsigned int flags), | ||
2507 | TP_ARGS(mp, agno, agbno, len, owner, offset, flags), | ||
2508 | TP_STRUCT__entry( | ||
2509 | __field(dev_t, dev) | ||
2510 | __field(xfs_agnumber_t, agno) | ||
2511 | __field(xfs_agblock_t, agbno) | ||
2512 | __field(xfs_extlen_t, len) | ||
2513 | __field(uint64_t, owner) | ||
2514 | __field(uint64_t, offset) | ||
2515 | __field(unsigned int, flags) | ||
2516 | ), | ||
2517 | TP_fast_assign( | ||
2518 | __entry->dev = mp->m_super->s_dev; | ||
2519 | __entry->agno = agno; | ||
2520 | __entry->agbno = agbno; | ||
2521 | __entry->len = len; | ||
2522 | __entry->owner = owner; | ||
2523 | __entry->offset = offset; | ||
2524 | __entry->flags = flags; | ||
2525 | ), | ||
2526 | TP_printk("dev %d:%d agno %u agbno %u len %u owner %lld offset %llu flags 0x%x", | ||
2527 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
2528 | __entry->agno, | ||
2529 | __entry->agbno, | ||
2530 | __entry->len, | ||
2531 | __entry->owner, | ||
2532 | __entry->offset, | ||
2533 | __entry->flags) | ||
2534 | ); | ||
2535 | #define DEFINE_RMAPBT_EVENT(name) \ | ||
2536 | DEFINE_EVENT(xfs_rmapbt_class, name, \ | ||
2537 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \ | ||
2538 | xfs_agblock_t agbno, xfs_extlen_t len, \ | ||
2539 | uint64_t owner, uint64_t offset, unsigned int flags), \ | ||
2540 | TP_ARGS(mp, agno, agbno, len, owner, offset, flags)) | ||
2541 | |||
2542 | #define DEFINE_RMAP_DEFERRED_EVENT DEFINE_MAP_EXTENT_DEFERRED_EVENT | ||
2543 | DEFINE_RMAP_DEFERRED_EVENT(xfs_rmap_defer); | ||
2544 | DEFINE_RMAP_DEFERRED_EVENT(xfs_rmap_deferred); | ||
2545 | |||
2505 | DEFINE_BUSY_EVENT(xfs_rmapbt_alloc_block); | 2546 | DEFINE_BUSY_EVENT(xfs_rmapbt_alloc_block); |
2506 | DEFINE_BUSY_EVENT(xfs_rmapbt_free_block); | 2547 | DEFINE_BUSY_EVENT(xfs_rmapbt_free_block); |
2548 | DEFINE_RMAPBT_EVENT(xfs_rmap_update); | ||
2549 | DEFINE_RMAPBT_EVENT(xfs_rmap_insert); | ||
2550 | DEFINE_RMAPBT_EVENT(xfs_rmap_delete); | ||
2551 | DEFINE_AG_ERROR_EVENT(xfs_rmap_insert_error); | ||
2552 | DEFINE_AG_ERROR_EVENT(xfs_rmap_delete_error); | ||
2553 | DEFINE_AG_ERROR_EVENT(xfs_rmap_update_error); | ||
2507 | 2554 | ||
2508 | #endif /* _TRACE_XFS_H */ | 2555 | #endif /* _TRACE_XFS_H */ |
2509 | 2556 | ||