Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / include / trace / events / jbd.h
blobaff64d82d713b44785240f8bc47697a336132bed
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM jbd
4 #if !defined(_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_JBD_H
7 #include <linux/jbd.h>
8 #include <linux/tracepoint.h>
10 TRACE_EVENT(jbd_checkpoint,
12 TP_PROTO(journal_t *journal, int result),
14 TP_ARGS(journal, result),
16 TP_STRUCT__entry(
17 __field( dev_t, dev )
18 __field( int, result )
21 TP_fast_assign(
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),
28 __entry->result)
31 DECLARE_EVENT_CLASS(jbd_commit,
33 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
35 TP_ARGS(journal, commit_transaction),
37 TP_STRUCT__entry(
38 __field( dev_t, dev )
39 __field( char, sync_commit )
40 __field( int, transaction )
43 TP_fast_assign(
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),
88 TP_STRUCT__entry(
89 __field( dev_t, dev )
90 __field( char, sync_commit )
91 __field( int, transaction )
94 TP_fast_assign(
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),
110 TP_STRUCT__entry(
111 __field( dev_t, dev )
112 __field( char, sync_commit )
113 __field( int, transaction )
114 __field( int, head )
117 TP_fast_assign(
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),
134 TP_STRUCT__entry(
135 __field( dev_t, dev )
136 __field( char, sync_commit )
137 __field( int, transaction )
140 TP_fast_assign(
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),
158 TP_STRUCT__entry(
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 )
166 TP_fast_assign(
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),
185 TP_STRUCT__entry(
186 __field( dev_t, dev )
187 __field( int, wait )
190 TP_fast_assign(
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),
197 __entry->wait)
200 #endif /* _TRACE_JBD_H */
202 /* This part must be outside protection */
203 #include <trace/define_trace.h>