summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChao Yu <chao@kernel.org>2026-01-30 21:28:09 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2026-01-31 03:24:55 +0000
commitbc367775f60214312befa33f101b31fe74bba48a (patch)
tree275c266a72602c1600aaa6171ac53efae6edecfe /include
parent07de55cbf5762cb4a7e9e0db7aba5c10c8cfe079 (diff)
f2fs: introduce trace_f2fs_priority_update
This patch introduces two new tracepoints for debug purpose. Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/f2fs.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index c3b6b509472f..9364e6775562 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -2525,6 +2525,63 @@ TRACE_EVENT(f2fs_lock_elapsed_time,
__entry->other_time)
);
+DECLARE_EVENT_CLASS(f2fs_priority_update,
+
+ TP_PROTO(struct f2fs_sb_info *sbi, enum f2fs_lock_name lock_name,
+ bool is_write, struct task_struct *p, int orig_prio,
+ int new_prio),
+
+ TP_ARGS(sbi, lock_name, is_write, p, orig_prio, new_prio),
+
+ TP_STRUCT__entry(
+ __field(dev_t, dev)
+ __array(char, comm, TASK_COMM_LEN)
+ __field(pid_t, pid)
+ __field(unsigned int, lock_name)
+ __field(bool, is_write)
+ __field(int, orig_prio)
+ __field(int, new_prio)
+ ),
+
+ TP_fast_assign(
+ __entry->dev = sbi->sb->s_dev;
+ memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
+ __entry->pid = p->pid;
+ __entry->lock_name = lock_name;
+ __entry->is_write = is_write;
+ __entry->orig_prio = orig_prio;
+ __entry->new_prio = new_prio;
+ ),
+
+ TP_printk("dev = (%d,%d), comm: %s, pid: %d, lock_name: %s, "
+ "lock_type: %s, orig_prio: %d, new_prio: %d",
+ show_dev(__entry->dev),
+ __entry->comm,
+ __entry->pid,
+ show_lock_name(__entry->lock_name),
+ __entry->is_write ? "wlock" : "rlock",
+ __entry->orig_prio,
+ __entry->new_prio)
+);
+
+DEFINE_EVENT(f2fs_priority_update, f2fs_priority_uplift,
+
+ TP_PROTO(struct f2fs_sb_info *sbi, enum f2fs_lock_name lock_name,
+ bool is_write, struct task_struct *p, int orig_prio,
+ int new_prio),
+
+ TP_ARGS(sbi, lock_name, is_write, p, orig_prio, new_prio)
+);
+
+DEFINE_EVENT(f2fs_priority_update, f2fs_priority_restore,
+
+ TP_PROTO(struct f2fs_sb_info *sbi, enum f2fs_lock_name lock_name,
+ bool is_write, struct task_struct *p, int orig_prio,
+ int new_prio),
+
+ TP_ARGS(sbi, lock_name, is_write, p, orig_prio, new_prio)
+);
+
#endif /* _TRACE_F2FS_H */
/* This part must be outside protection */