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>
This commit is contained in:

committed by
Linus Torvalds

parent
83eec5e6dd
commit
a9cd207c23
@@ -162,6 +162,60 @@ TRACE_EVENT(nilfs2_segment_usage_freed,
|
||||
__entry->segnum)
|
||||
);
|
||||
|
||||
TRACE_EVENT(nilfs2_mdt_insert_new_block,
|
||||
TP_PROTO(struct inode *inode,
|
||||
unsigned long ino,
|
||||
unsigned long block),
|
||||
|
||||
TP_ARGS(inode, ino, block),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(struct inode *, inode)
|
||||
__field(unsigned long, ino)
|
||||
__field(unsigned long, block)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->inode = inode;
|
||||
__entry->ino = ino;
|
||||
__entry->block = block;
|
||||
),
|
||||
|
||||
TP_printk("inode = %p ino = %lu block = %lu",
|
||||
__entry->inode,
|
||||
__entry->ino,
|
||||
__entry->block)
|
||||
);
|
||||
|
||||
TRACE_EVENT(nilfs2_mdt_submit_block,
|
||||
TP_PROTO(struct inode *inode,
|
||||
unsigned long ino,
|
||||
unsigned long blkoff,
|
||||
int mode),
|
||||
|
||||
TP_ARGS(inode, ino, blkoff, mode),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(struct inode *, inode)
|
||||
__field(unsigned long, ino)
|
||||
__field(unsigned long, blkoff)
|
||||
__field(int, mode)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->inode = inode;
|
||||
__entry->ino = ino;
|
||||
__entry->blkoff = blkoff;
|
||||
__entry->mode = mode;
|
||||
),
|
||||
|
||||
TP_printk("inode = %p ino = %lu blkoff = %lu mode = %x",
|
||||
__entry->inode,
|
||||
__entry->ino,
|
||||
__entry->blkoff,
|
||||
__entry->mode)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_NILFS2_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
Reference in New Issue
Block a user