2 #define TRACE_SYSTEM jbd
4 #if !defined(_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ)
8 #include <linux/tracepoint.h>
10 TRACE_EVENT(jbd_checkpoint
,
12 TP_PROTO(journal_t
*journal
, int result
),
14 TP_ARGS(journal
, result
),
18 __field( int, result
)
22 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
);
23 tp_assign(result
, result
);
26 TP_printk("dev %d,%d result %d",
27 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
31 DECLARE_EVENT_CLASS(jbd_commit
,
33 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
35 TP_ARGS(journal
, commit_transaction
),
39 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
40 __field( char, sync_commit
)
42 __field( int, transaction
)
46 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
);
47 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
48 tp_assign(sync_commit
, commit_transaction
->t_synchronous_commit
);
50 tp_assign(transaction
, commit_transaction
->t_tid
);
53 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
54 TP_printk("dev %d,%d transaction %d sync %d",
55 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
56 __entry
->transaction
, __entry
->sync_commit
)
58 TP_printk("dev %d,%d transaction %d",
59 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
64 DEFINE_EVENT(jbd_commit
, jbd_start_commit
,
66 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
68 TP_ARGS(journal
, commit_transaction
)
71 DEFINE_EVENT(jbd_commit
, jbd_commit_locking
,
73 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
75 TP_ARGS(journal
, commit_transaction
)
78 DEFINE_EVENT(jbd_commit
, jbd_commit_flushing
,
80 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
82 TP_ARGS(journal
, commit_transaction
)
85 DEFINE_EVENT(jbd_commit
, jbd_commit_logging
,
87 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
89 TP_ARGS(journal
, commit_transaction
)
92 TRACE_EVENT(jbd_drop_transaction
,
94 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
96 TP_ARGS(journal
, commit_transaction
),
100 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
101 __field( char, sync_commit
)
103 __field( int, transaction
)
107 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
);
108 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
109 tp_assign(sync_commit
, commit_transaction
->t_synchronous_commit
);
111 tp_assign(transaction
, commit_transaction
->t_tid
);
114 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
115 TP_printk("dev %d,%d transaction %d sync %d",
116 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
117 __entry
->transaction
, __entry
->sync_commit
)
119 TP_printk("dev %d,%d transaction %d",
120 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
121 __entry
->transaction
)
125 TRACE_EVENT(jbd_end_commit
,
126 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
128 TP_ARGS(journal
, commit_transaction
),
131 __field( dev_t
, dev
)
132 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
133 __field( char, sync_commit
)
135 __field( int, transaction
)
140 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
);
141 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
142 tp_assign(sync_commit
, commit_transaction
->t_synchronous_commit
);
144 tp_assign(transaction
, commit_transaction
->t_tid
);
145 tp_assign(head
, journal
->j_tail_sequence
);
148 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
149 TP_printk("dev %d,%d transaction %d sync %d head %d",
150 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
151 __entry
->transaction
, __entry
->sync_commit
, __entry
->head
)
153 TP_printk("dev %d,%d transaction %d head %d",
154 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
155 __entry
->transaction
, __entry
->head
)
159 TRACE_EVENT(jbd_do_submit_data
,
160 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
162 TP_ARGS(journal
, commit_transaction
),
165 __field( dev_t
, dev
)
166 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
167 __field( char, sync_commit
)
169 __field( int, transaction
)
173 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
);
174 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
175 tp_assign(sync_commit
, commit_transaction
->t_synchronous_commit
);
177 tp_assign(transaction
, commit_transaction
->t_tid
);
180 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
181 TP_printk("dev %d,%d transaction %d sync %d",
182 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
183 __entry
->transaction
, __entry
->sync_commit
)
185 TP_printk("dev %d,%d transaction %d",
186 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
187 __entry
->transaction
)
191 TRACE_EVENT(jbd_cleanup_journal_tail
,
193 TP_PROTO(journal_t
*journal
, tid_t first_tid
,
194 unsigned long block_nr
, unsigned long freed
),
196 TP_ARGS(journal
, first_tid
, block_nr
, freed
),
199 __field( dev_t
, dev
)
200 __field( tid_t
, tail_sequence
)
201 __field( tid_t
, first_tid
)
202 __field(unsigned long, block_nr
)
203 __field(unsigned long, freed
)
207 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
);
208 tp_assign(tail_sequence
, journal
->j_tail_sequence
);
209 tp_assign(first_tid
, first_tid
);
210 tp_assign(block_nr
, block_nr
);
211 tp_assign(freed
, freed
);
214 TP_printk("dev %d,%d from %u to %u offset %lu freed %lu",
215 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
216 __entry
->tail_sequence
, __entry
->first_tid
,
217 __entry
->block_nr
, __entry
->freed
)
220 TRACE_EVENT(jbd_update_superblock_end
,
221 TP_PROTO(journal_t
*journal
, int wait
),
223 TP_ARGS(journal
, wait
),
226 __field( dev_t
, dev
)
231 tp_assign(dev
, journal
->j_fs_dev
->bd_dev
);
232 tp_assign(wait
, wait
);
235 TP_printk("dev %d,%d wait %d",
236 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
240 #endif /* _TRACE_JBD_H */
242 /* This part must be outside protection */
243 #include "../../../probes/define_trace.h"