aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2013-04-23 04:51:43 -0400
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-04-23 05:15:17 -0400
commit6ec178dac6768204a6edf70f4a53d40b691c12b4 (patch)
tree88a7676da49821341d3c193ddc9c8cce73db31a8 /include/trace/events
parentc01e285324793a86c2c90c8451ed6feb04b3d310 (diff)
f2fs: add tracepoints for write page operations
Add tracepoints to debug the various page write operation like data pages, meta pages. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Pankaj Kumar <pankaj.km@samsung.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> [Jaegeuk: remove unnecessary tracepoints] Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'include/trace/events')
-rw-r--r--include/trace/events/f2fs.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 56b6240e6c01..ae2da92e0768 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -8,6 +8,14 @@
8 8
9#define show_dev(entry) MAJOR(entry->dev), MINOR(entry->dev) 9#define show_dev(entry) MAJOR(entry->dev), MINOR(entry->dev)
10#define show_dev_ino(entry) show_dev(entry), (unsigned long)entry->ino 10#define show_dev_ino(entry) show_dev(entry), (unsigned long)entry->ino
11
12#define show_block_type(type) \
13 __print_symbolic(type, \
14 { NODE, "NODE" }, \
15 { DATA, "DATA" }, \
16 { META, "META" }, \
17 { META_FLUSH, "META_FLUSH" })
18
11#define show_bio_type(type) \ 19#define show_bio_type(type) \
12 __print_symbolic(type, \ 20 __print_symbolic(type, \
13 { READ, "READ" }, \ 21 { READ, "READ" }, \
@@ -578,6 +586,65 @@ TRACE_EVENT(f2fs_reserve_new_block,
578 __entry->ofs_in_node) 586 __entry->ofs_in_node)
579); 587);
580 588
589TRACE_EVENT(f2fs_do_submit_bio,
590
591 TP_PROTO(struct super_block *sb, int btype, bool sync, struct bio *bio),
592
593 TP_ARGS(sb, btype, sync, bio),
594
595 TP_STRUCT__entry(
596 __field(dev_t, dev)
597 __field(int, btype)
598 __field(bool, sync)
599 __field(sector_t, sector)
600 __field(unsigned int, size)
601 ),
602
603 TP_fast_assign(
604 __entry->dev = sb->s_dev;
605 __entry->btype = btype;
606 __entry->sync = sync;
607 __entry->sector = bio->bi_sector;
608 __entry->size = bio->bi_size;
609 ),
610
611 TP_printk("dev = (%d,%d), type = %s, io = %s, sector = %lld, size = %u",
612 show_dev(__entry),
613 show_block_type(__entry->btype),
614 __entry->sync ? "sync" : "no sync",
615 (unsigned long long)__entry->sector,
616 __entry->size)
617);
618
619TRACE_EVENT(f2fs_submit_write_page,
620
621 TP_PROTO(struct page *page, block_t blk_addr, int type),
622
623 TP_ARGS(page, blk_addr, type),
624
625 TP_STRUCT__entry(
626 __field(dev_t, dev)
627 __field(ino_t, ino)
628 __field(int, type)
629 __field(pgoff_t, index)
630 __field(block_t, block)
631 ),
632
633 TP_fast_assign(
634 __entry->dev = page->mapping->host->i_sb->s_dev;
635 __entry->ino = page->mapping->host->i_ino;
636 __entry->type = type;
637 __entry->index = page->index;
638 __entry->block = blk_addr;
639 ),
640
641 TP_printk("dev = (%d,%d), ino = %lu, %s, index = %lu, blkaddr = 0x%llx",
642 show_dev_ino(__entry),
643 show_block_type(__entry->type),
644 (unsigned long)__entry->index,
645 (unsigned long long)__entry->block)
646);
647
581#endif /* _TRACE_F2FS_H */ 648#endif /* _TRACE_F2FS_H */
582 649
583 /* This part must be outside protection */ 650 /* This part must be outside protection */