diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_trace.h')
| -rw-r--r-- | fs/xfs/linux-2.6/xfs_trace.h | 150 |
1 files changed, 146 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_trace.h b/fs/xfs/linux-2.6/xfs_trace.h index fcaa62f0799e..8a319cfd2901 100644 --- a/fs/xfs/linux-2.6/xfs_trace.h +++ b/fs/xfs/linux-2.6/xfs_trace.h | |||
| @@ -32,6 +32,10 @@ struct xfs_da_node_entry; | |||
| 32 | struct xfs_dquot; | 32 | struct xfs_dquot; |
| 33 | struct xlog_ticket; | 33 | struct xlog_ticket; |
| 34 | struct log; | 34 | struct log; |
| 35 | struct xlog_recover; | ||
| 36 | struct xlog_recover_item; | ||
| 37 | struct xfs_buf_log_format; | ||
| 38 | struct xfs_inode_log_format; | ||
| 35 | 39 | ||
| 36 | DECLARE_EVENT_CLASS(xfs_attr_list_class, | 40 | DECLARE_EVENT_CLASS(xfs_attr_list_class, |
| 37 | TP_PROTO(struct xfs_attr_list_context *ctx), | 41 | TP_PROTO(struct xfs_attr_list_context *ctx), |
| @@ -562,18 +566,21 @@ DECLARE_EVENT_CLASS(xfs_inode_class, | |||
| 562 | __field(dev_t, dev) | 566 | __field(dev_t, dev) |
| 563 | __field(xfs_ino_t, ino) | 567 | __field(xfs_ino_t, ino) |
| 564 | __field(int, count) | 568 | __field(int, count) |
| 569 | __field(int, pincount) | ||
| 565 | __field(unsigned long, caller_ip) | 570 | __field(unsigned long, caller_ip) |
| 566 | ), | 571 | ), |
| 567 | TP_fast_assign( | 572 | TP_fast_assign( |
| 568 | __entry->dev = VFS_I(ip)->i_sb->s_dev; | 573 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 569 | __entry->ino = ip->i_ino; | 574 | __entry->ino = ip->i_ino; |
| 570 | __entry->count = atomic_read(&VFS_I(ip)->i_count); | 575 | __entry->count = atomic_read(&VFS_I(ip)->i_count); |
| 576 | __entry->pincount = atomic_read(&ip->i_pincount); | ||
| 571 | __entry->caller_ip = caller_ip; | 577 | __entry->caller_ip = caller_ip; |
| 572 | ), | 578 | ), |
| 573 | TP_printk("dev %d:%d ino 0x%llx count %d caller %pf", | 579 | TP_printk("dev %d:%d ino 0x%llx count %d pincount %d caller %pf", |
| 574 | MAJOR(__entry->dev), MINOR(__entry->dev), | 580 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 575 | __entry->ino, | 581 | __entry->ino, |
| 576 | __entry->count, | 582 | __entry->count, |
| 583 | __entry->pincount, | ||
| 577 | (char *)__entry->caller_ip) | 584 | (char *)__entry->caller_ip) |
| 578 | ) | 585 | ) |
| 579 | 586 | ||
| @@ -583,6 +590,10 @@ DEFINE_EVENT(xfs_inode_class, name, \ | |||
| 583 | TP_ARGS(ip, caller_ip)) | 590 | TP_ARGS(ip, caller_ip)) |
| 584 | DEFINE_INODE_EVENT(xfs_ihold); | 591 | DEFINE_INODE_EVENT(xfs_ihold); |
| 585 | DEFINE_INODE_EVENT(xfs_irele); | 592 | DEFINE_INODE_EVENT(xfs_irele); |
| 593 | DEFINE_INODE_EVENT(xfs_inode_pin); | ||
| 594 | DEFINE_INODE_EVENT(xfs_inode_unpin); | ||
| 595 | DEFINE_INODE_EVENT(xfs_inode_unpin_nowait); | ||
| 596 | |||
| 586 | /* the old xfs_itrace_entry tracer - to be replaced by s.th. in the VFS */ | 597 | /* the old xfs_itrace_entry tracer - to be replaced by s.th. in the VFS */ |
| 587 | DEFINE_INODE_EVENT(xfs_inode); | 598 | DEFINE_INODE_EVENT(xfs_inode); |
| 588 | #define xfs_itrace_entry(ip) \ | 599 | #define xfs_itrace_entry(ip) \ |
| @@ -642,8 +653,6 @@ DEFINE_EVENT(xfs_dquot_class, name, \ | |||
| 642 | TP_PROTO(struct xfs_dquot *dqp), \ | 653 | TP_PROTO(struct xfs_dquot *dqp), \ |
| 643 | TP_ARGS(dqp)) | 654 | TP_ARGS(dqp)) |
| 644 | DEFINE_DQUOT_EVENT(xfs_dqadjust); | 655 | DEFINE_DQUOT_EVENT(xfs_dqadjust); |
| 645 | DEFINE_DQUOT_EVENT(xfs_dqshake_dirty); | ||
| 646 | DEFINE_DQUOT_EVENT(xfs_dqshake_unlink); | ||
| 647 | DEFINE_DQUOT_EVENT(xfs_dqreclaim_want); | 656 | DEFINE_DQUOT_EVENT(xfs_dqreclaim_want); |
| 648 | DEFINE_DQUOT_EVENT(xfs_dqreclaim_dirty); | 657 | DEFINE_DQUOT_EVENT(xfs_dqreclaim_dirty); |
| 649 | DEFINE_DQUOT_EVENT(xfs_dqreclaim_unlink); | 658 | DEFINE_DQUOT_EVENT(xfs_dqreclaim_unlink); |
| @@ -658,7 +667,6 @@ DEFINE_DQUOT_EVENT(xfs_dqread_fail); | |||
| 658 | DEFINE_DQUOT_EVENT(xfs_dqlookup_found); | 667 | DEFINE_DQUOT_EVENT(xfs_dqlookup_found); |
| 659 | DEFINE_DQUOT_EVENT(xfs_dqlookup_want); | 668 | DEFINE_DQUOT_EVENT(xfs_dqlookup_want); |
| 660 | DEFINE_DQUOT_EVENT(xfs_dqlookup_freelist); | 669 | DEFINE_DQUOT_EVENT(xfs_dqlookup_freelist); |
| 661 | DEFINE_DQUOT_EVENT(xfs_dqlookup_move); | ||
| 662 | DEFINE_DQUOT_EVENT(xfs_dqlookup_done); | 670 | DEFINE_DQUOT_EVENT(xfs_dqlookup_done); |
| 663 | DEFINE_DQUOT_EVENT(xfs_dqget_hit); | 671 | DEFINE_DQUOT_EVENT(xfs_dqget_hit); |
| 664 | DEFINE_DQUOT_EVENT(xfs_dqget_miss); | 672 | DEFINE_DQUOT_EVENT(xfs_dqget_miss); |
| @@ -1495,6 +1503,140 @@ DEFINE_EVENT(xfs_swap_extent_class, name, \ | |||
| 1495 | DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before); | 1503 | DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before); |
| 1496 | DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after); | 1504 | DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after); |
| 1497 | 1505 | ||
| 1506 | DECLARE_EVENT_CLASS(xfs_log_recover_item_class, | ||
| 1507 | TP_PROTO(struct log *log, struct xlog_recover *trans, | ||
| 1508 | struct xlog_recover_item *item, int pass), | ||
| 1509 | TP_ARGS(log, trans, item, pass), | ||
| 1510 | TP_STRUCT__entry( | ||
| 1511 | __field(dev_t, dev) | ||
| 1512 | __field(unsigned long, item) | ||
| 1513 | __field(xlog_tid_t, tid) | ||
| 1514 | __field(int, type) | ||
| 1515 | __field(int, pass) | ||
| 1516 | __field(int, count) | ||
| 1517 | __field(int, total) | ||
| 1518 | ), | ||
| 1519 | TP_fast_assign( | ||
| 1520 | __entry->dev = log->l_mp->m_super->s_dev; | ||
| 1521 | __entry->item = (unsigned long)item; | ||
| 1522 | __entry->tid = trans->r_log_tid; | ||
| 1523 | __entry->type = ITEM_TYPE(item); | ||
| 1524 | __entry->pass = pass; | ||
| 1525 | __entry->count = item->ri_cnt; | ||
| 1526 | __entry->total = item->ri_total; | ||
| 1527 | ), | ||
| 1528 | TP_printk("dev %d:%d trans 0x%x, pass %d, item 0x%p, item type %s " | ||
| 1529 | "item region count/total %d/%d", | ||
| 1530 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1531 | __entry->tid, | ||
| 1532 | __entry->pass, | ||
| 1533 | (void *)__entry->item, | ||
| 1534 | __print_symbolic(__entry->type, XFS_LI_TYPE_DESC), | ||
| 1535 | __entry->count, | ||
| 1536 | __entry->total) | ||
| 1537 | ) | ||
| 1538 | |||
| 1539 | #define DEFINE_LOG_RECOVER_ITEM(name) \ | ||
| 1540 | DEFINE_EVENT(xfs_log_recover_item_class, name, \ | ||
| 1541 | TP_PROTO(struct log *log, struct xlog_recover *trans, \ | ||
| 1542 | struct xlog_recover_item *item, int pass), \ | ||
| 1543 | TP_ARGS(log, trans, item, pass)) | ||
| 1544 | |||
| 1545 | DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add); | ||
| 1546 | DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add_cont); | ||
| 1547 | DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_head); | ||
| 1548 | DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_tail); | ||
| 1549 | DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_recover); | ||
| 1550 | |||
| 1551 | DECLARE_EVENT_CLASS(xfs_log_recover_buf_item_class, | ||
| 1552 | TP_PROTO(struct log *log, struct xfs_buf_log_format *buf_f), | ||
| 1553 | TP_ARGS(log, buf_f), | ||
| 1554 | TP_STRUCT__entry( | ||
| 1555 | __field(dev_t, dev) | ||
| 1556 | __field(__int64_t, blkno) | ||
| 1557 | __field(unsigned short, len) | ||
| 1558 | __field(unsigned short, flags) | ||
| 1559 | __field(unsigned short, size) | ||
| 1560 | __field(unsigned int, map_size) | ||
| 1561 | ), | ||
| 1562 | TP_fast_assign( | ||
| 1563 | __entry->dev = log->l_mp->m_super->s_dev; | ||
| 1564 | __entry->blkno = buf_f->blf_blkno; | ||
| 1565 | __entry->len = buf_f->blf_len; | ||
| 1566 | __entry->flags = buf_f->blf_flags; | ||
| 1567 | __entry->size = buf_f->blf_size; | ||
| 1568 | __entry->map_size = buf_f->blf_map_size; | ||
| 1569 | ), | ||
| 1570 | TP_printk("dev %d:%d blkno 0x%llx, len %u, flags 0x%x, size %d, " | ||
| 1571 | "map_size %d", | ||
| 1572 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1573 | __entry->blkno, | ||
| 1574 | __entry->len, | ||
| 1575 | __entry->flags, | ||
| 1576 | __entry->size, | ||
| 1577 | __entry->map_size) | ||
| 1578 | ) | ||
| 1579 | |||
| 1580 | #define DEFINE_LOG_RECOVER_BUF_ITEM(name) \ | ||
| 1581 | DEFINE_EVENT(xfs_log_recover_buf_item_class, name, \ | ||
| 1582 | TP_PROTO(struct log *log, struct xfs_buf_log_format *buf_f), \ | ||
| 1583 | TP_ARGS(log, buf_f)) | ||
| 1584 | |||
| 1585 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_not_cancel); | ||
| 1586 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel); | ||
| 1587 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_add); | ||
| 1588 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_ref_inc); | ||
| 1589 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_recover); | ||
| 1590 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_inode_buf); | ||
| 1591 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_reg_buf); | ||
| 1592 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_dquot_buf); | ||
| 1593 | |||
| 1594 | DECLARE_EVENT_CLASS(xfs_log_recover_ino_item_class, | ||
| 1595 | TP_PROTO(struct log *log, struct xfs_inode_log_format *in_f), | ||
| 1596 | TP_ARGS(log, in_f), | ||
| 1597 | TP_STRUCT__entry( | ||
| 1598 | __field(dev_t, dev) | ||
| 1599 | __field(xfs_ino_t, ino) | ||
| 1600 | __field(unsigned short, size) | ||
| 1601 | __field(int, fields) | ||
| 1602 | __field(unsigned short, asize) | ||
| 1603 | __field(unsigned short, dsize) | ||
| 1604 | __field(__int64_t, blkno) | ||
| 1605 | __field(int, len) | ||
| 1606 | __field(int, boffset) | ||
| 1607 | ), | ||
| 1608 | TP_fast_assign( | ||
| 1609 | __entry->dev = log->l_mp->m_super->s_dev; | ||
| 1610 | __entry->ino = in_f->ilf_ino; | ||
| 1611 | __entry->size = in_f->ilf_size; | ||
| 1612 | __entry->fields = in_f->ilf_fields; | ||
| 1613 | __entry->asize = in_f->ilf_asize; | ||
| 1614 | __entry->dsize = in_f->ilf_dsize; | ||
| 1615 | __entry->blkno = in_f->ilf_blkno; | ||
| 1616 | __entry->len = in_f->ilf_len; | ||
| 1617 | __entry->boffset = in_f->ilf_boffset; | ||
| 1618 | ), | ||
| 1619 | TP_printk("dev %d:%d ino 0x%llx, size %u, fields 0x%x, asize %d, " | ||
| 1620 | "dsize %d, blkno 0x%llx, len %d, boffset %d", | ||
| 1621 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 1622 | __entry->ino, | ||
| 1623 | __entry->size, | ||
| 1624 | __entry->fields, | ||
| 1625 | __entry->asize, | ||
| 1626 | __entry->dsize, | ||
| 1627 | __entry->blkno, | ||
| 1628 | __entry->len, | ||
| 1629 | __entry->boffset) | ||
| 1630 | ) | ||
| 1631 | #define DEFINE_LOG_RECOVER_INO_ITEM(name) \ | ||
| 1632 | DEFINE_EVENT(xfs_log_recover_ino_item_class, name, \ | ||
| 1633 | TP_PROTO(struct log *log, struct xfs_inode_log_format *in_f), \ | ||
| 1634 | TP_ARGS(log, in_f)) | ||
| 1635 | |||
| 1636 | DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_recover); | ||
| 1637 | DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_cancel); | ||
| 1638 | DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_skip); | ||
| 1639 | |||
| 1498 | #endif /* _TRACE_XFS_H */ | 1640 | #endif /* _TRACE_XFS_H */ |
| 1499 | 1641 | ||
| 1500 | #undef TRACE_INCLUDE_PATH | 1642 | #undef TRACE_INCLUDE_PATH |
