X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fjbd2.h;h=872cf9e32707c56ffba60fc01c300a7bb8a7ca72;hb=7c68b363332170e4db100327ecc9e09b8a79cf29;hp=91e2e6c0d06dbf36ab9ac8e988ec8edf3ff97a1e;hpb=d3ac4d63d21c643df5b09d9d7888eb0c4122379c;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/jbd2.h b/instrumentation/events/lttng-module/jbd2.h index 91e2e6c0..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, @@ -25,8 +28,8 @@ TRACE_EVENT(jbd2_checkpoint, ), TP_fast_assign( - tp_assign(dev, journal->j_fs_dev->bd_dev); - tp_assign(result, result); + tp_assign(dev, journal->j_fs_dev->bd_dev) + tp_assign(result, result) ), TP_printk("dev %d,%d result %d", @@ -46,9 +49,9 @@ DECLARE_EVENT_CLASS(jbd2_commit, ), TP_fast_assign( - tp_assign(dev, journal->j_fs_dev->bd_dev); - tp_assign(sync_commit, commit_transaction->t_synchronous_commit); - tp_assign(transaction, commit_transaction->t_tid); + tp_assign(dev, journal->j_fs_dev->bd_dev) + tp_assign(sync_commit, commit_transaction->t_synchronous_commit) + tp_assign(transaction, commit_transaction->t_tid) ), TP_printk("dev %d,%d transaction %d sync %d", @@ -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), @@ -97,10 +109,10 @@ TRACE_EVENT(jbd2_end_commit, ), TP_fast_assign( - tp_assign(dev, journal->j_fs_dev->bd_dev); - tp_assign(sync_commit, commit_transaction->t_synchronous_commit); - tp_assign(transaction, commit_transaction->t_tid); - tp_assign(head, journal->j_tail_sequence); + tp_assign(dev, journal->j_fs_dev->bd_dev) + tp_assign(sync_commit, commit_transaction->t_synchronous_commit) + tp_assign(transaction, commit_transaction->t_tid) + tp_assign(head, journal->j_tail_sequence) ), TP_printk("dev %d,%d transaction %d sync %d head %d", @@ -119,8 +131,8 @@ TRACE_EVENT(jbd2_submit_inode_data, ), TP_fast_assign( - tp_assign(dev, inode->i_sb->s_dev); - tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev) + tp_assign(ino, inode->i_ino) ), TP_printk("dev %d,%d ino %lu", @@ -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 */