diff options
Diffstat (limited to 'include/trace/events/jbd2.h')
-rw-r--r-- | include/trace/events/jbd2.h | 78 |
1 files changed, 31 insertions, 47 deletions
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 7447ea9305b5..bf16545cc977 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -17,19 +17,17 @@ TRACE_EVENT(jbd2_checkpoint, | |||
17 | TP_ARGS(journal, result), | 17 | TP_ARGS(journal, result), |
18 | 18 | ||
19 | TP_STRUCT__entry( | 19 | TP_STRUCT__entry( |
20 | __field( int, dev_major ) | 20 | __field( dev_t, dev ) |
21 | __field( int, dev_minor ) | ||
22 | __field( int, result ) | 21 | __field( int, result ) |
23 | ), | 22 | ), |
24 | 23 | ||
25 | TP_fast_assign( | 24 | TP_fast_assign( |
26 | __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); | 25 | __entry->dev = journal->j_fs_dev->bd_dev; |
27 | __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev); | ||
28 | __entry->result = result; | 26 | __entry->result = result; |
29 | ), | 27 | ), |
30 | 28 | ||
31 | TP_printk("dev %d,%d result %d", | 29 | TP_printk("dev %s result %d", |
32 | __entry->dev_major, __entry->dev_minor, __entry->result) | 30 | jbd2_dev_to_name(__entry->dev), __entry->result) |
33 | ); | 31 | ); |
34 | 32 | ||
35 | DECLARE_EVENT_CLASS(jbd2_commit, | 33 | DECLARE_EVENT_CLASS(jbd2_commit, |
@@ -39,22 +37,20 @@ DECLARE_EVENT_CLASS(jbd2_commit, | |||
39 | TP_ARGS(journal, commit_transaction), | 37 | TP_ARGS(journal, commit_transaction), |
40 | 38 | ||
41 | TP_STRUCT__entry( | 39 | TP_STRUCT__entry( |
42 | __field( int, dev_major ) | 40 | __field( dev_t, dev ) |
43 | __field( int, dev_minor ) | ||
44 | __field( char, sync_commit ) | 41 | __field( char, sync_commit ) |
45 | __field( int, transaction ) | 42 | __field( int, transaction ) |
46 | ), | 43 | ), |
47 | 44 | ||
48 | TP_fast_assign( | 45 | TP_fast_assign( |
49 | __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); | 46 | __entry->dev = journal->j_fs_dev->bd_dev; |
50 | __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev); | ||
51 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | 47 | __entry->sync_commit = commit_transaction->t_synchronous_commit; |
52 | __entry->transaction = commit_transaction->t_tid; | 48 | __entry->transaction = commit_transaction->t_tid; |
53 | ), | 49 | ), |
54 | 50 | ||
55 | TP_printk("dev %d,%d transaction %d sync %d", | 51 | TP_printk("dev %s transaction %d sync %d", |
56 | __entry->dev_major, __entry->dev_minor, | 52 | jbd2_dev_to_name(__entry->dev), __entry->transaction, |
57 | __entry->transaction, __entry->sync_commit) | 53 | __entry->sync_commit) |
58 | ); | 54 | ); |
59 | 55 | ||
60 | DEFINE_EVENT(jbd2_commit, jbd2_start_commit, | 56 | DEFINE_EVENT(jbd2_commit, jbd2_start_commit, |
@@ -91,24 +87,22 @@ TRACE_EVENT(jbd2_end_commit, | |||
91 | TP_ARGS(journal, commit_transaction), | 87 | TP_ARGS(journal, commit_transaction), |
92 | 88 | ||
93 | TP_STRUCT__entry( | 89 | TP_STRUCT__entry( |
94 | __field( int, dev_major ) | 90 | __field( dev_t, dev ) |
95 | __field( int, dev_minor ) | ||
96 | __field( char, sync_commit ) | 91 | __field( char, sync_commit ) |
97 | __field( int, transaction ) | 92 | __field( int, transaction ) |
98 | __field( int, head ) | 93 | __field( int, head ) |
99 | ), | 94 | ), |
100 | 95 | ||
101 | TP_fast_assign( | 96 | TP_fast_assign( |
102 | __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); | 97 | __entry->dev = journal->j_fs_dev->bd_dev; |
103 | __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev); | ||
104 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | 98 | __entry->sync_commit = commit_transaction->t_synchronous_commit; |
105 | __entry->transaction = commit_transaction->t_tid; | 99 | __entry->transaction = commit_transaction->t_tid; |
106 | __entry->head = journal->j_tail_sequence; | 100 | __entry->head = journal->j_tail_sequence; |
107 | ), | 101 | ), |
108 | 102 | ||
109 | TP_printk("dev %d,%d transaction %d sync %d head %d", | 103 | TP_printk("dev %s transaction %d sync %d head %d", |
110 | __entry->dev_major, __entry->dev_minor, | 104 | jbd2_dev_to_name(__entry->dev), __entry->transaction, |
111 | __entry->transaction, __entry->sync_commit, __entry->head) | 105 | __entry->sync_commit, __entry->head) |
112 | ); | 106 | ); |
113 | 107 | ||
114 | TRACE_EVENT(jbd2_submit_inode_data, | 108 | TRACE_EVENT(jbd2_submit_inode_data, |
@@ -117,20 +111,17 @@ TRACE_EVENT(jbd2_submit_inode_data, | |||
117 | TP_ARGS(inode), | 111 | TP_ARGS(inode), |
118 | 112 | ||
119 | TP_STRUCT__entry( | 113 | TP_STRUCT__entry( |
120 | __field( int, dev_major ) | 114 | __field( dev_t, dev ) |
121 | __field( int, dev_minor ) | ||
122 | __field( ino_t, ino ) | 115 | __field( ino_t, ino ) |
123 | ), | 116 | ), |
124 | 117 | ||
125 | TP_fast_assign( | 118 | TP_fast_assign( |
126 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 119 | __entry->dev = inode->i_sb->s_dev; |
127 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
128 | __entry->ino = inode->i_ino; | 120 | __entry->ino = inode->i_ino; |
129 | ), | 121 | ), |
130 | 122 | ||
131 | TP_printk("dev %d,%d ino %lu", | 123 | TP_printk("dev %s ino %lu", |
132 | __entry->dev_major, __entry->dev_minor, | 124 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) |
133 | (unsigned long) __entry->ino) | ||
134 | ); | 125 | ); |
135 | 126 | ||
136 | TRACE_EVENT(jbd2_run_stats, | 127 | TRACE_EVENT(jbd2_run_stats, |
@@ -140,8 +131,7 @@ TRACE_EVENT(jbd2_run_stats, | |||
140 | TP_ARGS(dev, tid, stats), | 131 | TP_ARGS(dev, tid, stats), |
141 | 132 | ||
142 | TP_STRUCT__entry( | 133 | TP_STRUCT__entry( |
143 | __field( int, dev_major ) | 134 | __field( dev_t, dev ) |
144 | __field( int, dev_minor ) | ||
145 | __field( unsigned long, tid ) | 135 | __field( unsigned long, tid ) |
146 | __field( unsigned long, wait ) | 136 | __field( unsigned long, wait ) |
147 | __field( unsigned long, running ) | 137 | __field( unsigned long, running ) |
@@ -154,8 +144,7 @@ TRACE_EVENT(jbd2_run_stats, | |||
154 | ), | 144 | ), |
155 | 145 | ||
156 | TP_fast_assign( | 146 | TP_fast_assign( |
157 | __entry->dev_major = MAJOR(dev); | 147 | __entry->dev = dev; |
158 | __entry->dev_minor = MINOR(dev); | ||
159 | __entry->tid = tid; | 148 | __entry->tid = tid; |
160 | __entry->wait = stats->rs_wait; | 149 | __entry->wait = stats->rs_wait; |
161 | __entry->running = stats->rs_running; | 150 | __entry->running = stats->rs_running; |
@@ -167,9 +156,9 @@ TRACE_EVENT(jbd2_run_stats, | |||
167 | __entry->blocks_logged = stats->rs_blocks_logged; | 156 | __entry->blocks_logged = stats->rs_blocks_logged; |
168 | ), | 157 | ), |
169 | 158 | ||
170 | TP_printk("dev %d,%d tid %lu wait %u running %u locked %u flushing %u " | 159 | TP_printk("dev %s tid %lu wait %u running %u locked %u flushing %u " |
171 | "logging %u handle_count %u blocks %u blocks_logged %u", | 160 | "logging %u handle_count %u blocks %u blocks_logged %u", |
172 | __entry->dev_major, __entry->dev_minor, __entry->tid, | 161 | jbd2_dev_to_name(__entry->dev), __entry->tid, |
173 | jiffies_to_msecs(__entry->wait), | 162 | jiffies_to_msecs(__entry->wait), |
174 | jiffies_to_msecs(__entry->running), | 163 | jiffies_to_msecs(__entry->running), |
175 | jiffies_to_msecs(__entry->locked), | 164 | jiffies_to_msecs(__entry->locked), |
@@ -186,8 +175,7 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
186 | TP_ARGS(dev, tid, stats), | 175 | TP_ARGS(dev, tid, stats), |
187 | 176 | ||
188 | TP_STRUCT__entry( | 177 | TP_STRUCT__entry( |
189 | __field( int, dev_major ) | 178 | __field( dev_t, dev ) |
190 | __field( int, dev_minor ) | ||
191 | __field( unsigned long, tid ) | 179 | __field( unsigned long, tid ) |
192 | __field( unsigned long, chp_time ) | 180 | __field( unsigned long, chp_time ) |
193 | __field( __u32, forced_to_close ) | 181 | __field( __u32, forced_to_close ) |
@@ -196,8 +184,7 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
196 | ), | 184 | ), |
197 | 185 | ||
198 | TP_fast_assign( | 186 | TP_fast_assign( |
199 | __entry->dev_major = MAJOR(dev); | 187 | __entry->dev = dev; |
200 | __entry->dev_minor = MINOR(dev); | ||
201 | __entry->tid = tid; | 188 | __entry->tid = tid; |
202 | __entry->chp_time = stats->cs_chp_time; | 189 | __entry->chp_time = stats->cs_chp_time; |
203 | __entry->forced_to_close= stats->cs_forced_to_close; | 190 | __entry->forced_to_close= stats->cs_forced_to_close; |
@@ -205,9 +192,9 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
205 | __entry->dropped = stats->cs_dropped; | 192 | __entry->dropped = stats->cs_dropped; |
206 | ), | 193 | ), |
207 | 194 | ||
208 | TP_printk("dev %d,%d tid %lu chp_time %u forced_to_close %u " | 195 | TP_printk("dev %s tid %lu chp_time %u forced_to_close %u " |
209 | "written %u dropped %u", | 196 | "written %u dropped %u", |
210 | __entry->dev_major, __entry->dev_minor, __entry->tid, | 197 | jbd2_dev_to_name(__entry->dev), __entry->tid, |
211 | jiffies_to_msecs(__entry->chp_time), | 198 | jiffies_to_msecs(__entry->chp_time), |
212 | __entry->forced_to_close, __entry->written, __entry->dropped) | 199 | __entry->forced_to_close, __entry->written, __entry->dropped) |
213 | ); | 200 | ); |
@@ -220,8 +207,7 @@ TRACE_EVENT(jbd2_cleanup_journal_tail, | |||
220 | TP_ARGS(journal, first_tid, block_nr, freed), | 207 | TP_ARGS(journal, first_tid, block_nr, freed), |
221 | 208 | ||
222 | TP_STRUCT__entry( | 209 | TP_STRUCT__entry( |
223 | __field( int, dev_major ) | 210 | __field( dev_t, dev ) |
224 | __field( int, dev_minor ) | ||
225 | __field( tid_t, tail_sequence ) | 211 | __field( tid_t, tail_sequence ) |
226 | __field( tid_t, first_tid ) | 212 | __field( tid_t, first_tid ) |
227 | __field(unsigned long, block_nr ) | 213 | __field(unsigned long, block_nr ) |
@@ -229,18 +215,16 @@ TRACE_EVENT(jbd2_cleanup_journal_tail, | |||
229 | ), | 215 | ), |
230 | 216 | ||
231 | TP_fast_assign( | 217 | TP_fast_assign( |
232 | __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); | 218 | __entry->dev = journal->j_fs_dev->bd_dev; |
233 | __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev); | ||
234 | __entry->tail_sequence = journal->j_tail_sequence; | 219 | __entry->tail_sequence = journal->j_tail_sequence; |
235 | __entry->first_tid = first_tid; | 220 | __entry->first_tid = first_tid; |
236 | __entry->block_nr = block_nr; | 221 | __entry->block_nr = block_nr; |
237 | __entry->freed = freed; | 222 | __entry->freed = freed; |
238 | ), | 223 | ), |
239 | 224 | ||
240 | TP_printk("dev %d,%d from %u to %u offset %lu freed %lu", | 225 | TP_printk("dev %s from %u to %u offset %lu freed %lu", |
241 | __entry->dev_major, __entry->dev_minor, | 226 | jbd2_dev_to_name(__entry->dev), __entry->tail_sequence, |
242 | __entry->tail_sequence, __entry->first_tid, | 227 | __entry->first_tid, __entry->block_nr, __entry->freed) |
243 | __entry->block_nr, __entry->freed) | ||
244 | ); | 228 | ); |
245 | 229 | ||
246 | #endif /* _TRACE_JBD2_H */ | 230 | #endif /* _TRACE_JBD2_H */ |