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
),
19 __field( int, result
)
23 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
)
24 tp_assign(result
, result
)
27 TP_printk("dev %d,%d result %d",
28 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
32 LTTNG_TRACEPOINT_EVENT_CLASS(jbd_commit
,
34 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
36 TP_ARGS(journal
, commit_transaction
),
40 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
41 __field( char, sync_commit
)
43 __field( int, transaction
)
47 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
)
48 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
49 tp_assign(sync_commit
, commit_transaction
->t_synchronous_commit
)
51 tp_assign(transaction
, commit_transaction
->t_tid
)
54 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
55 TP_printk("dev %d,%d transaction %d sync %d",
56 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
57 __entry
->transaction
, __entry
->sync_commit
)
59 TP_printk("dev %d,%d transaction %d",
60 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
65 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_start_commit
,
67 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
69 TP_ARGS(journal
, commit_transaction
)
72 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_commit_locking
,
74 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
76 TP_ARGS(journal
, commit_transaction
)
79 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_commit_flushing
,
81 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
83 TP_ARGS(journal
, commit_transaction
)
86 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit
, jbd_commit_logging
,
88 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
90 TP_ARGS(journal
, commit_transaction
)
93 LTTNG_TRACEPOINT_EVENT(jbd_drop_transaction
,
95 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
97 TP_ARGS(journal
, commit_transaction
),
100 __field( dev_t
, dev
)
101 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
102 __field( char, sync_commit
)
104 __field( int, transaction
)
108 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
)
109 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
110 tp_assign(sync_commit
, commit_transaction
->t_synchronous_commit
)
112 tp_assign(transaction
, commit_transaction
->t_tid
)
115 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
116 TP_printk("dev %d,%d transaction %d sync %d",
117 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
118 __entry
->transaction
, __entry
->sync_commit
)
120 TP_printk("dev %d,%d transaction %d",
121 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
122 __entry
->transaction
)
126 LTTNG_TRACEPOINT_EVENT(jbd_end_commit
,
127 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
129 TP_ARGS(journal
, commit_transaction
),
132 __field( dev_t
, dev
)
133 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
134 __field( char, sync_commit
)
136 __field( int, transaction
)
141 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
)
142 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
143 tp_assign(sync_commit
, commit_transaction
->t_synchronous_commit
)
145 tp_assign(transaction
, commit_transaction
->t_tid
)
146 tp_assign(head
, journal
->j_tail_sequence
)
149 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
150 TP_printk("dev %d,%d transaction %d sync %d head %d",
151 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
152 __entry
->transaction
, __entry
->sync_commit
, __entry
->head
)
154 TP_printk("dev %d,%d transaction %d head %d",
155 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
156 __entry
->transaction
, __entry
->head
)
160 LTTNG_TRACEPOINT_EVENT(jbd_do_submit_data
,
161 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
163 TP_ARGS(journal
, commit_transaction
),
166 __field( dev_t
, dev
)
167 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
168 __field( char, sync_commit
)
170 __field( int, transaction
)
174 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
)
175 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
176 tp_assign(sync_commit
, commit_transaction
->t_synchronous_commit
)
178 tp_assign(transaction
, commit_transaction
->t_tid
)
181 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
182 TP_printk("dev %d,%d transaction %d sync %d",
183 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
184 __entry
->transaction
, __entry
->sync_commit
)
186 TP_printk("dev %d,%d transaction %d",
187 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
188 __entry
->transaction
)
192 LTTNG_TRACEPOINT_EVENT(jbd_cleanup_journal_tail
,
194 TP_PROTO(journal_t
*journal
, tid_t first_tid
,
195 unsigned long block_nr
, unsigned long freed
),
197 TP_ARGS(journal
, first_tid
, block_nr
, freed
),
200 __field( dev_t
, dev
)
201 __field( tid_t
, tail_sequence
)
202 __field( tid_t
, first_tid
)
203 __field(unsigned long, block_nr
)
204 __field(unsigned long, freed
)
208 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
)
209 tp_assign(tail_sequence
, journal
->j_tail_sequence
)
210 tp_assign(first_tid
, first_tid
)
211 tp_assign(block_nr
, block_nr
)
212 tp_assign(freed
, freed
)
215 TP_printk("dev %d,%d from %u to %u offset %lu freed %lu",
216 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
217 __entry
->tail_sequence
, __entry
->first_tid
,
218 __entry
->block_nr
, __entry
->freed
)
221 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
222 LTTNG_TRACEPOINT_EVENT_MAP(journal_write_superblock
,
224 jbd_journal_write_superblock
,
226 TP_PROTO(journal_t
*journal
, int write_op
),
228 TP_ARGS(journal
, write_op
),
231 __field( dev_t
, dev
)
232 __field( int, write_op
)
236 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
)
237 tp_assign(write_op
, write_op
)
240 TP_printk("dev %d,%d write_op %x", MAJOR(__entry
->dev
),
241 MINOR(__entry
->dev
), __entry
->write_op
)
244 LTTNG_TRACEPOINT_EVENT(jbd_update_superblock_end
,
245 TP_PROTO(journal_t
*journal
, int wait
),
247 TP_ARGS(journal
, wait
),
250 __field( dev_t
, dev
)
255 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
)
256 tp_assign(wait
, wait
)
259 TP_printk("dev %d,%d wait %d",
260 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
265 #endif /* LTTNG_TRACE_JBD_H */
267 /* This part must be outside protection */
268 #include "../../../probes/define_trace.h"