fix: writeback: Drop I_DIRTY_TIME_EXPIRE (v5.9)
[lttng-modules.git] / instrumentation / events / lttng-module / writeback.h
index feef94503d8376f7d08aa364c46843887d91a9a3..ece67ad5d86866029dc0c9f7453438be080476ff 100644 (file)
@@ -46,7 +46,21 @@ static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode)
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
+#define show_inode_state(state)                                        \
+       __print_flags(state, "|",                               \
+               {I_DIRTY_SYNC,          "I_DIRTY_SYNC"},        \
+               {I_DIRTY_DATASYNC,      "I_DIRTY_DATASYNC"},    \
+               {I_DIRTY_PAGES,         "I_DIRTY_PAGES"},       \
+               {I_NEW,                 "I_NEW"},               \
+               {I_WILL_FREE,           "I_WILL_FREE"},         \
+               {I_FREEING,             "I_FREEING"},           \
+               {I_CLEAR,               "I_CLEAR"},             \
+               {I_SYNC,                "I_SYNC"},              \
+               {I_DIRTY_TIME,          "I_DIRTY_TIME"},        \
+               {I_REFERENCED,          "I_REFERENCED"}         \
+       )
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
 #define show_inode_state(state)                                        \
        __print_flags(state, "|",                               \
                {I_DIRTY_SYNC,          "I_DIRTY_SYNC"},        \
@@ -399,7 +413,30 @@ LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
+
+       writeback_global_dirty_state,
+
+       TP_PROTO(unsigned long background_thresh,
+                unsigned long dirty_thresh
+       ),
+
+       TP_ARGS(background_thresh,
+               dirty_thresh
+       ),
+
+       TP_FIELDS(
+               ctf_integer(unsigned long, nr_dirty, global_node_page_state(NR_FILE_DIRTY))
+               ctf_integer(unsigned long, nr_writeback, global_node_page_state(NR_WRITEBACK))
+               ctf_integer(unsigned long, nr_dirtied, global_node_page_state(NR_DIRTIED))
+               ctf_integer(unsigned long, nr_written, global_node_page_state(NR_WRITTEN))
+               ctf_integer(unsigned long, background_thresh, background_thresh)
+               ctf_integer(unsigned long, dirty_thresh, dirty_thresh)
+               ctf_integer(unsigned long, dirty_limit, global_dirty_limit)
+       )
+)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
 LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
 
        writeback_global_dirty_state,
This page took 0.024126 seconds and 4 git commands to generate.