X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fjbd.h;h=570bdacf08254741a307b6e4863f8e7d738690ec;hb=7c68b363332170e4db100327ecc9e09b8a79cf29;hp=97ba1e59ff5ba9d97027769e850a1be861530b4a;hpb=b283666ff19841a28b0448c6a867beb2f809f11a;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/jbd.h b/instrumentation/events/lttng-module/jbd.h index 97ba1e59..570bdacf 100644 --- a/instrumentation/events/lttng-module/jbd.h +++ b/instrumentation/events/lttng-module/jbd.h @@ -6,6 +6,7 @@ #include #include +#include TRACE_EVENT(jbd_checkpoint, @@ -19,8 +20,8 @@ TRACE_EVENT(jbd_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", @@ -43,11 +44,11 @@ DECLARE_EVENT_CLASS(jbd_commit, ), TP_fast_assign( - tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(dev, journal->j_fs_dev->bd_dev) #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) - tp_assign(sync_commit, commit_transaction->t_synchronous_commit); + tp_assign(sync_commit, commit_transaction->t_synchronous_commit) #endif - tp_assign(transaction, commit_transaction->t_tid); + tp_assign(transaction, commit_transaction->t_tid) ), #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) @@ -104,11 +105,11 @@ TRACE_EVENT(jbd_drop_transaction, ), TP_fast_assign( - tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(dev, journal->j_fs_dev->bd_dev) #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) - tp_assign(sync_commit, commit_transaction->t_synchronous_commit); + tp_assign(sync_commit, commit_transaction->t_synchronous_commit) #endif - tp_assign(transaction, commit_transaction->t_tid); + tp_assign(transaction, commit_transaction->t_tid) ), #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) @@ -137,12 +138,12 @@ TRACE_EVENT(jbd_end_commit, ), TP_fast_assign( - tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(dev, journal->j_fs_dev->bd_dev) #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) - tp_assign(sync_commit, commit_transaction->t_synchronous_commit); + tp_assign(sync_commit, commit_transaction->t_synchronous_commit) #endif - tp_assign(transaction, commit_transaction->t_tid); - tp_assign(head, journal->j_tail_sequence); + tp_assign(transaction, commit_transaction->t_tid) + tp_assign(head, journal->j_tail_sequence) ), #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) @@ -170,11 +171,11 @@ TRACE_EVENT(jbd_do_submit_data, ), TP_fast_assign( - tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(dev, journal->j_fs_dev->bd_dev) #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) - tp_assign(sync_commit, commit_transaction->t_synchronous_commit); + tp_assign(sync_commit, commit_transaction->t_synchronous_commit) #endif - tp_assign(transaction, commit_transaction->t_tid); + tp_assign(transaction, commit_transaction->t_tid) ), #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) @@ -204,11 +205,11 @@ TRACE_EVENT(jbd_cleanup_journal_tail, ), TP_fast_assign( - tp_assign(dev, journal->j_fs_dev->bd_dev); - tp_assign(tail_sequence, journal->j_tail_sequence); - tp_assign(first_tid, first_tid); - tp_assign(block_nr, block_nr); - tp_assign(freed, freed); + tp_assign(dev, journal->j_fs_dev->bd_dev) + tp_assign(tail_sequence, journal->j_tail_sequence) + tp_assign(first_tid, first_tid) + tp_assign(block_nr, block_nr) + tp_assign(freed, freed) ), TP_printk("dev %d,%d from %u to %u offset %lu freed %lu", @@ -217,6 +218,26 @@ TRACE_EVENT(jbd_cleanup_journal_tail, __entry->block_nr, __entry->freed) ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) +TRACE_EVENT(journal_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) +) +#else TRACE_EVENT(jbd_update_superblock_end, TP_PROTO(journal_t *journal, int wait), @@ -228,14 +249,15 @@ TRACE_EVENT(jbd_update_superblock_end, ), TP_fast_assign( - tp_assign(dev, journal->j_fs_dev->bd_dev); - tp_assign(wait, wait); + tp_assign(dev, journal->j_fs_dev->bd_dev) + tp_assign(wait, wait) ), TP_printk("dev %d,%d wait %d", MAJOR(__entry->dev), MINOR(__entry->dev), __entry->wait) ) +#endif #endif /* _TRACE_JBD_H */