lkml.org 
[lkml]   [2013]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[f2fs-dev] [PATCH 1/2] f2fs: adds a tracepoint for submit_read_page
Date
This patch adds a tracepoint for submit_read_page.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
---
fs/f2fs/data.c | 1 +
include/trace/events/f2fs.h | 30 ++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 9cf3f6c..0ca93be 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -448,6 +448,7 @@ alloc_new:
io->last_block_in_bio = blk_addr;

mutex_unlock(&io->io_mutex);
+ trace_f2fs_submit_read_page(page, blk_addr, rw);
}

/*
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index e0dc355..571f39a 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -453,6 +453,36 @@ TRACE_EVENT_CONDITION(f2fs_readpage,
show_bio_type(__entry->type))
);

+TRACE_EVENT(f2fs_submit_read_page,
+
+ TP_PROTO(struct page *page, block_t blk_addr, int rw),
+
+ TP_ARGS(page, blk_addr, rw),
+
+ TP_STRUCT__entry(
+ __field(dev_t, dev)
+ __field(ino_t, ino)
+ __field(int, rw)
+ __field(pgoff_t, index)
+ __field(block_t, block)
+ ),
+
+ TP_fast_assign(
+ __entry->dev = page->mapping->host->i_sb->s_dev;
+ __entry->ino = page->mapping->host->i_ino;
+ __entry->rw = rw;
+ __entry->index = page->index;
+ __entry->block = blk_addr;
+ ),
+
+ TP_printk("dev = (%d,%d), ino = %lu, bio_type = %s, "
+ "index = %lu, blkaddr = 0x%llx",
+ show_dev_ino(__entry),
+ show_bio_type(__entry->rw),
+ (unsigned long)__entry->index,
+ (unsigned long long)__entry->block)
+);
+
TRACE_EVENT(f2fs_get_data_block,
TP_PROTO(struct inode *inode, sector_t iblock,
struct buffer_head *bh, int ret),
--
1.7.9.5


\
 
 \ /
  Last update: 2013-11-20 10:01    [W:0.053 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site