Update kernel probes to more detailed match to kernel versions
[lttng-modules.git] / instrumentation / events / lttng-module / jbd2.h
index c7992c0e2a02452cb85d243b6ca6ac6bfaa989d6..872cf9e32707c56ffba60fc01c300a7bb8a7ca72 100644 (file)
@@ -6,12 +6,15 @@
 
 #include <linux/jbd2.h>
 #include <linux/tracepoint.h>
+#include <linux/version.h>
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
 #ifndef _TRACE_JBD2_DEF
 #define _TRACE_JBD2_DEF
 struct transaction_chp_stats_s;
 struct transaction_run_stats_s;
 #endif
+#endif
 
 TRACE_EVENT(jbd2_checkpoint,
 
@@ -84,6 +87,15 @@ DEFINE_EVENT(jbd2_commit, jbd2_commit_logging,
        TP_ARGS(journal, commit_transaction)
 )
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+DEFINE_EVENT(jbd2_commit, jbd2_drop_transaction,
+
+       TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
+
+       TP_ARGS(journal, commit_transaction)
+)
+#endif
+
 TRACE_EVENT(jbd2_end_commit,
        TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
 
@@ -128,6 +140,7 @@ TRACE_EVENT(jbd2_submit_inode_data,
                  (unsigned long) __entry->ino)
 )
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
 TRACE_EVENT(jbd2_run_stats,
        TP_PROTO(dev_t dev, unsigned long tid,
                 struct transaction_run_stats_s *stats),
@@ -202,8 +215,14 @@ TRACE_EVENT(jbd2_checkpoint_stats,
                  jiffies_to_msecs(__entry->chp_time),
                  __entry->forced_to_close, __entry->written, __entry->dropped)
 )
+#endif
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+TRACE_EVENT(jbd2_update_log_tail,
+#else
 TRACE_EVENT(jbd2_cleanup_journal_tail,
+#endif
 
        TP_PROTO(journal_t *journal, tid_t first_tid,
                 unsigned long block_nr, unsigned long freed),
@@ -231,6 +250,29 @@ TRACE_EVENT(jbd2_cleanup_journal_tail,
                  __entry->tail_sequence, __entry->first_tid,
                  __entry->block_nr, __entry->freed)
 )
+#endif
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+TRACE_EVENT(jbd2_write_superblock,
+
+       TP_PROTO(journal_t *journal, int write_op),
+
+       TP_ARGS(journal, write_op),
+
+       TP_STRUCT__entry(
+               __field(        dev_t,  dev                     )
+               __field(          int,  write_op                )
+       ),
+
+       TP_fast_assign(
+               tp_assign(dev, journal->j_fs_dev->bd_dev)
+               tp_assign(write_op, write_op)
+       ),
+
+       TP_printk("dev %d,%d write_op %x", MAJOR(__entry->dev),
+                 MINOR(__entry->dev), __entry->write_op)
+)
+#endif
 
 #endif /* _TRACE_JBD2_H */
 
This page took 0.023941 seconds and 4 git commands to generate.