diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/ext4.h | 398 |
1 files changed, 391 insertions, 7 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index b50a54736242..c9a341e385a3 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -12,6 +12,8 @@ struct ext4_allocation_request; | |||
12 | struct ext4_prealloc_space; | 12 | struct ext4_prealloc_space; |
13 | struct ext4_inode_info; | 13 | struct ext4_inode_info; |
14 | struct mpage_da_data; | 14 | struct mpage_da_data; |
15 | struct ext4_map_blocks; | ||
16 | struct ext4_extent; | ||
15 | 17 | ||
16 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) | 18 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) |
17 | 19 | ||
@@ -1032,9 +1034,9 @@ TRACE_EVENT(ext4_forget, | |||
1032 | ); | 1034 | ); |
1033 | 1035 | ||
1034 | TRACE_EVENT(ext4_da_update_reserve_space, | 1036 | TRACE_EVENT(ext4_da_update_reserve_space, |
1035 | TP_PROTO(struct inode *inode, int used_blocks), | 1037 | TP_PROTO(struct inode *inode, int used_blocks, int quota_claim), |
1036 | 1038 | ||
1037 | TP_ARGS(inode, used_blocks), | 1039 | TP_ARGS(inode, used_blocks, quota_claim), |
1038 | 1040 | ||
1039 | TP_STRUCT__entry( | 1041 | TP_STRUCT__entry( |
1040 | __field( dev_t, dev ) | 1042 | __field( dev_t, dev ) |
@@ -1045,6 +1047,7 @@ TRACE_EVENT(ext4_da_update_reserve_space, | |||
1045 | __field( int, reserved_data_blocks ) | 1047 | __field( int, reserved_data_blocks ) |
1046 | __field( int, reserved_meta_blocks ) | 1048 | __field( int, reserved_meta_blocks ) |
1047 | __field( int, allocated_meta_blocks ) | 1049 | __field( int, allocated_meta_blocks ) |
1050 | __field( int, quota_claim ) | ||
1048 | ), | 1051 | ), |
1049 | 1052 | ||
1050 | TP_fast_assign( | 1053 | TP_fast_assign( |
@@ -1053,19 +1056,24 @@ TRACE_EVENT(ext4_da_update_reserve_space, | |||
1053 | __entry->mode = inode->i_mode; | 1056 | __entry->mode = inode->i_mode; |
1054 | __entry->i_blocks = inode->i_blocks; | 1057 | __entry->i_blocks = inode->i_blocks; |
1055 | __entry->used_blocks = used_blocks; | 1058 | __entry->used_blocks = used_blocks; |
1056 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; | 1059 | __entry->reserved_data_blocks = |
1057 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | 1060 | EXT4_I(inode)->i_reserved_data_blocks; |
1058 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; | 1061 | __entry->reserved_meta_blocks = |
1062 | EXT4_I(inode)->i_reserved_meta_blocks; | ||
1063 | __entry->allocated_meta_blocks = | ||
1064 | EXT4_I(inode)->i_allocated_meta_blocks; | ||
1065 | __entry->quota_claim = quota_claim; | ||
1059 | ), | 1066 | ), |
1060 | 1067 | ||
1061 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " | 1068 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " |
1062 | "reserved_data_blocks %d reserved_meta_blocks %d " | 1069 | "reserved_data_blocks %d reserved_meta_blocks %d " |
1063 | "allocated_meta_blocks %d", | 1070 | "allocated_meta_blocks %d quota_claim %d", |
1064 | MAJOR(__entry->dev), MINOR(__entry->dev), | 1071 | MAJOR(__entry->dev), MINOR(__entry->dev), |
1065 | (unsigned long) __entry->ino, | 1072 | (unsigned long) __entry->ino, |
1066 | __entry->mode, __entry->i_blocks, | 1073 | __entry->mode, __entry->i_blocks, |
1067 | __entry->used_blocks, __entry->reserved_data_blocks, | 1074 | __entry->used_blocks, __entry->reserved_data_blocks, |
1068 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) | 1075 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks, |
1076 | __entry->quota_claim) | ||
1069 | ); | 1077 | ); |
1070 | 1078 | ||
1071 | TRACE_EVENT(ext4_da_reserve_space, | 1079 | TRACE_EVENT(ext4_da_reserve_space, |
@@ -1589,6 +1597,382 @@ DEFINE_EVENT(ext4__trim, ext4_trim_all_free, | |||
1589 | TP_ARGS(sb, group, start, len) | 1597 | TP_ARGS(sb, group, start, len) |
1590 | ); | 1598 | ); |
1591 | 1599 | ||
1600 | TRACE_EVENT(ext4_ext_handle_uninitialized_extents, | ||
1601 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, | ||
1602 | unsigned int allocated, ext4_fsblk_t newblock), | ||
1603 | |||
1604 | TP_ARGS(inode, map, allocated, newblock), | ||
1605 | |||
1606 | TP_STRUCT__entry( | ||
1607 | __field( ino_t, ino ) | ||
1608 | __field( dev_t, dev ) | ||
1609 | __field( ext4_lblk_t, lblk ) | ||
1610 | __field( ext4_fsblk_t, pblk ) | ||
1611 | __field( unsigned int, len ) | ||
1612 | __field( int, flags ) | ||
1613 | __field( unsigned int, allocated ) | ||
1614 | __field( ext4_fsblk_t, newblk ) | ||
1615 | ), | ||
1616 | |||
1617 | TP_fast_assign( | ||
1618 | __entry->ino = inode->i_ino; | ||
1619 | __entry->dev = inode->i_sb->s_dev; | ||
1620 | __entry->lblk = map->m_lblk; | ||
1621 | __entry->pblk = map->m_pblk; | ||
1622 | __entry->len = map->m_len; | ||
1623 | __entry->flags = map->m_flags; | ||
1624 | __entry->allocated = allocated; | ||
1625 | __entry->newblk = newblock; | ||
1626 | ), | ||
1627 | |||
1628 | TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %d" | ||
1629 | "allocated %d newblock %llu", | ||
1630 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1631 | (unsigned long) __entry->ino, | ||
1632 | (unsigned) __entry->lblk, (unsigned long long) __entry->pblk, | ||
1633 | __entry->len, __entry->flags, | ||
1634 | (unsigned int) __entry->allocated, | ||
1635 | (unsigned long long) __entry->newblk) | ||
1636 | ); | ||
1637 | |||
1638 | TRACE_EVENT(ext4_get_implied_cluster_alloc_exit, | ||
1639 | TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret), | ||
1640 | |||
1641 | TP_ARGS(sb, map, ret), | ||
1642 | |||
1643 | TP_STRUCT__entry( | ||
1644 | __field( dev_t, dev ) | ||
1645 | __field( ext4_lblk_t, lblk ) | ||
1646 | __field( ext4_fsblk_t, pblk ) | ||
1647 | __field( unsigned int, len ) | ||
1648 | __field( unsigned int, flags ) | ||
1649 | __field( int, ret ) | ||
1650 | ), | ||
1651 | |||
1652 | TP_fast_assign( | ||
1653 | __entry->dev = sb->s_dev; | ||
1654 | __entry->lblk = map->m_lblk; | ||
1655 | __entry->pblk = map->m_pblk; | ||
1656 | __entry->len = map->m_len; | ||
1657 | __entry->flags = map->m_flags; | ||
1658 | __entry->ret = ret; | ||
1659 | ), | ||
1660 | |||
1661 | TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %u ret %d", | ||
1662 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1663 | __entry->lblk, (unsigned long long) __entry->pblk, | ||
1664 | __entry->len, __entry->flags, __entry->ret) | ||
1665 | ); | ||
1666 | |||
1667 | TRACE_EVENT(ext4_ext_put_in_cache, | ||
1668 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len, | ||
1669 | ext4_fsblk_t start), | ||
1670 | |||
1671 | TP_ARGS(inode, lblk, len, start), | ||
1672 | |||
1673 | TP_STRUCT__entry( | ||
1674 | __field( ino_t, ino ) | ||
1675 | __field( dev_t, dev ) | ||
1676 | __field( ext4_lblk_t, lblk ) | ||
1677 | __field( unsigned int, len ) | ||
1678 | __field( ext4_fsblk_t, start ) | ||
1679 | ), | ||
1680 | |||
1681 | TP_fast_assign( | ||
1682 | __entry->ino = inode->i_ino; | ||
1683 | __entry->dev = inode->i_sb->s_dev; | ||
1684 | __entry->lblk = lblk; | ||
1685 | __entry->len = len; | ||
1686 | __entry->start = start; | ||
1687 | ), | ||
1688 | |||
1689 | TP_printk("dev %d,%d ino %lu lblk %u len %u start %llu", | ||
1690 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1691 | (unsigned long) __entry->ino, | ||
1692 | (unsigned) __entry->lblk, | ||
1693 | __entry->len, | ||
1694 | (unsigned long long) __entry->start) | ||
1695 | ); | ||
1696 | |||
1697 | TRACE_EVENT(ext4_ext_in_cache, | ||
1698 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret), | ||
1699 | |||
1700 | TP_ARGS(inode, lblk, ret), | ||
1701 | |||
1702 | TP_STRUCT__entry( | ||
1703 | __field( ino_t, ino ) | ||
1704 | __field( dev_t, dev ) | ||
1705 | __field( ext4_lblk_t, lblk ) | ||
1706 | __field( int, ret ) | ||
1707 | ), | ||
1708 | |||
1709 | TP_fast_assign( | ||
1710 | __entry->ino = inode->i_ino; | ||
1711 | __entry->dev = inode->i_sb->s_dev; | ||
1712 | __entry->lblk = lblk; | ||
1713 | __entry->ret = ret; | ||
1714 | ), | ||
1715 | |||
1716 | TP_printk("dev %d,%d ino %lu lblk %u ret %d", | ||
1717 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1718 | (unsigned long) __entry->ino, | ||
1719 | (unsigned) __entry->lblk, | ||
1720 | __entry->ret) | ||
1721 | |||
1722 | ); | ||
1723 | |||
1724 | TRACE_EVENT(ext4_find_delalloc_range, | ||
1725 | TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to, | ||
1726 | int reverse, int found, ext4_lblk_t found_blk), | ||
1727 | |||
1728 | TP_ARGS(inode, from, to, reverse, found, found_blk), | ||
1729 | |||
1730 | TP_STRUCT__entry( | ||
1731 | __field( ino_t, ino ) | ||
1732 | __field( dev_t, dev ) | ||
1733 | __field( ext4_lblk_t, from ) | ||
1734 | __field( ext4_lblk_t, to ) | ||
1735 | __field( int, reverse ) | ||
1736 | __field( int, found ) | ||
1737 | __field( ext4_lblk_t, found_blk ) | ||
1738 | ), | ||
1739 | |||
1740 | TP_fast_assign( | ||
1741 | __entry->ino = inode->i_ino; | ||
1742 | __entry->dev = inode->i_sb->s_dev; | ||
1743 | __entry->from = from; | ||
1744 | __entry->to = to; | ||
1745 | __entry->reverse = reverse; | ||
1746 | __entry->found = found; | ||
1747 | __entry->found_blk = found_blk; | ||
1748 | ), | ||
1749 | |||
1750 | TP_printk("dev %d,%d ino %lu from %u to %u reverse %d found %d " | ||
1751 | "(blk = %u)", | ||
1752 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1753 | (unsigned long) __entry->ino, | ||
1754 | (unsigned) __entry->from, (unsigned) __entry->to, | ||
1755 | __entry->reverse, __entry->found, | ||
1756 | (unsigned) __entry->found_blk) | ||
1757 | ); | ||
1758 | |||
1759 | TRACE_EVENT(ext4_get_reserved_cluster_alloc, | ||
1760 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len), | ||
1761 | |||
1762 | TP_ARGS(inode, lblk, len), | ||
1763 | |||
1764 | TP_STRUCT__entry( | ||
1765 | __field( ino_t, ino ) | ||
1766 | __field( dev_t, dev ) | ||
1767 | __field( ext4_lblk_t, lblk ) | ||
1768 | __field( unsigned int, len ) | ||
1769 | ), | ||
1770 | |||
1771 | TP_fast_assign( | ||
1772 | __entry->ino = inode->i_ino; | ||
1773 | __entry->dev = inode->i_sb->s_dev; | ||
1774 | __entry->lblk = lblk; | ||
1775 | __entry->len = len; | ||
1776 | ), | ||
1777 | |||
1778 | TP_printk("dev %d,%d ino %lu lblk %u len %u", | ||
1779 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1780 | (unsigned long) __entry->ino, | ||
1781 | (unsigned) __entry->lblk, | ||
1782 | __entry->len) | ||
1783 | ); | ||
1784 | |||
1785 | TRACE_EVENT(ext4_ext_show_extent, | ||
1786 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk, | ||
1787 | unsigned short len), | ||
1788 | |||
1789 | TP_ARGS(inode, lblk, pblk, len), | ||
1790 | |||
1791 | TP_STRUCT__entry( | ||
1792 | __field( ino_t, ino ) | ||
1793 | __field( dev_t, dev ) | ||
1794 | __field( ext4_lblk_t, lblk ) | ||
1795 | __field( ext4_fsblk_t, pblk ) | ||
1796 | __field( unsigned short, len ) | ||
1797 | ), | ||
1798 | |||
1799 | TP_fast_assign( | ||
1800 | __entry->ino = inode->i_ino; | ||
1801 | __entry->dev = inode->i_sb->s_dev; | ||
1802 | __entry->lblk = lblk; | ||
1803 | __entry->pblk = pblk; | ||
1804 | __entry->len = len; | ||
1805 | ), | ||
1806 | |||
1807 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u", | ||
1808 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1809 | (unsigned long) __entry->ino, | ||
1810 | (unsigned) __entry->lblk, | ||
1811 | (unsigned long long) __entry->pblk, | ||
1812 | (unsigned short) __entry->len) | ||
1813 | ); | ||
1814 | |||
1815 | TRACE_EVENT(ext4_remove_blocks, | ||
1816 | TP_PROTO(struct inode *inode, struct ext4_extent *ex, | ||
1817 | ext4_lblk_t from, ext4_fsblk_t to, | ||
1818 | ext4_fsblk_t partial_cluster), | ||
1819 | |||
1820 | TP_ARGS(inode, ex, from, to, partial_cluster), | ||
1821 | |||
1822 | TP_STRUCT__entry( | ||
1823 | __field( ino_t, ino ) | ||
1824 | __field( dev_t, dev ) | ||
1825 | __field( ext4_lblk_t, ee_lblk ) | ||
1826 | __field( ext4_fsblk_t, ee_pblk ) | ||
1827 | __field( unsigned short, ee_len ) | ||
1828 | __field( ext4_lblk_t, from ) | ||
1829 | __field( ext4_lblk_t, to ) | ||
1830 | __field( ext4_fsblk_t, partial ) | ||
1831 | ), | ||
1832 | |||
1833 | TP_fast_assign( | ||
1834 | __entry->ino = inode->i_ino; | ||
1835 | __entry->dev = inode->i_sb->s_dev; | ||
1836 | __entry->ee_lblk = cpu_to_le32(ex->ee_block); | ||
1837 | __entry->ee_pblk = ext4_ext_pblock(ex); | ||
1838 | __entry->ee_len = ext4_ext_get_actual_len(ex); | ||
1839 | __entry->from = from; | ||
1840 | __entry->to = to; | ||
1841 | __entry->partial = partial_cluster; | ||
1842 | ), | ||
1843 | |||
1844 | TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]" | ||
1845 | "from %u to %u partial_cluster %u", | ||
1846 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1847 | (unsigned long) __entry->ino, | ||
1848 | (unsigned) __entry->ee_lblk, | ||
1849 | (unsigned long long) __entry->ee_pblk, | ||
1850 | (unsigned short) __entry->ee_len, | ||
1851 | (unsigned) __entry->from, | ||
1852 | (unsigned) __entry->to, | ||
1853 | (unsigned) __entry->partial) | ||
1854 | ); | ||
1855 | |||
1856 | TRACE_EVENT(ext4_ext_rm_leaf, | ||
1857 | TP_PROTO(struct inode *inode, ext4_lblk_t start, | ||
1858 | struct ext4_extent *ex, ext4_fsblk_t partial_cluster), | ||
1859 | |||
1860 | TP_ARGS(inode, start, ex, partial_cluster), | ||
1861 | |||
1862 | TP_STRUCT__entry( | ||
1863 | __field( ino_t, ino ) | ||
1864 | __field( dev_t, dev ) | ||
1865 | __field( ext4_lblk_t, start ) | ||
1866 | __field( ext4_lblk_t, ee_lblk ) | ||
1867 | __field( ext4_fsblk_t, ee_pblk ) | ||
1868 | __field( short, ee_len ) | ||
1869 | __field( ext4_fsblk_t, partial ) | ||
1870 | ), | ||
1871 | |||
1872 | TP_fast_assign( | ||
1873 | __entry->ino = inode->i_ino; | ||
1874 | __entry->dev = inode->i_sb->s_dev; | ||
1875 | __entry->start = start; | ||
1876 | __entry->ee_lblk = le32_to_cpu(ex->ee_block); | ||
1877 | __entry->ee_pblk = ext4_ext_pblock(ex); | ||
1878 | __entry->ee_len = ext4_ext_get_actual_len(ex); | ||
1879 | __entry->partial = partial_cluster; | ||
1880 | ), | ||
1881 | |||
1882 | TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]" | ||
1883 | "partial_cluster %u", | ||
1884 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1885 | (unsigned long) __entry->ino, | ||
1886 | (unsigned) __entry->start, | ||
1887 | (unsigned) __entry->ee_lblk, | ||
1888 | (unsigned long long) __entry->ee_pblk, | ||
1889 | (unsigned short) __entry->ee_len, | ||
1890 | (unsigned) __entry->partial) | ||
1891 | ); | ||
1892 | |||
1893 | TRACE_EVENT(ext4_ext_rm_idx, | ||
1894 | TP_PROTO(struct inode *inode, ext4_fsblk_t pblk), | ||
1895 | |||
1896 | TP_ARGS(inode, pblk), | ||
1897 | |||
1898 | TP_STRUCT__entry( | ||
1899 | __field( ino_t, ino ) | ||
1900 | __field( dev_t, dev ) | ||
1901 | __field( ext4_fsblk_t, pblk ) | ||
1902 | ), | ||
1903 | |||
1904 | TP_fast_assign( | ||
1905 | __entry->ino = inode->i_ino; | ||
1906 | __entry->dev = inode->i_sb->s_dev; | ||
1907 | __entry->pblk = pblk; | ||
1908 | ), | ||
1909 | |||
1910 | TP_printk("dev %d,%d ino %lu index_pblk %llu", | ||
1911 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1912 | (unsigned long) __entry->ino, | ||
1913 | (unsigned long long) __entry->pblk) | ||
1914 | ); | ||
1915 | |||
1916 | TRACE_EVENT(ext4_ext_remove_space, | ||
1917 | TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth), | ||
1918 | |||
1919 | TP_ARGS(inode, start, depth), | ||
1920 | |||
1921 | TP_STRUCT__entry( | ||
1922 | __field( ino_t, ino ) | ||
1923 | __field( dev_t, dev ) | ||
1924 | __field( ext4_lblk_t, start ) | ||
1925 | __field( int, depth ) | ||
1926 | ), | ||
1927 | |||
1928 | TP_fast_assign( | ||
1929 | __entry->ino = inode->i_ino; | ||
1930 | __entry->dev = inode->i_sb->s_dev; | ||
1931 | __entry->start = start; | ||
1932 | __entry->depth = depth; | ||
1933 | ), | ||
1934 | |||
1935 | TP_printk("dev %d,%d ino %lu since %u depth %d", | ||
1936 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1937 | (unsigned long) __entry->ino, | ||
1938 | (unsigned) __entry->start, | ||
1939 | __entry->depth) | ||
1940 | ); | ||
1941 | |||
1942 | TRACE_EVENT(ext4_ext_remove_space_done, | ||
1943 | TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth, | ||
1944 | ext4_lblk_t partial, unsigned short eh_entries), | ||
1945 | |||
1946 | TP_ARGS(inode, start, depth, partial, eh_entries), | ||
1947 | |||
1948 | TP_STRUCT__entry( | ||
1949 | __field( ino_t, ino ) | ||
1950 | __field( dev_t, dev ) | ||
1951 | __field( ext4_lblk_t, start ) | ||
1952 | __field( int, depth ) | ||
1953 | __field( ext4_lblk_t, partial ) | ||
1954 | __field( unsigned short, eh_entries ) | ||
1955 | ), | ||
1956 | |||
1957 | TP_fast_assign( | ||
1958 | __entry->ino = inode->i_ino; | ||
1959 | __entry->dev = inode->i_sb->s_dev; | ||
1960 | __entry->start = start; | ||
1961 | __entry->depth = depth; | ||
1962 | __entry->partial = partial; | ||
1963 | __entry->eh_entries = eh_entries; | ||
1964 | ), | ||
1965 | |||
1966 | TP_printk("dev %d,%d ino %lu since %u depth %d partial %u " | ||
1967 | "remaining_entries %u", | ||
1968 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1969 | (unsigned long) __entry->ino, | ||
1970 | (unsigned) __entry->start, | ||
1971 | __entry->depth, | ||
1972 | (unsigned) __entry->partial, | ||
1973 | (unsigned short) __entry->eh_entries) | ||
1974 | ); | ||
1975 | |||
1592 | #endif /* _TRACE_EXT4_H */ | 1976 | #endif /* _TRACE_EXT4_H */ |
1593 | 1977 | ||
1594 | /* This part must be outside protection */ | 1978 | /* This part must be outside protection */ |