#include <linux/jbd.h>
#include <linux/tracepoint.h>
+#include <linux/version.h>
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",
),
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))
),
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))
),
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))
),
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))
),
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",
__entry->block_nr, __entry->freed)
)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+TRACE_EVENT_MAP(journal_write_superblock,
+
+ jbd_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),
),
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 */