diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-05-04 04:35:43 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-05-04 05:00:29 +0300 |
commit | baaabbb72b0960d6d5220b77f206116aa54771de (patch) | |
tree | c4fcbd419c5ece8bbf0e64139157d473c0560ef2 /include/trace | |
parent | a72d4b97bb83c92a25d3eb21cc36b9bf94077c60 (diff) | |
download | linux-baaabbb72b0960d6d5220b77f206116aa54771de.tar.xz |
f2fs: enhance scalability of trace macro
Use __print_flags in show_bio_op_flags and show_cpreason instead of
__print_symbolic, it enables tracer function traverses and shows all
bits in the flag.
Additionally, add missing REQ_FUA into F2FS_OP_FLAGS.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/f2fs.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index c78a223a0d9c..15da88c5c3a4 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -59,8 +59,8 @@ TRACE_DEFINE_ENUM(CP_TRIMMED); { IPU, "IN-PLACE" }, \ { OPU, "OUT-OF-PLACE" }) -#define F2FS_OP_FLAGS (REQ_RAHEAD | REQ_SYNC | REQ_PREFLUSH | REQ_META |\ - REQ_PRIO) +#define F2FS_OP_FLAGS (REQ_RAHEAD | REQ_SYNC | REQ_META | REQ_PRIO | \ + REQ_PREFLUSH | REQ_FUA) #define F2FS_BIO_FLAG_MASK(t) (t & F2FS_OP_FLAGS) #define show_bio_type(op,op_flags) show_bio_op(op), \ @@ -79,16 +79,13 @@ TRACE_DEFINE_ENUM(CP_TRIMMED); { REQ_OP_WRITE_ZEROES, "WRITE_ZEROES" }) #define show_bio_op_flags(flags) \ - __print_symbolic(F2FS_BIO_FLAG_MASK(flags), \ - { REQ_RAHEAD, "(RA)" }, \ - { REQ_SYNC, "(S)" }, \ - { REQ_SYNC | REQ_PRIO, "(SP)" }, \ - { REQ_META, "(M)" }, \ - { REQ_META | REQ_PRIO, "(MP)" }, \ - { REQ_SYNC | REQ_PREFLUSH , "(SF)" }, \ - { REQ_SYNC | REQ_META | REQ_PRIO, "(SMP)" }, \ - { REQ_PREFLUSH | REQ_META | REQ_PRIO, "(FMP)" }, \ - { 0, " \b" }) + __print_flags(F2FS_BIO_FLAG_MASK(flags), "|", \ + { REQ_RAHEAD, "R" }, \ + { REQ_SYNC, "S" }, \ + { REQ_META, "M" }, \ + { REQ_PRIO, "P" }, \ + { REQ_PREFLUSH, "PF" }, \ + { REQ_FUA, "FUA" }) #define show_data_type(type) \ __print_symbolic(type, \ @@ -121,13 +118,14 @@ TRACE_DEFINE_ENUM(CP_TRIMMED); { GC_CB, "Cost-Benefit" }) #define show_cpreason(type) \ - __print_symbolic(type, \ + __print_flags(type, "|", \ { CP_UMOUNT, "Umount" }, \ { CP_FASTBOOT, "Fastboot" }, \ { CP_SYNC, "Sync" }, \ { CP_RECOVERY, "Recovery" }, \ { CP_DISCARD, "Discard" }, \ - { CP_UMOUNT | CP_TRIMMED, "Umount,Trimmed" }) + { CP_UMOUNT, "Umount" }, \ + { CP_TRIMMED, "Trimmed" }) struct victim_sel_policy; struct f2fs_map_blocks; @@ -774,7 +772,7 @@ DECLARE_EVENT_CLASS(f2fs__submit_page_bio, ), TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, " - "oldaddr = 0x%llx, newaddr = 0x%llx, rw = %s%s, type = %s", + "oldaddr = 0x%llx, newaddr = 0x%llx, rw = %s(%s), type = %s", show_dev_ino(__entry), (unsigned long)__entry->index, (unsigned long long)__entry->old_blkaddr, @@ -827,7 +825,7 @@ DECLARE_EVENT_CLASS(f2fs__bio, __entry->size = bio->bi_iter.bi_size; ), - TP_printk("dev = (%d,%d)/(%d,%d), rw = %s%s, %s, sector = %lld, size = %u", + TP_printk("dev = (%d,%d)/(%d,%d), rw = %s(%s), %s, sector = %lld, size = %u", show_dev(__entry->target), show_dev(__entry->dev), show_bio_type(__entry->op, __entry->op_flags), |