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( char, sync_commit
)
40 __field( int, transaction
)
44 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
45 __entry
->sync_commit
= commit_transaction
->t_synchronous_commit
;
46 __entry
->transaction
= commit_transaction
->t_tid
;
49 TP_printk("dev %d,%d transaction %d sync %d",
50 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
51 __entry
->transaction
, __entry
->sync_commit
)
54 DEFINE_EVENT(jbd_commit
, jbd_start_commit
,
56 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
58 TP_ARGS(journal
, commit_transaction
)
61 DEFINE_EVENT(jbd_commit
, jbd_commit_locking
,
63 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
65 TP_ARGS(journal
, commit_transaction
)
68 DEFINE_EVENT(jbd_commit
, jbd_commit_flushing
,
70 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
72 TP_ARGS(journal
, commit_transaction
)
75 DEFINE_EVENT(jbd_commit
, jbd_commit_logging
,
77 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
79 TP_ARGS(journal
, commit_transaction
)
82 TRACE_EVENT(jbd_drop_transaction
,
84 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
86 TP_ARGS(journal
, commit_transaction
),
90 __field( char, sync_commit
)
91 __field( int, transaction
)
95 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
96 __entry
->sync_commit
= commit_transaction
->t_synchronous_commit
;
97 __entry
->transaction
= commit_transaction
->t_tid
;
100 TP_printk("dev %d,%d transaction %d sync %d",
101 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
102 __entry
->transaction
, __entry
->sync_commit
)
105 TRACE_EVENT(jbd_end_commit
,
106 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
108 TP_ARGS(journal
, commit_transaction
),
111 __field( dev_t
, dev
)
112 __field( char, sync_commit
)
113 __field( int, transaction
)
118 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
119 __entry
->sync_commit
= commit_transaction
->t_synchronous_commit
;
120 __entry
->transaction
= commit_transaction
->t_tid
;
121 __entry
->head
= journal
->j_tail_sequence
;
124 TP_printk("dev %d,%d transaction %d sync %d head %d",
125 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
126 __entry
->transaction
, __entry
->sync_commit
, __entry
->head
)
129 TRACE_EVENT(jbd_do_submit_data
,
130 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
132 TP_ARGS(journal
, commit_transaction
),
135 __field( dev_t
, dev
)
136 __field( char, sync_commit
)
137 __field( int, transaction
)
141 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
142 __entry
->sync_commit
= commit_transaction
->t_synchronous_commit
;
143 __entry
->transaction
= commit_transaction
->t_tid
;
146 TP_printk("dev %d,%d transaction %d sync %d",
147 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
148 __entry
->transaction
, __entry
->sync_commit
)
151 TRACE_EVENT(jbd_cleanup_journal_tail
,
153 TP_PROTO(journal_t
*journal
, tid_t first_tid
,
154 unsigned long block_nr
, unsigned long freed
),
156 TP_ARGS(journal
, first_tid
, block_nr
, freed
),
159 __field( dev_t
, dev
)
160 __field( tid_t
, tail_sequence
)
161 __field( tid_t
, first_tid
)
162 __field(unsigned long, block_nr
)
163 __field(unsigned long, freed
)
167 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
168 __entry
->tail_sequence
= journal
->j_tail_sequence
;
169 __entry
->first_tid
= first_tid
;
170 __entry
->block_nr
= block_nr
;
171 __entry
->freed
= freed
;
174 TP_printk("dev %d,%d from %u to %u offset %lu freed %lu",
175 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
176 __entry
->tail_sequence
, __entry
->first_tid
,
177 __entry
->block_nr
, __entry
->freed
)
180 TRACE_EVENT(jbd_update_superblock_end
,
181 TP_PROTO(journal_t
*journal
, int wait
),
183 TP_ARGS(journal
, wait
),
186 __field( dev_t
, dev
)
191 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
192 __entry
->wait
= wait
;
195 TP_printk("dev %d,%d wait %d",
196 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
200 #endif /* _TRACE_JBD_H */
202 /* This part must be outside protection */
203 #include <trace/define_trace.h>