diff options
author | Dave Chinner <dchinner@redhat.com> | 2012-11-12 06:53:53 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-11-13 15:47:00 -0500 |
commit | ee73259b401317117e7f5d4834c270b10b12bc8e (patch) | |
tree | f5b78a4c80cb62435965fbcbc7289fd533b83dc9 /fs/xfs/xfs_trace.h | |
parent | 37eb17e604ac7398bbb133c82f281475d704fff7 (diff) |
xfs: add more attribute tree trace points.
Added when debugging recent attribute tree problems to more finely
trace code execution through the maze of twisty passages that makes
up the attr code.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trace.h')
-rw-r--r-- | fs/xfs/xfs_trace.h | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index cb5234632072..2e137d4a85ae 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h | |||
@@ -96,6 +96,8 @@ DEFINE_ATTR_LIST_EVENT(xfs_attr_list_full); | |||
96 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_add); | 96 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_add); |
97 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_wrong_blk); | 97 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_wrong_blk); |
98 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_notfound); | 98 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_notfound); |
99 | DEFINE_ATTR_LIST_EVENT(xfs_attr_leaf_list); | ||
100 | DEFINE_ATTR_LIST_EVENT(xfs_attr_node_list); | ||
99 | 101 | ||
100 | DECLARE_EVENT_CLASS(xfs_perag_class, | 102 | DECLARE_EVENT_CLASS(xfs_perag_class, |
101 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, | 103 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, |
@@ -1502,8 +1504,42 @@ DEFINE_DIR2_EVENT(xfs_dir2_node_replace); | |||
1502 | DEFINE_DIR2_EVENT(xfs_dir2_node_removename); | 1504 | DEFINE_DIR2_EVENT(xfs_dir2_node_removename); |
1503 | DEFINE_DIR2_EVENT(xfs_dir2_node_to_leaf); | 1505 | DEFINE_DIR2_EVENT(xfs_dir2_node_to_leaf); |
1504 | 1506 | ||
1507 | DECLARE_EVENT_CLASS(xfs_attr_class, | ||
1508 | TP_PROTO(struct xfs_da_args *args), | ||
1509 | TP_ARGS(args), | ||
1510 | TP_STRUCT__entry( | ||
1511 | __field(dev_t, dev) | ||
1512 | __field(xfs_ino_t, ino) | ||
1513 | __dynamic_array(char, name, args->namelen) | ||
1514 | __field(int, namelen) | ||
1515 | __field(int, valuelen) | ||
1516 | __field(xfs_dahash_t, hashval) | ||
1517 | __field(int, op_flags) | ||
1518 | ), | ||
1519 | TP_fast_assign( | ||
1520 | __entry->dev = VFS_I(args->dp)->i_sb->s_dev; | ||
1521 | __entry->ino = args->dp->i_ino; | ||
1522 | if (args->namelen) | ||
1523 | memcpy(__get_str(name), args->name, args->namelen); | ||
1524 | __entry->namelen = args->namelen; | ||
1525 | __entry->valuelen = args->valuelen; | ||
1526 | __entry->hashval = args->hashval; | ||
1527 | __entry->op_flags = args->op_flags; | ||
1528 | ), | ||
1529 | TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d valuelen %d " | ||
1530 | "hashval 0x%x op_flags %s", | ||
1531 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1532 | __entry->ino, | ||
1533 | __entry->namelen, | ||
1534 | __entry->namelen ? __get_str(name) : NULL, | ||
1535 | __entry->namelen, | ||
1536 | __entry->valuelen, | ||
1537 | __entry->hashval, | ||
1538 | __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS)) | ||
1539 | ) | ||
1540 | |||
1505 | #define DEFINE_ATTR_EVENT(name) \ | 1541 | #define DEFINE_ATTR_EVENT(name) \ |
1506 | DEFINE_EVENT(xfs_da_class, name, \ | 1542 | DEFINE_EVENT(xfs_attr_class, name, \ |
1507 | TP_PROTO(struct xfs_da_args *args), \ | 1543 | TP_PROTO(struct xfs_da_args *args), \ |
1508 | TP_ARGS(args)) | 1544 | TP_ARGS(args)) |
1509 | DEFINE_ATTR_EVENT(xfs_attr_sf_add); | 1545 | DEFINE_ATTR_EVENT(xfs_attr_sf_add); |
@@ -1517,10 +1553,14 @@ DEFINE_ATTR_EVENT(xfs_attr_sf_to_leaf); | |||
1517 | DEFINE_ATTR_EVENT(xfs_attr_leaf_add); | 1553 | DEFINE_ATTR_EVENT(xfs_attr_leaf_add); |
1518 | DEFINE_ATTR_EVENT(xfs_attr_leaf_add_old); | 1554 | DEFINE_ATTR_EVENT(xfs_attr_leaf_add_old); |
1519 | DEFINE_ATTR_EVENT(xfs_attr_leaf_add_new); | 1555 | DEFINE_ATTR_EVENT(xfs_attr_leaf_add_new); |
1556 | DEFINE_ATTR_EVENT(xfs_attr_leaf_add_work); | ||
1520 | DEFINE_ATTR_EVENT(xfs_attr_leaf_addname); | 1557 | DEFINE_ATTR_EVENT(xfs_attr_leaf_addname); |
1521 | DEFINE_ATTR_EVENT(xfs_attr_leaf_create); | 1558 | DEFINE_ATTR_EVENT(xfs_attr_leaf_create); |
1559 | DEFINE_ATTR_EVENT(xfs_attr_leaf_compact); | ||
1560 | DEFINE_ATTR_EVENT(xfs_attr_leaf_get); | ||
1522 | DEFINE_ATTR_EVENT(xfs_attr_leaf_lookup); | 1561 | DEFINE_ATTR_EVENT(xfs_attr_leaf_lookup); |
1523 | DEFINE_ATTR_EVENT(xfs_attr_leaf_replace); | 1562 | DEFINE_ATTR_EVENT(xfs_attr_leaf_replace); |
1563 | DEFINE_ATTR_EVENT(xfs_attr_leaf_remove); | ||
1524 | DEFINE_ATTR_EVENT(xfs_attr_leaf_removename); | 1564 | DEFINE_ATTR_EVENT(xfs_attr_leaf_removename); |
1525 | DEFINE_ATTR_EVENT(xfs_attr_leaf_split); | 1565 | DEFINE_ATTR_EVENT(xfs_attr_leaf_split); |
1526 | DEFINE_ATTR_EVENT(xfs_attr_leaf_split_before); | 1566 | DEFINE_ATTR_EVENT(xfs_attr_leaf_split_before); |
@@ -1532,12 +1572,21 @@ DEFINE_ATTR_EVENT(xfs_attr_leaf_to_sf); | |||
1532 | DEFINE_ATTR_EVENT(xfs_attr_leaf_to_node); | 1572 | DEFINE_ATTR_EVENT(xfs_attr_leaf_to_node); |
1533 | DEFINE_ATTR_EVENT(xfs_attr_leaf_rebalance); | 1573 | DEFINE_ATTR_EVENT(xfs_attr_leaf_rebalance); |
1534 | DEFINE_ATTR_EVENT(xfs_attr_leaf_unbalance); | 1574 | DEFINE_ATTR_EVENT(xfs_attr_leaf_unbalance); |
1575 | DEFINE_ATTR_EVENT(xfs_attr_leaf_toosmall); | ||
1535 | 1576 | ||
1536 | DEFINE_ATTR_EVENT(xfs_attr_node_addname); | 1577 | DEFINE_ATTR_EVENT(xfs_attr_node_addname); |
1578 | DEFINE_ATTR_EVENT(xfs_attr_node_get); | ||
1537 | DEFINE_ATTR_EVENT(xfs_attr_node_lookup); | 1579 | DEFINE_ATTR_EVENT(xfs_attr_node_lookup); |
1538 | DEFINE_ATTR_EVENT(xfs_attr_node_replace); | 1580 | DEFINE_ATTR_EVENT(xfs_attr_node_replace); |
1539 | DEFINE_ATTR_EVENT(xfs_attr_node_removename); | 1581 | DEFINE_ATTR_EVENT(xfs_attr_node_removename); |
1540 | 1582 | ||
1583 | DEFINE_ATTR_EVENT(xfs_attr_fillstate); | ||
1584 | DEFINE_ATTR_EVENT(xfs_attr_refillstate); | ||
1585 | |||
1586 | DEFINE_ATTR_EVENT(xfs_attr_rmtval_get); | ||
1587 | DEFINE_ATTR_EVENT(xfs_attr_rmtval_set); | ||
1588 | DEFINE_ATTR_EVENT(xfs_attr_rmtval_remove); | ||
1589 | |||
1541 | #define DEFINE_DA_EVENT(name) \ | 1590 | #define DEFINE_DA_EVENT(name) \ |
1542 | DEFINE_EVENT(xfs_da_class, name, \ | 1591 | DEFINE_EVENT(xfs_da_class, name, \ |
1543 | TP_PROTO(struct xfs_da_args *args), \ | 1592 | TP_PROTO(struct xfs_da_args *args), \ |
@@ -1556,9 +1605,12 @@ DEFINE_DA_EVENT(xfs_da_node_split); | |||
1556 | DEFINE_DA_EVENT(xfs_da_node_remove); | 1605 | DEFINE_DA_EVENT(xfs_da_node_remove); |
1557 | DEFINE_DA_EVENT(xfs_da_node_rebalance); | 1606 | DEFINE_DA_EVENT(xfs_da_node_rebalance); |
1558 | DEFINE_DA_EVENT(xfs_da_node_unbalance); | 1607 | DEFINE_DA_EVENT(xfs_da_node_unbalance); |
1608 | DEFINE_DA_EVENT(xfs_da_node_toosmall); | ||
1559 | DEFINE_DA_EVENT(xfs_da_swap_lastblock); | 1609 | DEFINE_DA_EVENT(xfs_da_swap_lastblock); |
1560 | DEFINE_DA_EVENT(xfs_da_grow_inode); | 1610 | DEFINE_DA_EVENT(xfs_da_grow_inode); |
1561 | DEFINE_DA_EVENT(xfs_da_shrink_inode); | 1611 | DEFINE_DA_EVENT(xfs_da_shrink_inode); |
1612 | DEFINE_DA_EVENT(xfs_da_fixhashpath); | ||
1613 | DEFINE_DA_EVENT(xfs_da_path_shift); | ||
1562 | 1614 | ||
1563 | DECLARE_EVENT_CLASS(xfs_dir2_space_class, | 1615 | DECLARE_EVENT_CLASS(xfs_dir2_space_class, |
1564 | TP_PROTO(struct xfs_da_args *args, int idx), | 1616 | TP_PROTO(struct xfs_da_args *args, int idx), |