X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fjbd2.h;h=872cf9e32707c56ffba60fc01c300a7bb8a7ca72;hb=7c68b363332170e4db100327ecc9e09b8a79cf29;hp=c7992c0e2a02452cb85d243b6ca6ac6bfaa989d6;hpb=83788d81815146024200cba5aa46c705a05d6b99;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/jbd2.h b/instrumentation/events/lttng-module/jbd2.h index c7992c0e..872cf9e3 100644 --- a/instrumentation/events/lttng-module/jbd2.h +++ b/instrumentation/events/lttng-module/jbd2.h @@ -6,12 +6,15 @@ #include #include +#include +#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 */