2 #define TRACE_SYSTEM jbd
4 #if !defined(LTTNG_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_JBD_H
7 #include <probes/lttng-tracepoint-event.h>
9 #include <linux/version.h>
11 LTTNG_TRACEPOINT_EVENT(jbd_checkpoint
,
13 TP_PROTO(journal_t
*journal
, int result
),
15 TP_ARGS(journal
, result
),
18 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
19 ctf_integer(int, result
, result
)
23 LTTNG_TRACEPOINT_EVENT_CLASS(jbd_commit
,
25 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
27 TP_ARGS(journal
, commit_transaction
),
30 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
31 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
32 ctf_integer(char, sync_commit
, commit_transaction
->t_synchronous_commit
)
34 ctf_integer(int, transaction
, commit_transaction
->t_tid
)
38 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_start_commit
,
40 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
42 TP_ARGS(journal
, commit_transaction
)
45 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_commit_locking
,
47 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
49 TP_ARGS(journal
, commit_transaction
)
52 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_commit_flushing
,
54 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
56 TP_ARGS(journal
, commit_transaction
)
59 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_commit_logging
,
61 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
63 TP_ARGS(journal
, commit_transaction
)
66 LTTNG_TRACEPOINT_EVENT(jbd_drop_transaction
,
68 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
70 TP_ARGS(journal
, commit_transaction
),
73 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
74 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
75 ctf_integer(char, sync_commit
, commit_transaction
->t_synchronous_commit
)
77 ctf_integer(int, transaction
, commit_transaction
->t_tid
)
81 LTTNG_TRACEPOINT_EVENT(jbd_end_commit
,
82 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
84 TP_ARGS(journal
, commit_transaction
),
87 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
88 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
89 ctf_integer(char, sync_commit
, commit_transaction
->t_synchronous_commit
)
91 ctf_integer(int, transaction
, commit_transaction
->t_tid
)
92 ctf_integer(int, head
, journal
->j_tail_sequence
)
96 LTTNG_TRACEPOINT_EVENT(jbd_do_submit_data
,
97 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
99 TP_ARGS(journal
, commit_transaction
),
102 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
103 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
104 ctf_integer(char, sync_commit
, commit_transaction
->t_synchronous_commit
)
106 ctf_integer(int, transaction
, commit_transaction
->t_tid
)
110 LTTNG_TRACEPOINT_EVENT(jbd_cleanup_journal_tail
,
112 TP_PROTO(journal_t
*journal
, tid_t first_tid
,
113 unsigned long block_nr
, unsigned long freed
),
115 TP_ARGS(journal
, first_tid
, block_nr
, freed
),
118 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
119 ctf_integer(tid_t
, tail_sequence
, journal
->j_tail_sequence
)
120 ctf_integer(tid_t
, first_tid
, first_tid
)
121 ctf_integer(unsigned long, block_nr
, block_nr
)
122 ctf_integer(unsigned long, freed
, freed
)
126 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
127 LTTNG_TRACEPOINT_EVENT_MAP(journal_write_superblock
,
129 jbd_journal_write_superblock
,
131 TP_PROTO(journal_t
*journal
, int write_op
),
133 TP_ARGS(journal
, write_op
),
136 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
137 ctf_integer(int, write_op
, write_op
)
141 LTTNG_TRACEPOINT_EVENT(jbd_update_superblock_end
,
142 TP_PROTO(journal_t
*journal
, int wait
),
144 TP_ARGS(journal
, wait
),
147 ctf_integer(dev_t
, dev
, journal
->j_fs_dev
->bd_dev
)
148 ctf_integer(int, wait
, wait
)
153 #endif /* LTTNG_TRACE_JBD_H */
155 /* This part must be outside protection */
156 #include <probes/define_trace.h>