Cleanup: Move headers from probes/ to include/lttng/
[lttng-modules.git] / instrumentation / events / lttng-module / writeback.h
index 6006c2945fecdc61f71bc62afdba025f0aaf98cb..fd898c511f51cb6660cb0e80c9c447d3868c9726 100644 (file)
@@ -1,10 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM writeback
 
 #if !defined(LTTNG_TRACE_WRITEBACK_H) || defined(TRACE_HEADER_MULTI_READ)
 #define LTTNG_TRACE_WRITEBACK_H
 
-#include <probes/lttng-tracepoint-event.h>
+#include <lttng/tracepoint-event.h>
 #include <linux/tracepoint.h>
 #include <linux/backing-dev.h>
 #include <linux/writeback.h>
@@ -307,9 +308,7 @@ DEFINE_WRITEBACK_EVENT(writeback_bdi_register)
 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
 
 DEFINE_WRITEBACK_EVENT(writeback_nowork)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
 DEFINE_WRITEBACK_EVENT(writeback_wake_background)
-#endif
 DEFINE_WRITEBACK_EVENT(writeback_wake_thread)
 DEFINE_WRITEBACK_EVENT(writeback_wake_forker_thread)
 DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister)
@@ -400,6 +399,31 @@ LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
        )
 )
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,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_unstable, global_node_page_state(NR_UNSTABLE_NFS))
+               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)
+       )
+)
+#else
 LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
 
        writeback_global_dirty_state,
@@ -424,6 +448,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
        )
 )
 #endif
+#endif
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
 
@@ -634,7 +659,6 @@ LTTNG_TRACEPOINT_EVENT(writeback_sb_inodes_requeue,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_congest_waited_template,
 
        TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),
@@ -660,7 +684,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_congest_waited_template, writeback_wai
 
        TP_ARGS(usec_timeout, usec_delayed)
 )
-#endif
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_single_inode_template,
@@ -706,4 +729,4 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_single_inode_template, writeback_singl
 #endif /* LTTNG_TRACE_WRITEBACK_H */
 
 /* This part must be outside protection */
-#include <probes/define_trace.h>
+#include <lttng/define_trace.h>
This page took 0.028279 seconds and 4 git commands to generate.