Skip to contentSkip to conversation

f2fs: add tracepoints for write page operations

PATCH Superseded Namjae Jeon 1 participant 1 message Feb 19, 2013

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 7/8 f2fs: add tracepoints for write page operations

From: Namjae Jeon <[email protected]>

Add tracepoints to debug the various page write operation like data pages, meta pages.

---
 fs/f2fs/checkpoint.c        |    2 ++
 fs/f2fs/data.c              |    2 ++
 include/trace/events/f2fs.h |   62 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+)
fs/f2fs/checkpoint.c +2 -0
index 2b6fc13..a0fce2c 100644
@@ -20,6 +20,7 @@
 #include "f2fs.h"
 #include "node.h"
 #include "segment.h"
+#include <trace/events/f2fs.h>
 
 static struct kmem_cache *orphan_entry_slab;
 static struct kmem_cache *inode_entry_slab;
@@ -82,6 +83,7 @@ static int f2fs_write_meta_page(struct page *page,
 		return AOP_WRITEPAGE_ACTIVATE;
 	}
 
+	trace_f2fs_write_page(page, META);
 	wait_on_page_writeback(page);
 
 	write_meta_page(sbi, page);
fs/f2fs/data.c +2 -0
index be96b0e..7f59bb9 100644
@@ -495,6 +495,7 @@ static int f2fs_write_data_page(struct page *page,
 	unsigned offset;
 	int err = 0;
 
+	trace_f2fs_write_page(page, DATA);
 	if (page->index < end_index)
 		goto out;
 
@@ -603,6 +604,7 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping,
 	struct dnode_of_data dn;
 	int err = 0;
 
+	trace_f2fs_write_begin(inode, pos, len, flags);
 	/* for nobh_write_end */
 	*fsdata = NULL;
 
include/trace/events/f2fs.h +62 -0

68 lines not on this page · raw message

Signature · 1 line
1.7.9.5