2 #define TRACE_SYSTEM jbd2
4 #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ)
7 #include <linux/jbd2.h>
8 #include <linux/tracepoint.h>
10 struct transaction_chp_stats_s
;
11 struct transaction_run_stats_s
;
13 TRACE_EVENT(jbd2_checkpoint
,
15 TP_PROTO(journal_t
*journal
, int result
),
17 TP_ARGS(journal
, result
),
21 __field( int, result
)
25 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
26 __entry
->result
= result
;
29 TP_printk("dev %d,%d result %d",
30 MAJOR(__entry
->dev
), MINOR(__entry
->dev
), __entry
->result
)
33 DECLARE_EVENT_CLASS(jbd2_commit
,
35 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
37 TP_ARGS(journal
, commit_transaction
),
41 __field( char, sync_commit
)
42 __field( int, transaction
)
46 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
47 __entry
->sync_commit
= commit_transaction
->t_synchronous_commit
;
48 __entry
->transaction
= commit_transaction
->t_tid
;
51 TP_printk("dev %d,%d transaction %d sync %d",
52 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
53 __entry
->transaction
, __entry
->sync_commit
)
56 DEFINE_EVENT(jbd2_commit
, jbd2_start_commit
,
58 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
60 TP_ARGS(journal
, commit_transaction
)
63 DEFINE_EVENT(jbd2_commit
, jbd2_commit_locking
,
65 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
67 TP_ARGS(journal
, commit_transaction
)
70 DEFINE_EVENT(jbd2_commit
, jbd2_commit_flushing
,
72 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
74 TP_ARGS(journal
, commit_transaction
)
77 DEFINE_EVENT(jbd2_commit
, jbd2_commit_logging
,
79 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
81 TP_ARGS(journal
, commit_transaction
)
84 DEFINE_EVENT(jbd2_commit
, jbd2_drop_transaction
,
86 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
88 TP_ARGS(journal
, commit_transaction
)
91 TRACE_EVENT(jbd2_end_commit
,
92 TP_PROTO(journal_t
*journal
, transaction_t
*commit_transaction
),
94 TP_ARGS(journal
, commit_transaction
),
98 __field( char, sync_commit
)
99 __field( int, transaction
)
104 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
105 __entry
->sync_commit
= commit_transaction
->t_synchronous_commit
;
106 __entry
->transaction
= commit_transaction
->t_tid
;
107 __entry
->head
= journal
->j_tail_sequence
;
110 TP_printk("dev %d,%d transaction %d sync %d head %d",
111 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
112 __entry
->transaction
, __entry
->sync_commit
, __entry
->head
)
115 TRACE_EVENT(jbd2_submit_inode_data
,
116 TP_PROTO(struct inode
*inode
),
121 __field( dev_t
, dev
)
122 __field( ino_t
, ino
)
126 __entry
->dev
= inode
->i_sb
->s_dev
;
127 __entry
->ino
= inode
->i_ino
;
130 TP_printk("dev %d,%d ino %lu",
131 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
132 (unsigned long) __entry
->ino
)
135 TRACE_EVENT(jbd2_run_stats
,
136 TP_PROTO(dev_t dev
, unsigned long tid
,
137 struct transaction_run_stats_s
*stats
),
139 TP_ARGS(dev
, tid
, stats
),
142 __field( dev_t
, dev
)
143 __field( unsigned long, tid
)
144 __field( unsigned long, wait
)
145 __field( unsigned long, running
)
146 __field( unsigned long, locked
)
147 __field( unsigned long, flushing
)
148 __field( unsigned long, logging
)
149 __field( __u32
, handle_count
)
150 __field( __u32
, blocks
)
151 __field( __u32
, blocks_logged
)
157 __entry
->wait
= stats
->rs_wait
;
158 __entry
->running
= stats
->rs_running
;
159 __entry
->locked
= stats
->rs_locked
;
160 __entry
->flushing
= stats
->rs_flushing
;
161 __entry
->logging
= stats
->rs_logging
;
162 __entry
->handle_count
= stats
->rs_handle_count
;
163 __entry
->blocks
= stats
->rs_blocks
;
164 __entry
->blocks_logged
= stats
->rs_blocks_logged
;
167 TP_printk("dev %d,%d tid %lu wait %u running %u locked %u flushing %u "
168 "logging %u handle_count %u blocks %u blocks_logged %u",
169 MAJOR(__entry
->dev
), MINOR(__entry
->dev
), __entry
->tid
,
170 jiffies_to_msecs(__entry
->wait
),
171 jiffies_to_msecs(__entry
->running
),
172 jiffies_to_msecs(__entry
->locked
),
173 jiffies_to_msecs(__entry
->flushing
),
174 jiffies_to_msecs(__entry
->logging
),
175 __entry
->handle_count
, __entry
->blocks
,
176 __entry
->blocks_logged
)
179 TRACE_EVENT(jbd2_checkpoint_stats
,
180 TP_PROTO(dev_t dev
, unsigned long tid
,
181 struct transaction_chp_stats_s
*stats
),
183 TP_ARGS(dev
, tid
, stats
),
186 __field( dev_t
, dev
)
187 __field( unsigned long, tid
)
188 __field( unsigned long, chp_time
)
189 __field( __u32
, forced_to_close
)
190 __field( __u32
, written
)
191 __field( __u32
, dropped
)
197 __entry
->chp_time
= stats
->cs_chp_time
;
198 __entry
->forced_to_close
= stats
->cs_forced_to_close
;
199 __entry
->written
= stats
->cs_written
;
200 __entry
->dropped
= stats
->cs_dropped
;
203 TP_printk("dev %d,%d tid %lu chp_time %u forced_to_close %u "
204 "written %u dropped %u",
205 MAJOR(__entry
->dev
), MINOR(__entry
->dev
), __entry
->tid
,
206 jiffies_to_msecs(__entry
->chp_time
),
207 __entry
->forced_to_close
, __entry
->written
, __entry
->dropped
)
210 TRACE_EVENT(jbd2_update_log_tail
,
212 TP_PROTO(journal_t
*journal
, tid_t first_tid
,
213 unsigned long block_nr
, unsigned long freed
),
215 TP_ARGS(journal
, first_tid
, block_nr
, freed
),
218 __field( dev_t
, dev
)
219 __field( tid_t
, tail_sequence
)
220 __field( tid_t
, first_tid
)
221 __field(unsigned long, block_nr
)
222 __field(unsigned long, freed
)
226 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
227 __entry
->tail_sequence
= journal
->j_tail_sequence
;
228 __entry
->first_tid
= first_tid
;
229 __entry
->block_nr
= block_nr
;
230 __entry
->freed
= freed
;
233 TP_printk("dev %d,%d from %u to %u offset %lu freed %lu",
234 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
235 __entry
->tail_sequence
, __entry
->first_tid
,
236 __entry
->block_nr
, __entry
->freed
)
239 TRACE_EVENT(jbd2_write_superblock
,
241 TP_PROTO(journal_t
*journal
, int write_op
),
243 TP_ARGS(journal
, write_op
),
246 __field( dev_t
, dev
)
247 __field( int, write_op
)
251 __entry
->dev
= journal
->j_fs_dev
->bd_dev
;
252 __entry
->write_op
= write_op
;
255 TP_printk("dev %d,%d write_op %x", MAJOR(__entry
->dev
),
256 MINOR(__entry
->dev
), __entry
->write_op
)
259 #endif /* _TRACE_JBD2_H */
261 /* This part must be outside protection */
262 #include <trace/define_trace.h>
This page took 0.03631 seconds and 4 git commands to generate.