X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fjbd.h;h=d1da49a09733deef55adb7361b430a5d4d317ccd;hb=290d1667a36ec7b568ca6acfec732ffd62b4e67f;hp=b6bd64ac14395a3f7cfbe1633e538abea281dfd3;hpb=d3ac4d63d21c643df5b09d9d7888eb0c4122379c;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/jbd.h b/instrumentation/events/lttng-module/jbd.h index b6bd64ac..d1da49a0 100644 --- a/instrumentation/events/lttng-module/jbd.h +++ b/instrumentation/events/lttng-module/jbd.h @@ -1,13 +1,14 @@ #undef TRACE_SYSTEM #define TRACE_SYSTEM jbd -#if !defined(_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_JBD_H +#if !defined(LTTNG_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ) +#define LTTNG_TRACE_JBD_H +#include "../../../probes/lttng-tracepoint-event.h" #include -#include +#include -TRACE_EVENT(jbd_checkpoint, +LTTNG_TRACEPOINT_EVENT(jbd_checkpoint, TP_PROTO(journal_t *journal, int result), @@ -28,7 +29,7 @@ TRACE_EVENT(jbd_checkpoint, __entry->result) ) -DECLARE_EVENT_CLASS(jbd_commit, +LTTNG_TRACEPOINT_EVENT_CLASS(jbd_commit, TP_PROTO(journal_t *journal, transaction_t *commit_transaction), @@ -61,35 +62,35 @@ DECLARE_EVENT_CLASS(jbd_commit, #endif ) -DEFINE_EVENT(jbd_commit, jbd_start_commit, +LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_start_commit, TP_PROTO(journal_t *journal, transaction_t *commit_transaction), TP_ARGS(journal, commit_transaction) ) -DEFINE_EVENT(jbd_commit, jbd_commit_locking, +LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_locking, TP_PROTO(journal_t *journal, transaction_t *commit_transaction), TP_ARGS(journal, commit_transaction) ) -DEFINE_EVENT(jbd_commit, jbd_commit_flushing, +LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_flushing, TP_PROTO(journal_t *journal, transaction_t *commit_transaction), TP_ARGS(journal, commit_transaction) ) -DEFINE_EVENT(jbd_commit, jbd_commit_logging, +LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_logging, TP_PROTO(journal_t *journal, transaction_t *commit_transaction), TP_ARGS(journal, commit_transaction) ) -TRACE_EVENT(jbd_drop_transaction, +LTTNG_TRACEPOINT_EVENT(jbd_drop_transaction, TP_PROTO(journal_t *journal, transaction_t *commit_transaction), @@ -122,7 +123,7 @@ TRACE_EVENT(jbd_drop_transaction, #endif ) -TRACE_EVENT(jbd_end_commit, +LTTNG_TRACEPOINT_EVENT(jbd_end_commit, TP_PROTO(journal_t *journal, transaction_t *commit_transaction), TP_ARGS(journal, commit_transaction), @@ -156,7 +157,7 @@ TRACE_EVENT(jbd_end_commit, #endif ) -TRACE_EVENT(jbd_do_submit_data, +LTTNG_TRACEPOINT_EVENT(jbd_do_submit_data, TP_PROTO(journal_t *journal, transaction_t *commit_transaction), TP_ARGS(journal, commit_transaction), @@ -188,7 +189,7 @@ TRACE_EVENT(jbd_do_submit_data, #endif ) -TRACE_EVENT(jbd_cleanup_journal_tail, +LTTNG_TRACEPOINT_EVENT(jbd_cleanup_journal_tail, TP_PROTO(journal_t *journal, tid_t first_tid, unsigned long block_nr, unsigned long freed), @@ -217,7 +218,30 @@ TRACE_EVENT(jbd_cleanup_journal_tail, __entry->block_nr, __entry->freed) ) -TRACE_EVENT(jbd_update_superblock_end, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) +LTTNG_TRACEPOINT_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 +LTTNG_TRACEPOINT_EVENT(jbd_update_superblock_end, TP_PROTO(journal_t *journal, int wait), TP_ARGS(journal, wait), @@ -236,8 +260,9 @@ TRACE_EVENT(jbd_update_superblock_end, MAJOR(__entry->dev), MINOR(__entry->dev), __entry->wait) ) +#endif -#endif /* _TRACE_JBD_H */ +#endif /* LTTNG_TRACE_JBD_H */ /* This part must be outside protection */ #include "../../../probes/define_trace.h"