diff options
author | Zheng Liu <wenqing.lz@taobao.com> | 2012-11-08 21:57:33 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-11-08 21:57:33 -0500 |
commit | 992e9fdd7b3f656ab8aea895f0038336950774ed (patch) | |
tree | ac01802bc117516b111d1a3bd5f88617618bd8ca /include/trace | |
parent | 51865fda28e585bdcc164474ff6438a9ccdbfada (diff) |
ext4: add some tracepoints in extent status tree
This patch adds some tracepoints in extent status tree.
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/ext4.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index d2a125a6db8b..f6372b011366 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -15,6 +15,7 @@ struct ext4_inode_info; | |||
15 | struct mpage_da_data; | 15 | struct mpage_da_data; |
16 | struct ext4_map_blocks; | 16 | struct ext4_map_blocks; |
17 | struct ext4_extent; | 17 | struct ext4_extent; |
18 | struct extent_status; | ||
18 | 19 | ||
19 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) | 20 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) |
20 | 21 | ||
@@ -2054,6 +2055,106 @@ TRACE_EVENT(ext4_ext_remove_space_done, | |||
2054 | (unsigned short) __entry->eh_entries) | 2055 | (unsigned short) __entry->eh_entries) |
2055 | ); | 2056 | ); |
2056 | 2057 | ||
2058 | TRACE_EVENT(ext4_es_insert_extent, | ||
2059 | TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t len), | ||
2060 | |||
2061 | TP_ARGS(inode, start, len), | ||
2062 | |||
2063 | TP_STRUCT__entry( | ||
2064 | __field( dev_t, dev ) | ||
2065 | __field( ino_t, ino ) | ||
2066 | __field( loff_t, start ) | ||
2067 | __field( loff_t, len ) | ||
2068 | ), | ||
2069 | |||
2070 | TP_fast_assign( | ||
2071 | __entry->dev = inode->i_sb->s_dev; | ||
2072 | __entry->ino = inode->i_ino; | ||
2073 | __entry->start = start; | ||
2074 | __entry->len = len; | ||
2075 | ), | ||
2076 | |||
2077 | TP_printk("dev %d,%d ino %lu es [%lld/%lld)", | ||
2078 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
2079 | (unsigned long) __entry->ino, | ||
2080 | __entry->start, __entry->len) | ||
2081 | ); | ||
2082 | |||
2083 | TRACE_EVENT(ext4_es_remove_extent, | ||
2084 | TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t len), | ||
2085 | |||
2086 | TP_ARGS(inode, start, len), | ||
2087 | |||
2088 | TP_STRUCT__entry( | ||
2089 | __field( dev_t, dev ) | ||
2090 | __field( ino_t, ino ) | ||
2091 | __field( loff_t, start ) | ||
2092 | __field( loff_t, len ) | ||
2093 | ), | ||
2094 | |||
2095 | TP_fast_assign( | ||
2096 | __entry->dev = inode->i_sb->s_dev; | ||
2097 | __entry->ino = inode->i_ino; | ||
2098 | __entry->start = start; | ||
2099 | __entry->len = len; | ||
2100 | ), | ||
2101 | |||
2102 | TP_printk("dev %d,%d ino %lu es [%lld/%lld)", | ||
2103 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
2104 | (unsigned long) __entry->ino, | ||
2105 | __entry->start, __entry->len) | ||
2106 | ); | ||
2107 | |||
2108 | TRACE_EVENT(ext4_es_find_extent_enter, | ||
2109 | TP_PROTO(struct inode *inode, ext4_lblk_t start), | ||
2110 | |||
2111 | TP_ARGS(inode, start), | ||
2112 | |||
2113 | TP_STRUCT__entry( | ||
2114 | __field( dev_t, dev ) | ||
2115 | __field( ino_t, ino ) | ||
2116 | __field( ext4_lblk_t, start ) | ||
2117 | ), | ||
2118 | |||
2119 | TP_fast_assign( | ||
2120 | __entry->dev = inode->i_sb->s_dev; | ||
2121 | __entry->ino = inode->i_ino; | ||
2122 | __entry->start = start; | ||
2123 | ), | ||
2124 | |||
2125 | TP_printk("dev %d,%d ino %lu start %u", | ||
2126 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
2127 | (unsigned long) __entry->ino, __entry->start) | ||
2128 | ); | ||
2129 | |||
2130 | TRACE_EVENT(ext4_es_find_extent_exit, | ||
2131 | TP_PROTO(struct inode *inode, struct extent_status *es, | ||
2132 | ext4_lblk_t ret), | ||
2133 | |||
2134 | TP_ARGS(inode, es, ret), | ||
2135 | |||
2136 | TP_STRUCT__entry( | ||
2137 | __field( dev_t, dev ) | ||
2138 | __field( ino_t, ino ) | ||
2139 | __field( ext4_lblk_t, start ) | ||
2140 | __field( ext4_lblk_t, len ) | ||
2141 | __field( ext4_lblk_t, ret ) | ||
2142 | ), | ||
2143 | |||
2144 | TP_fast_assign( | ||
2145 | __entry->dev = inode->i_sb->s_dev; | ||
2146 | __entry->ino = inode->i_ino; | ||
2147 | __entry->start = es->start; | ||
2148 | __entry->len = es->len; | ||
2149 | __entry->ret = ret; | ||
2150 | ), | ||
2151 | |||
2152 | TP_printk("dev %d,%d ino %lu es [%u/%u) ret %u", | ||
2153 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
2154 | (unsigned long) __entry->ino, | ||
2155 | __entry->start, __entry->len, __entry->ret) | ||
2156 | ); | ||
2157 | |||
2057 | #endif /* _TRACE_EXT4_H */ | 2158 | #endif /* _TRACE_EXT4_H */ |
2058 | 2159 | ||
2059 | /* This part must be outside protection */ | 2160 | /* This part must be outside protection */ |