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 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
23 __entry
->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 __field( int, transaction
)
43 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
44 __entry
->transaction
= commit_transaction
->t_tid
;
47 TP_printk("dev %d,%d transaction %d",
48 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
52 DEFINE_EVENT(jbd_commit
, jbd_start_commit
,
54 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
56 TP_ARGS(journal
, commit_transaction
)
59 DEFINE_EVENT(jbd_commit
, jbd_commit_locking
,
61 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
63 TP_ARGS(journal
, commit_transaction
)
66 DEFINE_EVENT(jbd_commit
, jbd_commit_flushing
,
68 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
70 TP_ARGS(journal
, commit_transaction
)
73 DEFINE_EVENT(jbd_commit
, jbd_commit_logging
,
75 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
77 TP_ARGS(journal
, commit_transaction
)
80 TRACE_EVENT(jbd_drop_transaction
,
82 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
84 TP_ARGS(journal
, commit_transaction
),
88 __field( int, transaction
)
92 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
93 __entry
->transaction
= commit_transaction
->t_tid
;
96 TP_printk("dev %d,%d transaction %d",
97 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
101 TRACE_EVENT(jbd_end_commit
,
102 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
104 TP_ARGS(journal
, commit_transaction
),
107 __field( dev_t
, dev
)
108 __field( int, transaction
)
113 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
114 __entry
->transaction
= commit_transaction
->t_tid
;
115 __entry
->head
= journal
->j_tail_sequence
;
118 TP_printk("dev %d,%d transaction %d head %d",
119 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
120 __entry
->transaction
, __entry
->head
)
123 TRACE_EVENT(jbd_do_submit_data
,
124 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
126 TP_ARGS(journal
, commit_transaction
),
129 __field( dev_t
, dev
)
130 __field( int, transaction
)
134 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
135 __entry
->transaction
= commit_transaction
->t_tid
;
138 TP_printk("dev %d,%d transaction %d",
139 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
140 __entry
->transaction
)
143 TRACE_EVENT(jbd_cleanup_journal_tail
,
145 TP_PROTO(journal_t
*journal
, tid_t first_tid
,
146 unsigned long block_nr
, unsigned long freed
),
148 TP_ARGS(journal
, first_tid
, block_nr
, freed
),
151 __field( dev_t
, dev
)
152 __field( tid_t
, tail_sequence
)
153 __field( tid_t
, first_tid
)
154 __field(unsigned long, block_nr
)
155 __field(unsigned long, freed
)
159 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
160 __entry
->tail_sequence
= journal
->j_tail_sequence
;
161 __entry
->first_tid
= first_tid
;
162 __entry
->block_nr
= block_nr
;
163 __entry
->freed
= freed
;
166 TP_printk("dev %d,%d from %u to %u offset %lu freed %lu",
167 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
168 __entry
->tail_sequence
, __entry
->first_tid
,
169 __entry
->block_nr
, __entry
->freed
)
172 TRACE_EVENT(journal_write_superblock
,
173 TP_PROTO(journal_t
*journal
, int write_op
),
175 TP_ARGS(journal
, write_op
),
178 __field( dev_t
, dev
)
179 __field( int, write_op
)
183 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
184 __entry
->write_op
= write_op
;
187 TP_printk("dev %d,%d write_op %x", MAJOR(__entry
->dev
),
188 MINOR(__entry
->dev
), __entry
->write_op
)
191 #endif /* _TRACE_JBD_H */
193 /* This part must be outside protection */
194 #include <trace/define_trace.h>