aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-10-24 04:53:29 -0400
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-10-25 03:54:40 -0400
commit26c6b8879911df991dc780c67eaeb84c7629949d (patch)
treed2002aa72cec8dac565817de234f887124d8da1c /include/trace
parente8d61a7488d06aba3e7226e3536a6a6e14391ce8 (diff)
f2fs: add tracepoint for set_page_dirty
This patch adds a tracepoint for set_page_dirty. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/f2fs.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 52ae54828eda..ebde3afb89cd 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -36,6 +36,11 @@
36 { CURSEG_COLD_NODE, "Cold NODE" }, \ 36 { CURSEG_COLD_NODE, "Cold NODE" }, \
37 { NO_CHECK_TYPE, "No TYPE" }) 37 { NO_CHECK_TYPE, "No TYPE" })
38 38
39#define show_file_type(type) \
40 __print_symbolic(type, \
41 { 0, "FILE" }, \
42 { 1, "DIR" })
43
39#define show_gc_type(type) \ 44#define show_gc_type(type) \
40 __print_symbolic(type, \ 45 __print_symbolic(type, \
41 { FG_GC, "Foreground GC" }, \ 46 { FG_GC, "Foreground GC" }, \
@@ -623,6 +628,45 @@ TRACE_EVENT(f2fs_do_submit_bio,
623 __entry->size) 628 __entry->size)
624); 629);
625 630
631DECLARE_EVENT_CLASS(f2fs__page,
632
633 TP_PROTO(struct page *page, int type),
634
635 TP_ARGS(page, type),
636
637 TP_STRUCT__entry(
638 __field(dev_t, dev)
639 __field(ino_t, ino)
640 __field(int, type)
641 __field(int, dir)
642 __field(pgoff_t, index)
643 __field(int, dirty)
644 ),
645
646 TP_fast_assign(
647 __entry->dev = page->mapping->host->i_sb->s_dev;
648 __entry->ino = page->mapping->host->i_ino;
649 __entry->type = type;
650 __entry->dir = S_ISDIR(page->mapping->host->i_mode);
651 __entry->index = page->index;
652 __entry->dirty = PageDirty(page);
653 ),
654
655 TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, dirty = %d",
656 show_dev_ino(__entry),
657 show_block_type(__entry->type),
658 show_file_type(__entry->dir),
659 (unsigned long)__entry->index,
660 __entry->dirty)
661);
662
663DEFINE_EVENT(f2fs__page, f2fs_set_page_dirty,
664
665 TP_PROTO(struct page *page, int type),
666
667 TP_ARGS(page, type)
668);
669
626TRACE_EVENT(f2fs_submit_write_page, 670TRACE_EVENT(f2fs_submit_write_page,
627 671
628 TP_PROTO(struct page *page, block_t blk_addr, int type), 672 TP_PROTO(struct page *page, block_t blk_addr, int type),