summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/f2fs.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index d53be932df01..df4cd346ae72 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -1430,6 +1430,50 @@ DEFINE_EVENT(f2fs__folio, f2fs_set_page_dirty,
TP_ARGS(folio, type)
);
+DECLARE_EVENT_CLASS(f2fs__cached_block,
+
+ TP_PROTO(struct f2fs_cached_block *block, int type),
+
+ TP_ARGS(block, type),
+
+ TP_STRUCT__entry(
+ __field(dev_t, dev)
+ __field(pgoff_t, index)
+ __field(int, type)
+ __field(int, dirty)
+ __field(int, uptodate)
+ ),
+
+ TP_fast_assign(
+ __entry->dev = block->cache->sbi->sb->s_dev;
+ __entry->index = block->index;
+ __entry->type = type;
+ __entry->dirty = f2fs_cache_test_dirty(block);
+ __entry->uptodate = f2fs_cache_test_uptodate(block);
+ ),
+
+ TP_printk("dev = (%d,%d), %s, index = %lu, dirty = %d, uptodate = %d",
+ show_dev(__entry->dev),
+ show_block_type(__entry->type),
+ (unsigned long)__entry->index,
+ __entry->dirty,
+ __entry->uptodate)
+);
+
+DEFINE_EVENT(f2fs__cached_block, f2fs_write_cache,
+
+ TP_PROTO(struct f2fs_cached_block *block, int type),
+
+ TP_ARGS(block, type)
+);
+
+DEFINE_EVENT(f2fs__cached_block, f2fs_cache_set_dirty,
+
+ TP_PROTO(struct f2fs_cached_block *block, int type),
+
+ TP_ARGS(block, type)
+);
+
TRACE_EVENT(f2fs_replace_atomic_write_block,
TP_PROTO(struct inode *inode, struct inode *cow_inode, pgoff_t index,
@@ -1574,6 +1618,33 @@ TRACE_EVENT(f2fs_writepages,
__entry->for_sync)
);
+TRACE_EVENT(f2fs_write_caches,
+
+ TP_PROTO(struct f2fs_sb_info *sbi, long nr_to_write, long nwritten, int type),
+
+ TP_ARGS(sbi, nr_to_write, nwritten, type),
+
+ TP_STRUCT__entry(
+ __field(dev_t, dev)
+ __field(long, nr_to_write)
+ __field(long, nwritten)
+ __field(int, type)
+ ),
+
+ TP_fast_assign(
+ __entry->dev = sbi->sb->s_dev;
+ __entry->nr_to_write = nr_to_write;
+ __entry->nwritten = nwritten;
+ __entry->type = type;
+ ),
+
+ TP_printk("dev = (%d,%d), %s, nr_to_write = %ld, nwritten = %ld",
+ show_dev(__entry->dev),
+ show_block_type(__entry->type),
+ __entry->nr_to_write,
+ __entry->nwritten)
+);
+
TRACE_EVENT(f2fs_readpages,
TP_PROTO(struct inode *inode, pgoff_t start, unsigned int nrpage),