)
#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
-#define WB_WORK_REASON \
- {WB_REASON_BACKGROUND, "background"}, \
- {WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages"}, \
- {WB_REASON_SYNC, "sync"}, \
- {WB_REASON_PERIODIC, "periodic"}, \
- {WB_REASON_LAPTOP_TIMER, "laptop_timer"}, \
- {WB_REASON_FREE_MORE_MEM, "free_more_memory"}, \
- {WB_REASON_FS_FREE_SPACE, "fs_free_space"}, \
- {WB_REASON_FORKER_THREAD, "forker_thread"}
-#endif
-
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
LTTNG_TRACEPOINT_EVENT(writeback_dirty_page,
TP_FIELDS(
ctf_array_text(char, bdi, dev_name(bdi->dev), 32)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
+ ctf_integer(unsigned long, write_bw, KBps(bdi->wb.write_bandwidth))
+ ctf_integer(unsigned long, avg_write_bw, KBps(bdi->wb.avg_write_bandwidth))
+#else
ctf_integer(unsigned long, write_bw, KBps(bdi->write_bandwidth))
ctf_integer(unsigned long, avg_write_bw, KBps(bdi->avg_write_bandwidth))
+#endif
ctf_integer(unsigned long, dirty_rate, KBps(dirty_rate))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
+ ctf_integer(unsigned long, dirty_ratelimit, KBps(bdi->wb.dirty_ratelimit))
+#else
ctf_integer(unsigned long, dirty_ratelimit, KBps(bdi->dirty_ratelimit))
+#endif
ctf_integer(unsigned long, task_ratelimit, KBps(task_ratelimit))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
+ ctf_integer(unsigned long, balanced_dirty_ratelimit,
+ KBps(bdi->wb.balanced_dirty_ratelimit))
+#else
ctf_integer(unsigned long, balanced_dirty_ratelimit,
KBps(bdi->balanced_dirty_ratelimit))
+#endif
)
)