* [f2fs-dev] [PATCH 1/2] f2fs: adds a tracepoint for submit_read_page @ 2013-11-20 8:40 Chao Yu 2013-11-24 3:08 ` Jaegeuk Kim 0 siblings, 1 reply; 3+ messages in thread From: Chao Yu @ 2013-11-20 8:40 UTC (permalink / raw) To: ???; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel, 谭姝 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 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [f2fs-dev] [PATCH 1/2] f2fs: adds a tracepoint for submit_read_page 2013-11-20 8:40 [f2fs-dev] [PATCH 1/2] f2fs: adds a tracepoint for submit_read_page Chao Yu @ 2013-11-24 3:08 ` Jaegeuk Kim 2013-11-25 1:29 ` Chao Yu 0 siblings, 1 reply; 3+ messages in thread From: Jaegeuk Kim @ 2013-11-24 3:08 UTC (permalink / raw) To: Chao Yu; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel, 谭姝 Hi, We need to avoid redundancy as much as possible. So, how about this patch? >From 7b4a4f1628a1a793942c7f675e6afecece64b659 Mon Sep 17 00:00:00 2001 From: Chao Yu <chao2.yu@samsung.com> Date: Wed, 20 Nov 2013 16:40:10 +0800 Subject: [PATCH] f2fs: adds a tracepoint for submit_read_page This patch adds a tracepoint for submit_read_page. Signed-off-by: Chao Yu <chao2.yu@samsung.com> [Jaegeuk Kim: integrate tracepoints of f2fs_submit_read(_write)_page] Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com> --- fs/f2fs/data.c | 1 + fs/f2fs/segment.c | 2 +- include/trace/events/f2fs.h | 25 +++++++++++++++++++++---- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index ce3cbd9..cdb342e 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -462,6 +462,7 @@ alloc_new: io->last_block_in_bio = blk_addr; mutex_unlock(&io->io_mutex); + trace_f2fs_submit_read_page(page, rw, META, blk_addr); } /* diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 9607cc4..264a5ff 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -925,7 +925,7 @@ retry: io->last_block_in_bio = blk_addr; mutex_unlock(&io->io_mutex); - trace_f2fs_submit_write_page(page, blk_addr, type); + trace_f2fs_submit_write_page(page, WRITE, type, blk_addr); } void f2fs_wait_on_page_writeback(struct page *page, diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index 47ee70d..73cc5f0 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -674,15 +674,16 @@ DEFINE_EVENT(f2fs__page, f2fs_vm_page_mkwrite, TP_ARGS(page, type) ); -TRACE_EVENT(f2fs_submit_write_page, +DECLARE_EVENT_CLASS(f2fs_io_page, - TP_PROTO(struct page *page, block_t blk_addr, int type), + TP_PROTO(struct page *page, int rw, int type, block_t blk_addr), - TP_ARGS(page, blk_addr, type), + TP_ARGS(page, rw, type, blk_addr), TP_STRUCT__entry( __field(dev_t, dev) __field(ino_t, ino) + __field(int, rw) __field(int, type) __field(pgoff_t, index) __field(block_t, block) @@ -691,18 +692,34 @@ TRACE_EVENT(f2fs_submit_write_page, TP_fast_assign( __entry->dev = page->mapping->host->i_sb->s_dev; __entry->ino = page->mapping->host->i_ino; + __entry->rw = rw; __entry->type = type; __entry->index = page->index; __entry->block = blk_addr; ), - TP_printk("dev = (%d,%d), ino = %lu, %s, index = %lu, blkaddr = 0x% llx", + TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, blkaddr = 0x %llx", show_dev_ino(__entry), + show_bio_type(__entry->rw), show_block_type(__entry->type), (unsigned long)__entry->index, (unsigned long long)__entry->block) ); +DEFINE_EVENT(f2fs_io_page, f2fs_submit_write_page, + + TP_PROTO(struct page *page, int rw, int type, block_t blk_addr), + + TP_ARGS(page, rw, type, blk_addr) +); + +DEFINE_EVENT(f2fs_io_page, f2fs_submit_read_page, + + TP_PROTO(struct page *page, int rw, int type, block_t blk_addr), + + TP_ARGS(page, rw, type, blk_addr) +); + TRACE_EVENT(f2fs_write_checkpoint, TP_PROTO(struct super_block *sb, bool is_umount, char *msg), -- 1.8.4.474.g128a96c -- Jaegeuk Kim Samsung ^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [f2fs-dev] [PATCH 1/2] f2fs: adds a tracepoint for submit_read_page 2013-11-24 3:08 ` Jaegeuk Kim @ 2013-11-25 1:29 ` Chao Yu 0 siblings, 0 replies; 3+ messages in thread From: Chao Yu @ 2013-11-25 1:29 UTC (permalink / raw) To: jaegeuk.kim Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel, '谭姝' Hi, > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk.kim@samsung.com] > Sent: Sunday, November 24, 2013 11:09 AM > To: Chao Yu > Cc: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net; 谭姝 > Subject: Re: [f2fs-dev] [PATCH 1/2] f2fs: adds a tracepoint for submit_read_page > > Hi, > > We need to avoid redundancy as much as possible. > So, how about this patch? Ah, It's more neat! Thanks. :) > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk.kim@samsung.com] > Sent: Sunday, November 24, 2013 11:51 AM > To: Chao Yu > Cc: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net; 谭姝 > Subject: Re: [f2fs-dev] [PATCH 2/2] f2fs: adds a tracepoint for f2fs_submit_read_bio > > Hi, > > Again, this tracepoint alos can be integrated with write_bios like this. Alright, Thanks! Regards, Yu ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-25 1:30 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-11-20 8:40 [f2fs-dev] [PATCH 1/2] f2fs: adds a tracepoint for submit_read_page Chao Yu 2013-11-24 3:08 ` Jaegeuk Kim 2013-11-25 1:29 ` Chao Yu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox