linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 02/10] f2fs: fix wrong tracepoints for op and op_flags
Date: Fri, 30 Dec 2016 10:51:09 -0800	[thread overview]
Message-ID: <20161230185117.3832-2-jaegeuk@kernel.org> (raw)
In-Reply-To: <20161230185117.3832-1-jaegeuk@kernel.org>

This patch fixes wrong tracepoints in terms of op and op_flags.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 include/trace/events/f2fs.h | 41 +++++++++++++++++++++++++----------------
 1 file changed, 25 insertions(+), 16 deletions(-)

diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 01b3c9869a0d..4c942599581b 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -55,25 +55,34 @@ TRACE_DEFINE_ENUM(CP_DISCARD);
 		{ IPU,		"IN-PLACE" },				\
 		{ OPU,		"OUT-OF-PLACE" })
 
-#define F2FS_BIO_FLAG_MASK(t)	(t & (REQ_RAHEAD | REQ_PREFLUSH | REQ_FUA))
-#define F2FS_BIO_EXTRA_MASK(t)	(t & (REQ_META | REQ_PRIO))
-
-#define show_bio_type(op_flags)	show_bio_op_flags(op_flags), 		\
-						show_bio_extra(op_flags)
+#define F2FS_OP_FLAGS (REQ_RAHEAD | REQ_SYNC | REQ_PREFLUSH | REQ_META |\
+			REQ_PRIO)
+#define F2FS_BIO_FLAG_MASK(t)	(t & F2FS_OP_FLAGS)
+
+#define show_bio_type(op,op_flags)	show_bio_op(op),		\
+						show_bio_op_flags(op_flags)
+
+#define show_bio_op(op)							\
+	__print_symbolic(op,						\
+		{ REQ_OP_READ,			"READ" },		\
+		{ REQ_OP_WRITE,			"WRITE" },		\
+		{ REQ_OP_FLUSH,			"FLUSH" },		\
+		{ REQ_OP_DISCARD,		"DISCARD" },		\
+		{ REQ_OP_ZONE_REPORT,		"ZONE_REPORT" },	\
+		{ REQ_OP_SECURE_ERASE,		"SECURE_ERASE" },	\
+		{ REQ_OP_ZONE_RESET,		"ZONE_RESET" },		\
+		{ REQ_OP_WRITE_SAME,		"WRITE_SAME" },		\
+		{ REQ_OP_WRITE_ZEROES,		"WRITE_ZEROES" })
 
 #define show_bio_op_flags(flags)					\
 	__print_symbolic(F2FS_BIO_FLAG_MASK(flags),			\
-		{ 0,			"WRITE" },			\
-		{ REQ_RAHEAD, 		"READAHEAD" },			\
-		{ REQ_SYNC, 		"REQ_SYNC" },			\
-		{ REQ_PREFLUSH,		"REQ_PREFLUSH" },		\
-		{ REQ_FUA,		"REQ_FUA" })
-
-#define show_bio_extra(type)						\
-	__print_symbolic(F2FS_BIO_EXTRA_MASK(type),			\
+		{ REQ_RAHEAD, 		"(RA)" },			\
+		{ REQ_SYNC, 		"(S)" },			\
+		{ REQ_SYNC | REQ_PRIO,	"(SP)" },			\
 		{ REQ_META, 		"(M)" },			\
-		{ REQ_PRIO, 		"(P)" },			\
 		{ REQ_META | REQ_PRIO,	"(MP)" },			\
+		{ REQ_SYNC | REQ_META | REQ_PRIO, "(SMP)" },		\
+		{ REQ_PREFLUSH | REQ_META | REQ_PRIO, "(FMP)" },	\
 		{ 0, " \b" })
 
 #define show_data_type(type)						\
@@ -753,7 +762,7 @@ DECLARE_EVENT_CLASS(f2fs__submit_page_bio,
 		(unsigned long)__entry->index,
 		(unsigned long long)__entry->old_blkaddr,
 		(unsigned long long)__entry->new_blkaddr,
-		show_bio_type(__entry->op_flags),
+		show_bio_type(__entry->op, __entry->op_flags),
 		show_block_type(__entry->type))
 );
 
@@ -802,7 +811,7 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio,
 
 	TP_printk("dev = (%d,%d), rw = %s%s, %s, sector = %lld, size = %u",
 		show_dev(__entry),
-		show_bio_type(__entry->op_flags),
+		show_bio_type(__entry->op, __entry->op_flags),
 		show_block_type(__entry->type),
 		(unsigned long long)__entry->sector,
 		__entry->size)
-- 
2.11.0

  reply	other threads:[~2016-12-30 18:51 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-30 18:51 [PATCH 01/10] f2fs: reassign new segment for mode=lfs Jaegeuk Kim
2016-12-30 18:51 ` Jaegeuk Kim [this message]
2017-01-04  3:25   ` [PATCH 02/10] f2fs: fix wrong tracepoints for op and op_flags Chao Yu
2016-12-30 18:51 ` [PATCH 03/10] f2fs: add submit_bio tracepoint Jaegeuk Kim
2017-01-04  3:32   ` [f2fs-dev] " Chao Yu
2017-01-04 23:35   ` [PATCH 03/10 v2] " Jaegeuk Kim
2017-01-12 11:07     ` Chao Yu
2016-12-30 18:51 ` [PATCH 04/10] f2fs: support IO alignment for DATA and NODE writes Jaegeuk Kim
2017-01-04  8:23   ` [f2fs-dev] " Chao Yu
2017-01-04 23:44     ` Jaegeuk Kim
2017-01-12 11:15       ` [f2fs-dev] " Chao Yu
2016-12-30 18:51 ` [PATCH 05/10] f2fs: get io size bit from mount option Jaegeuk Kim
2016-12-30 18:51 ` [PATCH 06/10] f2fs: show the max number of atomic operations Jaegeuk Kim
2017-01-04  8:45   ` Chao Yu
2017-01-04 23:50   ` [PATCH 06/10 v2] " Jaegeuk Kim
2017-01-12 11:15     ` Chao Yu
2016-12-30 18:51 ` [PATCH 07/10] f2fs: don't allow encrypted operations without keys Jaegeuk Kim
2017-01-04  8:56   ` Chao Yu
2016-12-30 18:51 ` [PATCH 08/10] f2fs: relax async discard commands more Jaegeuk Kim
2017-01-04  9:29   ` [f2fs-dev] " Chao Yu
2017-01-05  3:19     ` Chao Yu
2017-01-05  8:17       ` Chao Yu
2017-01-05 19:59         ` Jaegeuk Kim
2017-01-05 19:46       ` [f2fs-dev] " Jaegeuk Kim
2017-01-06  2:06         ` Chao Yu
2017-01-06  2:42           ` Jaegeuk Kim
2017-01-06  3:32             ` [f2fs-dev] " Chao Yu
2017-02-22  7:23             ` Chao Yu
2017-02-22 21:15               ` Jaegeuk Kim
2017-02-23  2:08                 ` Chao Yu
2017-02-23  2:42                   ` Jaegeuk Kim
2016-12-30 18:51 ` [PATCH 09/10] f2fs: avoid needless checkpoint in f2fs_trim_fs Jaegeuk Kim
2017-02-22  7:23   ` Chao Yu
2016-12-30 18:51 ` [PATCH 10/10] f2fs: return fs_trim if there is no candidate Jaegeuk Kim
2017-02-22  7:23   ` Chao Yu
2017-02-22 21:26     ` Jaegeuk Kim
2017-02-23  2:12       ` Chao Yu
2017-02-23  2:47         ` Jaegeuk Kim
2017-01-04  3:24 ` [f2fs-dev] [PATCH 01/10] f2fs: reassign new segment for mode=lfs Chao Yu
2017-01-04 22:48   ` Jaegeuk Kim
2017-01-12 11:03     ` Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161230185117.3832-2-jaegeuk@kernel.org \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).