From: Chao Yu Subject: [PATCH 1/2] f2fs: adds a tracepoint for submit_read_page Date: Wed, 20 Nov 2013 16:40:10 +0800 Message-ID: <001e01cee5cc$3d118310$b7348930$@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net To: ??? Return-path: Content-language: zh-cn List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net List-Id: linux-fsdevel.vger.kernel.org This patch adds a tracepoint for submit_read_page. Signed-off-by: Chao Yu --- 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 ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk