summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2014-05-06 08:46:04 (GMT)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-05-07 01:21:59 (GMT)
commit62aed044ea4bef36ac3f6885611b013b11c9be2d (patch)
tree650bb88860691bfae122e4be3f56c8c9789d465e /include/trace
parent8b376249e7e659c41896e0d3e9b25d1230a4e7f6 (diff)
downloadlinux-62aed044ea4bef36ac3f6885611b013b11c9be2d.tar.xz
f2fs: add a tracepoint for f2fs_write_begin
This patch adds a tracepoint for f2fs_write_begin to trace write op of user. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/f2fs.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 67f38fa..1e9375a 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -659,6 +659,36 @@ DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_read_bio,
TP_CONDITION(bio)
);
+TRACE_EVENT(f2fs_write_begin,
+
+ TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
+ unsigned int flags),
+
+ TP_ARGS(inode, pos, len, flags),
+
+ TP_STRUCT__entry(
+ __field(dev_t, dev)
+ __field(ino_t, ino)
+ __field(loff_t, pos)
+ __field(unsigned int, len)
+ __field(unsigned int, flags)
+ ),
+
+ TP_fast_assign(
+ __entry->dev = inode->i_sb->s_dev;
+ __entry->ino = inode->i_ino;
+ __entry->pos = pos;
+ __entry->len = len;
+ __entry->flags = flags;
+ ),
+
+ TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, flags = %u",
+ show_dev_ino(__entry),
+ (unsigned long long)__entry->pos,
+ __entry->len,
+ __entry->flags)
+);
+
DECLARE_EVENT_CLASS(f2fs__page,
TP_PROTO(struct page *page, int type),