f2fs: cleanup trace event of f2fs_submit_page_{m,}bio with DECLARE_EVENT_CLASS

This patch adds missing parameter _type_ for trace_f2fs_submit_page_bio, then
use DECLARE_EVENT_CLASS/DEFINE_EVENT_CONDITION pair to cleanup some trace event
code related to f2fs_submit_page_{m,}bio.

Additionally, after we remove redundant code, size of code can be reduced:
   text    data     bss     dec     hex filename
 176787    8712      56  185555   2d4d3 f2fs.ko.org
 174408    8648      56  183112   2cb48 f2fs.ko

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Chao Yu
2014-12-23 16:35:21 +08:00
committed by Jaegeuk Kim
parent 09eb483e89
commit 3e1c8f125e
2 changed files with 53 additions and 66 deletions

View File

@@ -137,7 +137,7 @@ int f2fs_submit_page_bio(struct f2fs_sb_info *sbi, struct page *page,
{
struct bio *bio;
trace_f2fs_submit_page_bio(page, fio->blk_addr, fio->rw);
trace_f2fs_submit_page_bio(page, fio->blk_addr, fio->rw, fio->type);
f2fs_trace_ios(page, fio, 0);
/* Allocate a new bio */
@@ -190,7 +190,7 @@ alloc_new:
f2fs_trace_ios(page, fio, 0);
up_write(&io->io_rwsem);
trace_f2fs_submit_page_mbio(page, fio->rw, fio->type, fio->blk_addr);
trace_f2fs_submit_page_mbio(page, fio->blk_addr, fio->rw, fio->type);
}
/*