diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_trace.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_trace.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_trace.h b/fs/xfs/linux-2.6/xfs_trace.h index c22a608321a3..a4574dcf5065 100644 --- a/fs/xfs/linux-2.6/xfs_trace.h +++ b/fs/xfs/linux-2.6/xfs_trace.h | |||
@@ -78,6 +78,33 @@ DECLARE_EVENT_CLASS(xfs_attr_list_class, | |||
78 | ) | 78 | ) |
79 | ) | 79 | ) |
80 | 80 | ||
81 | #define DEFINE_PERAG_REF_EVENT(name) \ | ||
82 | TRACE_EVENT(name, \ | ||
83 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, \ | ||
84 | unsigned long caller_ip), \ | ||
85 | TP_ARGS(mp, agno, refcount, caller_ip), \ | ||
86 | TP_STRUCT__entry( \ | ||
87 | __field(dev_t, dev) \ | ||
88 | __field(xfs_agnumber_t, agno) \ | ||
89 | __field(int, refcount) \ | ||
90 | __field(unsigned long, caller_ip) \ | ||
91 | ), \ | ||
92 | TP_fast_assign( \ | ||
93 | __entry->dev = mp->m_super->s_dev; \ | ||
94 | __entry->agno = agno; \ | ||
95 | __entry->refcount = refcount; \ | ||
96 | __entry->caller_ip = caller_ip; \ | ||
97 | ), \ | ||
98 | TP_printk("dev %d:%d agno %u refcount %d caller %pf", \ | ||
99 | MAJOR(__entry->dev), MINOR(__entry->dev), \ | ||
100 | __entry->agno, \ | ||
101 | __entry->refcount, \ | ||
102 | (char *)__entry->caller_ip) \ | ||
103 | ); | ||
104 | |||
105 | DEFINE_PERAG_REF_EVENT(xfs_perag_get) | ||
106 | DEFINE_PERAG_REF_EVENT(xfs_perag_put) | ||
107 | |||
81 | #define DEFINE_ATTR_LIST_EVENT(name) \ | 108 | #define DEFINE_ATTR_LIST_EVENT(name) \ |
82 | DEFINE_EVENT(xfs_attr_list_class, name, \ | 109 | DEFINE_EVENT(xfs_attr_list_class, name, \ |
83 | TP_PROTO(struct xfs_attr_list_context *ctx), \ | 110 | TP_PROTO(struct xfs_attr_list_context *ctx), \ |
@@ -456,6 +483,7 @@ DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock); | |||
456 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock_stale); | 483 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock_stale); |
457 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_committed); | 484 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_committed); |
458 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_push); | 485 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_push); |
486 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pushbuf); | ||
459 | DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf); | 487 | DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf); |
460 | DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf_recur); | 488 | DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf_recur); |
461 | DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb); | 489 | DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb); |
@@ -1414,6 +1442,59 @@ TRACE_EVENT(xfs_dir2_leafn_moveents, | |||
1414 | __entry->count) | 1442 | __entry->count) |
1415 | ); | 1443 | ); |
1416 | 1444 | ||
1445 | #define XFS_SWAPEXT_INODES \ | ||
1446 | { 0, "target" }, \ | ||
1447 | { 1, "temp" } | ||
1448 | |||
1449 | #define XFS_INODE_FORMAT_STR \ | ||
1450 | { 0, "invalid" }, \ | ||
1451 | { 1, "local" }, \ | ||
1452 | { 2, "extent" }, \ | ||
1453 | { 3, "btree" } | ||
1454 | |||
1455 | DECLARE_EVENT_CLASS(xfs_swap_extent_class, | ||
1456 | TP_PROTO(struct xfs_inode *ip, int which), | ||
1457 | TP_ARGS(ip, which), | ||
1458 | TP_STRUCT__entry( | ||
1459 | __field(dev_t, dev) | ||
1460 | __field(int, which) | ||
1461 | __field(xfs_ino_t, ino) | ||
1462 | __field(int, format) | ||
1463 | __field(int, nex) | ||
1464 | __field(int, max_nex) | ||
1465 | __field(int, broot_size) | ||
1466 | __field(int, fork_off) | ||
1467 | ), | ||
1468 | TP_fast_assign( | ||
1469 | __entry->dev = VFS_I(ip)->i_sb->s_dev; | ||
1470 | __entry->which = which; | ||
1471 | __entry->ino = ip->i_ino; | ||
1472 | __entry->format = ip->i_d.di_format; | ||
1473 | __entry->nex = ip->i_d.di_nextents; | ||
1474 | __entry->max_nex = ip->i_df.if_ext_max; | ||
1475 | __entry->broot_size = ip->i_df.if_broot_bytes; | ||
1476 | __entry->fork_off = XFS_IFORK_BOFF(ip); | ||
1477 | ), | ||
1478 | TP_printk("dev %d:%d ino 0x%llx (%s), %s format, num_extents %d, " | ||
1479 | "Max in-fork extents %d, broot size %d, fork offset %d", | ||
1480 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1481 | __entry->ino, | ||
1482 | __print_symbolic(__entry->which, XFS_SWAPEXT_INODES), | ||
1483 | __print_symbolic(__entry->format, XFS_INODE_FORMAT_STR), | ||
1484 | __entry->nex, | ||
1485 | __entry->max_nex, | ||
1486 | __entry->broot_size, | ||
1487 | __entry->fork_off) | ||
1488 | ) | ||
1489 | |||
1490 | #define DEFINE_SWAPEXT_EVENT(name) \ | ||
1491 | DEFINE_EVENT(xfs_swap_extent_class, name, \ | ||
1492 | TP_PROTO(struct xfs_inode *ip, int which), \ | ||
1493 | TP_ARGS(ip, which)) | ||
1494 | |||
1495 | DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before); | ||
1496 | DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after); | ||
1497 | |||
1417 | #endif /* _TRACE_XFS_H */ | 1498 | #endif /* _TRACE_XFS_H */ |
1418 | 1499 | ||
1419 | #undef TRACE_INCLUDE_PATH | 1500 | #undef TRACE_INCLUDE_PATH |