diff options
| author | Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp> | 2015-11-06 19:32:08 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-06 20:50:42 -0500 |
| commit | a9cd207c23ca4fa5bd5f1092e867e87542e349a3 (patch) | |
| tree | e56c2224b609c25846b2bb0efcfa4e000b54cda7 /include | |
| parent | 83eec5e6dd10f0b1ab83ee660c8be883b3da7ba8 (diff) | |
nilfs2: add tracepoints for analyzing reading and writing metadata files
This patch adds tracepoints for analyzing requests of reading and writing
metadata files. The tracepoints cover every in-place mdt files (cpfile,
sufile, and datfile).
Example of tracing mdt_insert_new_block():
cp-14635 [000] ...1 30598.199309: nilfs2_mdt_insert_new_block: inode = ffff88022a8d0178 ino = 3 block = 155
cp-14635 [000] ...1 30598.199520: nilfs2_mdt_insert_new_block: inode = ffff88022a8d0178 ino = 3 block = 5
cp-14635 [000] ...1 30598.200828: nilfs2_mdt_insert_new_block: inode = ffff88022a8d0178 ino = 3 block = 253
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: TK Kato <TK.Kato@wdc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/trace/events/nilfs2.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/include/trace/events/nilfs2.h b/include/trace/events/nilfs2.h index 1b65ba687925..c7805818fcc6 100644 --- a/include/trace/events/nilfs2.h +++ b/include/trace/events/nilfs2.h | |||
| @@ -162,6 +162,60 @@ TRACE_EVENT(nilfs2_segment_usage_freed, | |||
| 162 | __entry->segnum) | 162 | __entry->segnum) |
| 163 | ); | 163 | ); |
| 164 | 164 | ||
| 165 | TRACE_EVENT(nilfs2_mdt_insert_new_block, | ||
| 166 | TP_PROTO(struct inode *inode, | ||
| 167 | unsigned long ino, | ||
| 168 | unsigned long block), | ||
| 169 | |||
| 170 | TP_ARGS(inode, ino, block), | ||
| 171 | |||
| 172 | TP_STRUCT__entry( | ||
| 173 | __field(struct inode *, inode) | ||
| 174 | __field(unsigned long, ino) | ||
| 175 | __field(unsigned long, block) | ||
| 176 | ), | ||
| 177 | |||
| 178 | TP_fast_assign( | ||
| 179 | __entry->inode = inode; | ||
| 180 | __entry->ino = ino; | ||
| 181 | __entry->block = block; | ||
| 182 | ), | ||
| 183 | |||
| 184 | TP_printk("inode = %p ino = %lu block = %lu", | ||
| 185 | __entry->inode, | ||
| 186 | __entry->ino, | ||
| 187 | __entry->block) | ||
| 188 | ); | ||
| 189 | |||
| 190 | TRACE_EVENT(nilfs2_mdt_submit_block, | ||
| 191 | TP_PROTO(struct inode *inode, | ||
| 192 | unsigned long ino, | ||
| 193 | unsigned long blkoff, | ||
| 194 | int mode), | ||
| 195 | |||
| 196 | TP_ARGS(inode, ino, blkoff, mode), | ||
| 197 | |||
| 198 | TP_STRUCT__entry( | ||
| 199 | __field(struct inode *, inode) | ||
| 200 | __field(unsigned long, ino) | ||
| 201 | __field(unsigned long, blkoff) | ||
| 202 | __field(int, mode) | ||
| 203 | ), | ||
| 204 | |||
| 205 | TP_fast_assign( | ||
| 206 | __entry->inode = inode; | ||
| 207 | __entry->ino = ino; | ||
| 208 | __entry->blkoff = blkoff; | ||
| 209 | __entry->mode = mode; | ||
| 210 | ), | ||
| 211 | |||
| 212 | TP_printk("inode = %p ino = %lu blkoff = %lu mode = %x", | ||
| 213 | __entry->inode, | ||
| 214 | __entry->ino, | ||
| 215 | __entry->blkoff, | ||
| 216 | __entry->mode) | ||
| 217 | ); | ||
| 218 | |||
| 165 | #endif /* _TRACE_NILFS2_H */ | 219 | #endif /* _TRACE_NILFS2_H */ |
| 166 | 220 | ||
| 167 | /* This part must be outside protection */ | 221 | /* This part must be outside protection */ |
