aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/jbd2.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2013-02-08 13:00:22 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-02-08 13:00:22 -0500
commit343d9c283c9847da043fda3e76e3197f27b667dd (patch)
tree6c37b7cd1d9eeb711fa1aeffee1930e446c406f8 /include/trace/events/jbd2.h
parent078d5039a13dedbd2ed14153a6d764fd75baae07 (diff)
jbd2: add tracepoints which provide per-handle statistics
Handles which stay open a long time are problematic when it comes time to close down a transaction so it can be committed. These tracepoints will help us determine which ones are the problematic ones, and to validate whether changes makes things better or worse. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/trace/events/jbd2.h')
-rw-r--r--include/trace/events/jbd2.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h
index 5419f57beb1f..070df49e4a1d 100644
--- a/include/trace/events/jbd2.h
+++ b/include/trace/events/jbd2.h
@@ -132,6 +132,104 @@ TRACE_EVENT(jbd2_submit_inode_data,
132 (unsigned long) __entry->ino) 132 (unsigned long) __entry->ino)
133); 133);
134 134
135TRACE_EVENT(jbd2_handle_start,
136 TP_PROTO(dev_t dev, unsigned long tid, unsigned int type,
137 unsigned int line_no, int requested_blocks),
138
139 TP_ARGS(dev, tid, type, line_no, requested_blocks),
140
141 TP_STRUCT__entry(
142 __field( dev_t, dev )
143 __field( unsigned long, tid )
144 __field( unsigned int, type )
145 __field( unsigned int, line_no )
146 __field( int, requested_blocks)
147 ),
148
149 TP_fast_assign(
150 __entry->dev = dev;
151 __entry->tid = tid;
152 __entry->type = type;
153 __entry->line_no = line_no;
154 __entry->requested_blocks = requested_blocks;
155 ),
156
157 TP_printk("dev %d,%d tid %lu type %u line_no %u "
158 "requested_blocks %d",
159 MAJOR(__entry->dev), MINOR(__entry->dev), __entry->tid,
160 __entry->type, __entry->line_no, __entry->requested_blocks)
161);
162
163TRACE_EVENT(jbd2_handle_extend,
164 TP_PROTO(dev_t dev, unsigned long tid, unsigned int type,
165 unsigned int line_no, int buffer_credits,
166 int requested_blocks),
167
168 TP_ARGS(dev, tid, type, line_no, buffer_credits, requested_blocks),
169
170 TP_STRUCT__entry(
171 __field( dev_t, dev )
172 __field( unsigned long, tid )
173 __field( unsigned int, type )
174 __field( unsigned int, line_no )
175 __field( int, buffer_credits )
176 __field( int, requested_blocks)
177 ),
178
179 TP_fast_assign(
180 __entry->dev = dev;
181 __entry->tid = tid;
182 __entry->type = type;
183 __entry->line_no = line_no;
184 __entry->buffer_credits = buffer_credits;
185 __entry->requested_blocks = requested_blocks;
186 ),
187
188 TP_printk("dev %d,%d tid %lu type %u line_no %u "
189 "buffer_credits %d requested_blocks %d",
190 MAJOR(__entry->dev), MINOR(__entry->dev), __entry->tid,
191 __entry->type, __entry->line_no, __entry->buffer_credits,
192 __entry->requested_blocks)
193);
194
195TRACE_EVENT(jbd2_handle_stats,
196 TP_PROTO(dev_t dev, unsigned long tid, unsigned int type,
197 unsigned int line_no, int interval, int sync,
198 int requested_blocks, int dirtied_blocks),
199
200 TP_ARGS(dev, tid, type, line_no, interval, sync,
201 requested_blocks, dirtied_blocks),
202
203 TP_STRUCT__entry(
204 __field( dev_t, dev )
205 __field( unsigned long, tid )
206 __field( unsigned int, type )
207 __field( unsigned int, line_no )
208 __field( int, interval )
209 __field( int, sync )
210 __field( int, requested_blocks)
211 __field( int, dirtied_blocks )
212 ),
213
214 TP_fast_assign(
215 __entry->dev = dev;
216 __entry->tid = tid;
217 __entry->type = type;
218 __entry->line_no = line_no;
219 __entry->interval = interval;
220 __entry->sync = sync;
221 __entry->requested_blocks = requested_blocks;
222 __entry->dirtied_blocks = dirtied_blocks;
223 ),
224
225 TP_printk("dev %d,%d tid %lu type %u line_no %u interval %d "
226 "sync %d requested_blocks %d dirtied_blocks %d",
227 MAJOR(__entry->dev), MINOR(__entry->dev), __entry->tid,
228 __entry->type, __entry->line_no, __entry->interval,
229 __entry->sync, __entry->requested_blocks,
230 __entry->dirtied_blocks)
231);
232
135TRACE_EVENT(jbd2_run_stats, 233TRACE_EVENT(jbd2_run_stats,
136 TP_PROTO(dev_t dev, unsigned long tid, 234 TP_PROTO(dev_t dev, unsigned long tid,
137 struct transaction_run_stats_s *stats), 235 struct transaction_run_stats_s *stats),