Skip to contentSkip to conversation

f2fs: add tracepoints for write page operations

PATCH Superseded Namjae Jeon 1 participant 1 message Mar 17, 2013

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 6/7 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..9e0a314 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;
@@ -73,6 +74,7 @@ static int f2fs_write_meta_page(struct page *page,
 	struct inode *inode = page->mapping->host;
 	struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
 
+	trace_f2fs_write_page(page, META);
 	/* Should not write any meta pages, if any IO error was occurred */
 	if (wbc->for_reclaim ||
 			is_set_ckpt_flags(F2FS_CKPT(sbi), CP_ERROR_FLAG)) {
fs/f2fs/data.c +2 -0
index 0f928b7..e2b19e0 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