aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/events')
-rw-r--r--include/trace/events/ext4.h482
-rw-r--r--include/trace/events/irq.h56
-rw-r--r--include/trace/events/jbd2.h78
-rw-r--r--include/trace/events/napi.h25
-rw-r--r--include/trace/events/net.h82
-rw-r--r--include/trace/events/power.h90
-rw-r--r--include/trace/events/sched.h29
-rw-r--r--include/trace/events/skb.h17
-rw-r--r--include/trace/events/vmscan.h44
-rw-r--r--include/trace/events/workqueue.h77
-rw-r--r--include/trace/events/writeback.h37
11 files changed, 795 insertions, 222 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 01e9e0076a92..e5e345fb2a5c 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -21,7 +21,8 @@ TRACE_EVENT(ext4_free_inode,
21 TP_ARGS(inode), 21 TP_ARGS(inode),
22 22
23 TP_STRUCT__entry( 23 TP_STRUCT__entry(
24 __field( dev_t, dev ) 24 __field( int, dev_major )
25 __field( int, dev_minor )
25 __field( ino_t, ino ) 26 __field( ino_t, ino )
26 __field( umode_t, mode ) 27 __field( umode_t, mode )
27 __field( uid_t, uid ) 28 __field( uid_t, uid )
@@ -30,7 +31,8 @@ TRACE_EVENT(ext4_free_inode,
30 ), 31 ),
31 32
32 TP_fast_assign( 33 TP_fast_assign(
33 __entry->dev = inode->i_sb->s_dev; 34 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
35 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
34 __entry->ino = inode->i_ino; 36 __entry->ino = inode->i_ino;
35 __entry->mode = inode->i_mode; 37 __entry->mode = inode->i_mode;
36 __entry->uid = inode->i_uid; 38 __entry->uid = inode->i_uid;
@@ -38,9 +40,10 @@ TRACE_EVENT(ext4_free_inode,
38 __entry->blocks = inode->i_blocks; 40 __entry->blocks = inode->i_blocks;
39 ), 41 ),
40 42
41 TP_printk("dev %s ino %lu mode 0%o uid %u gid %u blocks %llu", 43 TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu",
42 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 44 __entry->dev_major, __entry->dev_minor,
43 __entry->mode, __entry->uid, __entry->gid, 45 (unsigned long) __entry->ino, __entry->mode,
46 __entry->uid, __entry->gid,
44 (unsigned long long) __entry->blocks) 47 (unsigned long long) __entry->blocks)
45); 48);
46 49
@@ -50,20 +53,22 @@ TRACE_EVENT(ext4_request_inode,
50 TP_ARGS(dir, mode), 53 TP_ARGS(dir, mode),
51 54
52 TP_STRUCT__entry( 55 TP_STRUCT__entry(
53 __field( dev_t, dev ) 56 __field( int, dev_major )
57 __field( int, dev_minor )
54 __field( ino_t, dir ) 58 __field( ino_t, dir )
55 __field( umode_t, mode ) 59 __field( umode_t, mode )
56 ), 60 ),
57 61
58 TP_fast_assign( 62 TP_fast_assign(
59 __entry->dev = dir->i_sb->s_dev; 63 __entry->dev_major = MAJOR(dir->i_sb->s_dev);
64 __entry->dev_minor = MINOR(dir->i_sb->s_dev);
60 __entry->dir = dir->i_ino; 65 __entry->dir = dir->i_ino;
61 __entry->mode = mode; 66 __entry->mode = mode;
62 ), 67 ),
63 68
64 TP_printk("dev %s dir %lu mode 0%o", 69 TP_printk("dev %d,%d dir %lu mode 0%o",
65 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->dir, 70 __entry->dev_major, __entry->dev_minor,
66 __entry->mode) 71 (unsigned long) __entry->dir, __entry->mode)
67); 72);
68 73
69TRACE_EVENT(ext4_allocate_inode, 74TRACE_EVENT(ext4_allocate_inode,
@@ -72,24 +77,124 @@ TRACE_EVENT(ext4_allocate_inode,
72 TP_ARGS(inode, dir, mode), 77 TP_ARGS(inode, dir, mode),
73 78
74 TP_STRUCT__entry( 79 TP_STRUCT__entry(
75 __field( dev_t, dev ) 80 __field( int, dev_major )
81 __field( int, dev_minor )
76 __field( ino_t, ino ) 82 __field( ino_t, ino )
77 __field( ino_t, dir ) 83 __field( ino_t, dir )
78 __field( umode_t, mode ) 84 __field( umode_t, mode )
79 ), 85 ),
80 86
81 TP_fast_assign( 87 TP_fast_assign(
82 __entry->dev = inode->i_sb->s_dev; 88 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
89 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
83 __entry->ino = inode->i_ino; 90 __entry->ino = inode->i_ino;
84 __entry->dir = dir->i_ino; 91 __entry->dir = dir->i_ino;
85 __entry->mode = mode; 92 __entry->mode = mode;
86 ), 93 ),
87 94
88 TP_printk("dev %s ino %lu dir %lu mode 0%o", 95 TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
89 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 96 __entry->dev_major, __entry->dev_minor,
97 (unsigned long) __entry->ino,
90 (unsigned long) __entry->dir, __entry->mode) 98 (unsigned long) __entry->dir, __entry->mode)
91); 99);
92 100
101TRACE_EVENT(ext4_evict_inode,
102 TP_PROTO(struct inode *inode),
103
104 TP_ARGS(inode),
105
106 TP_STRUCT__entry(
107 __field( int, dev_major )
108 __field( int, dev_minor )
109 __field( ino_t, ino )
110 __field( int, nlink )
111 ),
112
113 TP_fast_assign(
114 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
115 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
116 __entry->ino = inode->i_ino;
117 __entry->nlink = inode->i_nlink;
118 ),
119
120 TP_printk("dev %d,%d ino %lu nlink %d",
121 __entry->dev_major, __entry->dev_minor,
122 (unsigned long) __entry->ino, __entry->nlink)
123);
124
125TRACE_EVENT(ext4_drop_inode,
126 TP_PROTO(struct inode *inode, int drop),
127
128 TP_ARGS(inode, drop),
129
130 TP_STRUCT__entry(
131 __field( int, dev_major )
132 __field( int, dev_minor )
133 __field( ino_t, ino )
134 __field( int, drop )
135 ),
136
137 TP_fast_assign(
138 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
139 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
140 __entry->ino = inode->i_ino;
141 __entry->drop = drop;
142 ),
143
144 TP_printk("dev %d,%d ino %lu drop %d",
145 __entry->dev_major, __entry->dev_minor,
146 (unsigned long) __entry->ino, __entry->drop)
147);
148
149TRACE_EVENT(ext4_mark_inode_dirty,
150 TP_PROTO(struct inode *inode, unsigned long IP),
151
152 TP_ARGS(inode, IP),
153
154 TP_STRUCT__entry(
155 __field( int, dev_major )
156 __field( int, dev_minor )
157 __field( ino_t, ino )
158 __field(unsigned long, ip )
159 ),
160
161 TP_fast_assign(
162 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
163 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
164 __entry->ino = inode->i_ino;
165 __entry->ip = IP;
166 ),
167
168 TP_printk("dev %d,%d ino %lu caller %pF",
169 __entry->dev_major, __entry->dev_minor,
170 (unsigned long) __entry->ino, (void *)__entry->ip)
171);
172
173TRACE_EVENT(ext4_begin_ordered_truncate,
174 TP_PROTO(struct inode *inode, loff_t new_size),
175
176 TP_ARGS(inode, new_size),
177
178 TP_STRUCT__entry(
179 __field( int, dev_major )
180 __field( int, dev_minor )
181 __field( ino_t, ino )
182 __field( loff_t, new_size )
183 ),
184
185 TP_fast_assign(
186 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
187 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
188 __entry->ino = inode->i_ino;
189 __entry->new_size = new_size;
190 ),
191
192 TP_printk("dev %d,%d ino %lu new_size %lld",
193 __entry->dev_major, __entry->dev_minor,
194 (unsigned long) __entry->ino,
195 (long long) __entry->new_size)
196);
197
93DECLARE_EVENT_CLASS(ext4__write_begin, 198DECLARE_EVENT_CLASS(ext4__write_begin,
94 199
95 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 200 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
@@ -98,7 +203,8 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
98 TP_ARGS(inode, pos, len, flags), 203 TP_ARGS(inode, pos, len, flags),
99 204
100 TP_STRUCT__entry( 205 TP_STRUCT__entry(
101 __field( dev_t, dev ) 206 __field( int, dev_major )
207 __field( int, dev_minor )
102 __field( ino_t, ino ) 208 __field( ino_t, ino )
103 __field( loff_t, pos ) 209 __field( loff_t, pos )
104 __field( unsigned int, len ) 210 __field( unsigned int, len )
@@ -106,15 +212,17 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
106 ), 212 ),
107 213
108 TP_fast_assign( 214 TP_fast_assign(
109 __entry->dev = inode->i_sb->s_dev; 215 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
216 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
110 __entry->ino = inode->i_ino; 217 __entry->ino = inode->i_ino;
111 __entry->pos = pos; 218 __entry->pos = pos;
112 __entry->len = len; 219 __entry->len = len;
113 __entry->flags = flags; 220 __entry->flags = flags;
114 ), 221 ),
115 222
116 TP_printk("dev %s ino %lu pos %llu len %u flags %u", 223 TP_printk("dev %d,%d ino %lu pos %llu len %u flags %u",
117 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 224 __entry->dev_major, __entry->dev_minor,
225 (unsigned long) __entry->ino,
118 __entry->pos, __entry->len, __entry->flags) 226 __entry->pos, __entry->len, __entry->flags)
119); 227);
120 228
@@ -141,7 +249,8 @@ DECLARE_EVENT_CLASS(ext4__write_end,
141 TP_ARGS(inode, pos, len, copied), 249 TP_ARGS(inode, pos, len, copied),
142 250
143 TP_STRUCT__entry( 251 TP_STRUCT__entry(
144 __field( dev_t, dev ) 252 __field( int, dev_major )
253 __field( int, dev_minor )
145 __field( ino_t, ino ) 254 __field( ino_t, ino )
146 __field( loff_t, pos ) 255 __field( loff_t, pos )
147 __field( unsigned int, len ) 256 __field( unsigned int, len )
@@ -149,16 +258,18 @@ DECLARE_EVENT_CLASS(ext4__write_end,
149 ), 258 ),
150 259
151 TP_fast_assign( 260 TP_fast_assign(
152 __entry->dev = inode->i_sb->s_dev; 261 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
262 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
153 __entry->ino = inode->i_ino; 263 __entry->ino = inode->i_ino;
154 __entry->pos = pos; 264 __entry->pos = pos;
155 __entry->len = len; 265 __entry->len = len;
156 __entry->copied = copied; 266 __entry->copied = copied;
157 ), 267 ),
158 268
159 TP_printk("dev %s ino %lu pos %llu len %u copied %u", 269 TP_printk("dev %d,%d ino %lu pos %llu len %u copied %u",
160 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 270 __entry->dev_major, __entry->dev_minor,
161 __entry->pos, __entry->len, __entry->copied) 271 (unsigned long) __entry->ino, __entry->pos,
272 __entry->len, __entry->copied)
162); 273);
163 274
164DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, 275DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end,
@@ -199,21 +310,23 @@ TRACE_EVENT(ext4_writepage,
199 TP_ARGS(inode, page), 310 TP_ARGS(inode, page),
200 311
201 TP_STRUCT__entry( 312 TP_STRUCT__entry(
202 __field( dev_t, dev ) 313 __field( int, dev_major )
314 __field( int, dev_minor )
203 __field( ino_t, ino ) 315 __field( ino_t, ino )
204 __field( pgoff_t, index ) 316 __field( pgoff_t, index )
205 317
206 ), 318 ),
207 319
208 TP_fast_assign( 320 TP_fast_assign(
209 __entry->dev = inode->i_sb->s_dev; 321 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
322 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
210 __entry->ino = inode->i_ino; 323 __entry->ino = inode->i_ino;
211 __entry->index = page->index; 324 __entry->index = page->index;
212 ), 325 ),
213 326
214 TP_printk("dev %s ino %lu page_index %lu", 327 TP_printk("dev %d,%d ino %lu page_index %lu",
215 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 328 __entry->dev_major, __entry->dev_minor,
216 __entry->index) 329 (unsigned long) __entry->ino, __entry->index)
217); 330);
218 331
219TRACE_EVENT(ext4_da_writepages, 332TRACE_EVENT(ext4_da_writepages,
@@ -222,13 +335,13 @@ TRACE_EVENT(ext4_da_writepages,
222 TP_ARGS(inode, wbc), 335 TP_ARGS(inode, wbc),
223 336
224 TP_STRUCT__entry( 337 TP_STRUCT__entry(
225 __field( dev_t, dev ) 338 __field( int, dev_major )
339 __field( int, dev_minor )
226 __field( ino_t, ino ) 340 __field( ino_t, ino )
227 __field( long, nr_to_write ) 341 __field( long, nr_to_write )
228 __field( long, pages_skipped ) 342 __field( long, pages_skipped )
229 __field( loff_t, range_start ) 343 __field( loff_t, range_start )
230 __field( loff_t, range_end ) 344 __field( loff_t, range_end )
231 __field( char, nonblocking )
232 __field( char, for_kupdate ) 345 __field( char, for_kupdate )
233 __field( char, for_reclaim ) 346 __field( char, for_reclaim )
234 __field( char, range_cyclic ) 347 __field( char, range_cyclic )
@@ -236,24 +349,27 @@ TRACE_EVENT(ext4_da_writepages,
236 ), 349 ),
237 350
238 TP_fast_assign( 351 TP_fast_assign(
239 __entry->dev = inode->i_sb->s_dev; 352 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
353 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
240 __entry->ino = inode->i_ino; 354 __entry->ino = inode->i_ino;
241 __entry->nr_to_write = wbc->nr_to_write; 355 __entry->nr_to_write = wbc->nr_to_write;
242 __entry->pages_skipped = wbc->pages_skipped; 356 __entry->pages_skipped = wbc->pages_skipped;
243 __entry->range_start = wbc->range_start; 357 __entry->range_start = wbc->range_start;
244 __entry->range_end = wbc->range_end; 358 __entry->range_end = wbc->range_end;
245 __entry->nonblocking = wbc->nonblocking;
246 __entry->for_kupdate = wbc->for_kupdate; 359 __entry->for_kupdate = wbc->for_kupdate;
247 __entry->for_reclaim = wbc->for_reclaim; 360 __entry->for_reclaim = wbc->for_reclaim;
248 __entry->range_cyclic = wbc->range_cyclic; 361 __entry->range_cyclic = wbc->range_cyclic;
249 __entry->writeback_index = inode->i_mapping->writeback_index; 362 __entry->writeback_index = inode->i_mapping->writeback_index;
250 ), 363 ),
251 364
252 TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d writeback_index %lu", 365 TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
253 jbd2_dev_to_name(__entry->dev), 366 "range_start %llu range_end %llu "
367 "for_kupdate %d for_reclaim %d "
368 "range_cyclic %d writeback_index %lu",
369 __entry->dev_major, __entry->dev_minor,
254 (unsigned long) __entry->ino, __entry->nr_to_write, 370 (unsigned long) __entry->ino, __entry->nr_to_write,
255 __entry->pages_skipped, __entry->range_start, 371 __entry->pages_skipped, __entry->range_start,
256 __entry->range_end, __entry->nonblocking, 372 __entry->range_end,
257 __entry->for_kupdate, __entry->for_reclaim, 373 __entry->for_kupdate, __entry->for_reclaim,
258 __entry->range_cyclic, 374 __entry->range_cyclic,
259 (unsigned long) __entry->writeback_index) 375 (unsigned long) __entry->writeback_index)
@@ -265,7 +381,8 @@ TRACE_EVENT(ext4_da_write_pages,
265 TP_ARGS(inode, mpd), 381 TP_ARGS(inode, mpd),
266 382
267 TP_STRUCT__entry( 383 TP_STRUCT__entry(
268 __field( dev_t, dev ) 384 __field( int, dev_major )
385 __field( int, dev_minor )
269 __field( ino_t, ino ) 386 __field( ino_t, ino )
270 __field( __u64, b_blocknr ) 387 __field( __u64, b_blocknr )
271 __field( __u32, b_size ) 388 __field( __u32, b_size )
@@ -276,7 +393,8 @@ TRACE_EVENT(ext4_da_write_pages,
276 ), 393 ),
277 394
278 TP_fast_assign( 395 TP_fast_assign(
279 __entry->dev = inode->i_sb->s_dev; 396 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
397 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
280 __entry->ino = inode->i_ino; 398 __entry->ino = inode->i_ino;
281 __entry->b_blocknr = mpd->b_blocknr; 399 __entry->b_blocknr = mpd->b_blocknr;
282 __entry->b_size = mpd->b_size; 400 __entry->b_size = mpd->b_size;
@@ -286,8 +404,9 @@ TRACE_EVENT(ext4_da_write_pages,
286 __entry->pages_written = mpd->pages_written; 404 __entry->pages_written = mpd->pages_written;
287 ), 405 ),
288 406
289 TP_printk("dev %s ino %lu b_blocknr %llu b_size %u b_state 0x%04x first_page %lu io_done %d pages_written %d", 407 TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x first_page %lu io_done %d pages_written %d",
290 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 408 __entry->dev_major, __entry->dev_minor,
409 (unsigned long) __entry->ino,
291 __entry->b_blocknr, __entry->b_size, 410 __entry->b_blocknr, __entry->b_size,
292 __entry->b_state, __entry->first_page, 411 __entry->b_state, __entry->first_page,
293 __entry->io_done, __entry->pages_written) 412 __entry->io_done, __entry->pages_written)
@@ -300,7 +419,8 @@ TRACE_EVENT(ext4_da_writepages_result,
300 TP_ARGS(inode, wbc, ret, pages_written), 419 TP_ARGS(inode, wbc, ret, pages_written),
301 420
302 TP_STRUCT__entry( 421 TP_STRUCT__entry(
303 __field( dev_t, dev ) 422 __field( int, dev_major )
423 __field( int, dev_minor )
304 __field( ino_t, ino ) 424 __field( ino_t, ino )
305 __field( int, ret ) 425 __field( int, ret )
306 __field( int, pages_written ) 426 __field( int, pages_written )
@@ -310,7 +430,8 @@ TRACE_EVENT(ext4_da_writepages_result,
310 ), 430 ),
311 431
312 TP_fast_assign( 432 TP_fast_assign(
313 __entry->dev = inode->i_sb->s_dev; 433 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
434 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
314 __entry->ino = inode->i_ino; 435 __entry->ino = inode->i_ino;
315 __entry->ret = ret; 436 __entry->ret = ret;
316 __entry->pages_written = pages_written; 437 __entry->pages_written = pages_written;
@@ -319,8 +440,8 @@ TRACE_EVENT(ext4_da_writepages_result,
319 __entry->writeback_index = inode->i_mapping->writeback_index; 440 __entry->writeback_index = inode->i_mapping->writeback_index;
320 ), 441 ),
321 442
322 TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld more_io %d writeback_index %lu", 443 TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld more_io %d writeback_index %lu",
323 jbd2_dev_to_name(__entry->dev), 444 __entry->dev_major, __entry->dev_minor,
324 (unsigned long) __entry->ino, __entry->ret, 445 (unsigned long) __entry->ino, __entry->ret,
325 __entry->pages_written, __entry->pages_skipped, 446 __entry->pages_written, __entry->pages_skipped,
326 __entry->more_io, 447 __entry->more_io,
@@ -334,20 +455,23 @@ TRACE_EVENT(ext4_discard_blocks,
334 TP_ARGS(sb, blk, count), 455 TP_ARGS(sb, blk, count),
335 456
336 TP_STRUCT__entry( 457 TP_STRUCT__entry(
337 __field( dev_t, dev ) 458 __field( int, dev_major )
459 __field( int, dev_minor )
338 __field( __u64, blk ) 460 __field( __u64, blk )
339 __field( __u64, count ) 461 __field( __u64, count )
340 462
341 ), 463 ),
342 464
343 TP_fast_assign( 465 TP_fast_assign(
344 __entry->dev = sb->s_dev; 466 __entry->dev_major = MAJOR(sb->s_dev);
467 __entry->dev_minor = MINOR(sb->s_dev);
345 __entry->blk = blk; 468 __entry->blk = blk;
346 __entry->count = count; 469 __entry->count = count;
347 ), 470 ),
348 471
349 TP_printk("dev %s blk %llu count %llu", 472 TP_printk("dev %d,%d blk %llu count %llu",
350 jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count) 473 __entry->dev_major, __entry->dev_minor,
474 __entry->blk, __entry->count)
351); 475);
352 476
353DECLARE_EVENT_CLASS(ext4__mb_new_pa, 477DECLARE_EVENT_CLASS(ext4__mb_new_pa,
@@ -357,7 +481,8 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa,
357 TP_ARGS(ac, pa), 481 TP_ARGS(ac, pa),
358 482
359 TP_STRUCT__entry( 483 TP_STRUCT__entry(
360 __field( dev_t, dev ) 484 __field( int, dev_major )
485 __field( int, dev_minor )
361 __field( ino_t, ino ) 486 __field( ino_t, ino )
362 __field( __u64, pa_pstart ) 487 __field( __u64, pa_pstart )
363 __field( __u32, pa_len ) 488 __field( __u32, pa_len )
@@ -366,16 +491,18 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa,
366 ), 491 ),
367 492
368 TP_fast_assign( 493 TP_fast_assign(
369 __entry->dev = ac->ac_sb->s_dev; 494 __entry->dev_major = MAJOR(ac->ac_sb->s_dev);
495 __entry->dev_minor = MINOR(ac->ac_sb->s_dev);
370 __entry->ino = ac->ac_inode->i_ino; 496 __entry->ino = ac->ac_inode->i_ino;
371 __entry->pa_pstart = pa->pa_pstart; 497 __entry->pa_pstart = pa->pa_pstart;
372 __entry->pa_len = pa->pa_len; 498 __entry->pa_len = pa->pa_len;
373 __entry->pa_lstart = pa->pa_lstart; 499 __entry->pa_lstart = pa->pa_lstart;
374 ), 500 ),
375 501
376 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", 502 TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu",
377 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 503 __entry->dev_major, __entry->dev_minor,
378 __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) 504 (unsigned long) __entry->ino, __entry->pa_pstart,
505 __entry->pa_len, __entry->pa_lstart)
379); 506);
380 507
381DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, 508DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa,
@@ -396,14 +523,15 @@ DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa,
396 523
397TRACE_EVENT(ext4_mb_release_inode_pa, 524TRACE_EVENT(ext4_mb_release_inode_pa,
398 TP_PROTO(struct super_block *sb, 525 TP_PROTO(struct super_block *sb,
399 struct ext4_allocation_context *ac, 526 struct inode *inode,
400 struct ext4_prealloc_space *pa, 527 struct ext4_prealloc_space *pa,
401 unsigned long long block, unsigned int count), 528 unsigned long long block, unsigned int count),
402 529
403 TP_ARGS(sb, ac, pa, block, count), 530 TP_ARGS(sb, inode, pa, block, count),
404 531
405 TP_STRUCT__entry( 532 TP_STRUCT__entry(
406 __field( dev_t, dev ) 533 __field( int, dev_major )
534 __field( int, dev_minor )
407 __field( ino_t, ino ) 535 __field( ino_t, ino )
408 __field( __u64, block ) 536 __field( __u64, block )
409 __field( __u32, count ) 537 __field( __u32, count )
@@ -411,43 +539,42 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
411 ), 539 ),
412 540
413 TP_fast_assign( 541 TP_fast_assign(
414 __entry->dev = sb->s_dev; 542 __entry->dev_major = MAJOR(sb->s_dev);
415 __entry->ino = (ac && ac->ac_inode) ? 543 __entry->dev_minor = MINOR(sb->s_dev);
416 ac->ac_inode->i_ino : 0; 544 __entry->ino = inode->i_ino;
417 __entry->block = block; 545 __entry->block = block;
418 __entry->count = count; 546 __entry->count = count;
419 ), 547 ),
420 548
421 TP_printk("dev %s ino %lu block %llu count %u", 549 TP_printk("dev %d,%d ino %lu block %llu count %u",
422 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 550 __entry->dev_major, __entry->dev_minor,
423 __entry->block, __entry->count) 551 (unsigned long) __entry->ino, __entry->block, __entry->count)
424); 552);
425 553
426TRACE_EVENT(ext4_mb_release_group_pa, 554TRACE_EVENT(ext4_mb_release_group_pa,
427 TP_PROTO(struct super_block *sb, 555 TP_PROTO(struct super_block *sb,
428 struct ext4_allocation_context *ac,
429 struct ext4_prealloc_space *pa), 556 struct ext4_prealloc_space *pa),
430 557
431 TP_ARGS(sb, ac, pa), 558 TP_ARGS(sb, pa),
432 559
433 TP_STRUCT__entry( 560 TP_STRUCT__entry(
434 __field( dev_t, dev ) 561 __field( int, dev_major )
435 __field( ino_t, ino ) 562 __field( int, dev_minor )
436 __field( __u64, pa_pstart ) 563 __field( __u64, pa_pstart )
437 __field( __u32, pa_len ) 564 __field( __u32, pa_len )
438 565
439 ), 566 ),
440 567
441 TP_fast_assign( 568 TP_fast_assign(
442 __entry->dev = sb->s_dev; 569 __entry->dev_major = MAJOR(sb->s_dev);
443 __entry->ino = (ac && ac->ac_inode) ? 570 __entry->dev_minor = MINOR(sb->s_dev);
444 ac->ac_inode->i_ino : 0;
445 __entry->pa_pstart = pa->pa_pstart; 571 __entry->pa_pstart = pa->pa_pstart;
446 __entry->pa_len = pa->pa_len; 572 __entry->pa_len = pa->pa_len;
447 ), 573 ),
448 574
449 TP_printk("dev %s pstart %llu len %u", 575 TP_printk("dev %d,%d pstart %llu len %u",
450 jbd2_dev_to_name(__entry->dev), __entry->pa_pstart, __entry->pa_len) 576 __entry->dev_major, __entry->dev_minor,
577 __entry->pa_pstart, __entry->pa_len)
451); 578);
452 579
453TRACE_EVENT(ext4_discard_preallocations, 580TRACE_EVENT(ext4_discard_preallocations,
@@ -456,18 +583,21 @@ TRACE_EVENT(ext4_discard_preallocations,
456 TP_ARGS(inode), 583 TP_ARGS(inode),
457 584
458 TP_STRUCT__entry( 585 TP_STRUCT__entry(
459 __field( dev_t, dev ) 586 __field( int, dev_major )
587 __field( int, dev_minor )
460 __field( ino_t, ino ) 588 __field( ino_t, ino )
461 589
462 ), 590 ),
463 591
464 TP_fast_assign( 592 TP_fast_assign(
465 __entry->dev = inode->i_sb->s_dev; 593 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
594 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
466 __entry->ino = inode->i_ino; 595 __entry->ino = inode->i_ino;
467 ), 596 ),
468 597
469 TP_printk("dev %s ino %lu", 598 TP_printk("dev %d,%d ino %lu",
470 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) 599 __entry->dev_major, __entry->dev_minor,
600 (unsigned long) __entry->ino)
471); 601);
472 602
473TRACE_EVENT(ext4_mb_discard_preallocations, 603TRACE_EVENT(ext4_mb_discard_preallocations,
@@ -476,18 +606,20 @@ TRACE_EVENT(ext4_mb_discard_preallocations,
476 TP_ARGS(sb, needed), 606 TP_ARGS(sb, needed),
477 607
478 TP_STRUCT__entry( 608 TP_STRUCT__entry(
479 __field( dev_t, dev ) 609 __field( int, dev_major )
610 __field( int, dev_minor )
480 __field( int, needed ) 611 __field( int, needed )
481 612
482 ), 613 ),
483 614
484 TP_fast_assign( 615 TP_fast_assign(
485 __entry->dev = sb->s_dev; 616 __entry->dev_major = MAJOR(sb->s_dev);
617 __entry->dev_minor = MINOR(sb->s_dev);
486 __entry->needed = needed; 618 __entry->needed = needed;
487 ), 619 ),
488 620
489 TP_printk("dev %s needed %d", 621 TP_printk("dev %d,%d needed %d",
490 jbd2_dev_to_name(__entry->dev), __entry->needed) 622 __entry->dev_major, __entry->dev_minor, __entry->needed)
491); 623);
492 624
493TRACE_EVENT(ext4_request_blocks, 625TRACE_EVENT(ext4_request_blocks,
@@ -496,7 +628,8 @@ TRACE_EVENT(ext4_request_blocks,
496 TP_ARGS(ar), 628 TP_ARGS(ar),
497 629
498 TP_STRUCT__entry( 630 TP_STRUCT__entry(
499 __field( dev_t, dev ) 631 __field( int, dev_major )
632 __field( int, dev_minor )
500 __field( ino_t, ino ) 633 __field( ino_t, ino )
501 __field( unsigned int, flags ) 634 __field( unsigned int, flags )
502 __field( unsigned int, len ) 635 __field( unsigned int, len )
@@ -509,7 +642,8 @@ TRACE_EVENT(ext4_request_blocks,
509 ), 642 ),
510 643
511 TP_fast_assign( 644 TP_fast_assign(
512 __entry->dev = ar->inode->i_sb->s_dev; 645 __entry->dev_major = MAJOR(ar->inode->i_sb->s_dev);
646 __entry->dev_minor = MINOR(ar->inode->i_sb->s_dev);
513 __entry->ino = ar->inode->i_ino; 647 __entry->ino = ar->inode->i_ino;
514 __entry->flags = ar->flags; 648 __entry->flags = ar->flags;
515 __entry->len = ar->len; 649 __entry->len = ar->len;
@@ -521,8 +655,9 @@ TRACE_EVENT(ext4_request_blocks,
521 __entry->pright = ar->pright; 655 __entry->pright = ar->pright;
522 ), 656 ),
523 657
524 TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", 658 TP_printk("dev %d,%d ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ",
525 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 659 __entry->dev_major, __entry->dev_minor,
660 (unsigned long) __entry->ino,
526 __entry->flags, __entry->len, 661 __entry->flags, __entry->len,
527 (unsigned long long) __entry->logical, 662 (unsigned long long) __entry->logical,
528 (unsigned long long) __entry->goal, 663 (unsigned long long) __entry->goal,
@@ -538,7 +673,8 @@ TRACE_EVENT(ext4_allocate_blocks,
538 TP_ARGS(ar, block), 673 TP_ARGS(ar, block),
539 674
540 TP_STRUCT__entry( 675 TP_STRUCT__entry(
541 __field( dev_t, dev ) 676 __field( int, dev_major )
677 __field( int, dev_minor )
542 __field( ino_t, ino ) 678 __field( ino_t, ino )
543 __field( __u64, block ) 679 __field( __u64, block )
544 __field( unsigned int, flags ) 680 __field( unsigned int, flags )
@@ -552,7 +688,8 @@ TRACE_EVENT(ext4_allocate_blocks,
552 ), 688 ),
553 689
554 TP_fast_assign( 690 TP_fast_assign(
555 __entry->dev = ar->inode->i_sb->s_dev; 691 __entry->dev_major = MAJOR(ar->inode->i_sb->s_dev);
692 __entry->dev_minor = MINOR(ar->inode->i_sb->s_dev);
556 __entry->ino = ar->inode->i_ino; 693 __entry->ino = ar->inode->i_ino;
557 __entry->block = block; 694 __entry->block = block;
558 __entry->flags = ar->flags; 695 __entry->flags = ar->flags;
@@ -565,9 +702,10 @@ TRACE_EVENT(ext4_allocate_blocks,
565 __entry->pright = ar->pright; 702 __entry->pright = ar->pright;
566 ), 703 ),
567 704
568 TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", 705 TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ",
569 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 706 __entry->dev_major, __entry->dev_minor,
570 __entry->flags, __entry->len, __entry->block, 707 (unsigned long) __entry->ino, __entry->flags,
708 __entry->len, __entry->block,
571 (unsigned long long) __entry->logical, 709 (unsigned long long) __entry->logical,
572 (unsigned long long) __entry->goal, 710 (unsigned long long) __entry->goal,
573 (unsigned long long) __entry->lleft, 711 (unsigned long long) __entry->lleft,
@@ -583,7 +721,8 @@ TRACE_EVENT(ext4_free_blocks,
583 TP_ARGS(inode, block, count, flags), 721 TP_ARGS(inode, block, count, flags),
584 722
585 TP_STRUCT__entry( 723 TP_STRUCT__entry(
586 __field( dev_t, dev ) 724 __field( int, dev_major )
725 __field( int, dev_minor )
587 __field( ino_t, ino ) 726 __field( ino_t, ino )
588 __field( umode_t, mode ) 727 __field( umode_t, mode )
589 __field( __u64, block ) 728 __field( __u64, block )
@@ -592,7 +731,8 @@ TRACE_EVENT(ext4_free_blocks,
592 ), 731 ),
593 732
594 TP_fast_assign( 733 TP_fast_assign(
595 __entry->dev = inode->i_sb->s_dev; 734 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
735 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
596 __entry->ino = inode->i_ino; 736 __entry->ino = inode->i_ino;
597 __entry->mode = inode->i_mode; 737 __entry->mode = inode->i_mode;
598 __entry->block = block; 738 __entry->block = block;
@@ -600,8 +740,9 @@ TRACE_EVENT(ext4_free_blocks,
600 __entry->flags = flags; 740 __entry->flags = flags;
601 ), 741 ),
602 742
603 TP_printk("dev %s ino %lu mode 0%o block %llu count %lu flags %d", 743 TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d",
604 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 744 __entry->dev_major, __entry->dev_minor,
745 (unsigned long) __entry->ino,
605 __entry->mode, __entry->block, __entry->count, 746 __entry->mode, __entry->block, __entry->count,
606 __entry->flags) 747 __entry->flags)
607); 748);
@@ -612,7 +753,8 @@ TRACE_EVENT(ext4_sync_file,
612 TP_ARGS(file, datasync), 753 TP_ARGS(file, datasync),
613 754
614 TP_STRUCT__entry( 755 TP_STRUCT__entry(
615 __field( dev_t, dev ) 756 __field( int, dev_major )
757 __field( int, dev_minor )
616 __field( ino_t, ino ) 758 __field( ino_t, ino )
617 __field( ino_t, parent ) 759 __field( ino_t, parent )
618 __field( int, datasync ) 760 __field( int, datasync )
@@ -621,14 +763,16 @@ TRACE_EVENT(ext4_sync_file,
621 TP_fast_assign( 763 TP_fast_assign(
622 struct dentry *dentry = file->f_path.dentry; 764 struct dentry *dentry = file->f_path.dentry;
623 765
624 __entry->dev = dentry->d_inode->i_sb->s_dev; 766 __entry->dev_major = MAJOR(dentry->d_inode->i_sb->s_dev);
767 __entry->dev_minor = MINOR(dentry->d_inode->i_sb->s_dev);
625 __entry->ino = dentry->d_inode->i_ino; 768 __entry->ino = dentry->d_inode->i_ino;
626 __entry->datasync = datasync; 769 __entry->datasync = datasync;
627 __entry->parent = dentry->d_parent->d_inode->i_ino; 770 __entry->parent = dentry->d_parent->d_inode->i_ino;
628 ), 771 ),
629 772
630 TP_printk("dev %s ino %ld parent %ld datasync %d ", 773 TP_printk("dev %d,%d ino %ld parent %ld datasync %d ",
631 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 774 __entry->dev_major, __entry->dev_minor,
775 (unsigned long) __entry->ino,
632 (unsigned long) __entry->parent, __entry->datasync) 776 (unsigned long) __entry->parent, __entry->datasync)
633); 777);
634 778
@@ -638,18 +782,20 @@ TRACE_EVENT(ext4_sync_fs,
638 TP_ARGS(sb, wait), 782 TP_ARGS(sb, wait),
639 783
640 TP_STRUCT__entry( 784 TP_STRUCT__entry(
641 __field( dev_t, dev ) 785 __field( int, dev_major )
786 __field( int, dev_minor )
642 __field( int, wait ) 787 __field( int, wait )
643 788
644 ), 789 ),
645 790
646 TP_fast_assign( 791 TP_fast_assign(
647 __entry->dev = sb->s_dev; 792 __entry->dev_major = MAJOR(sb->s_dev);
793 __entry->dev_minor = MINOR(sb->s_dev);
648 __entry->wait = wait; 794 __entry->wait = wait;
649 ), 795 ),
650 796
651 TP_printk("dev %s wait %d", jbd2_dev_to_name(__entry->dev), 797 TP_printk("dev %d,%d wait %d", __entry->dev_major,
652 __entry->wait) 798 __entry->dev_minor, __entry->wait)
653); 799);
654 800
655TRACE_EVENT(ext4_alloc_da_blocks, 801TRACE_EVENT(ext4_alloc_da_blocks,
@@ -658,21 +804,24 @@ TRACE_EVENT(ext4_alloc_da_blocks,
658 TP_ARGS(inode), 804 TP_ARGS(inode),
659 805
660 TP_STRUCT__entry( 806 TP_STRUCT__entry(
661 __field( dev_t, dev ) 807 __field( int, dev_major )
808 __field( int, dev_minor )
662 __field( ino_t, ino ) 809 __field( ino_t, ino )
663 __field( unsigned int, data_blocks ) 810 __field( unsigned int, data_blocks )
664 __field( unsigned int, meta_blocks ) 811 __field( unsigned int, meta_blocks )
665 ), 812 ),
666 813
667 TP_fast_assign( 814 TP_fast_assign(
668 __entry->dev = inode->i_sb->s_dev; 815 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
816 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
669 __entry->ino = inode->i_ino; 817 __entry->ino = inode->i_ino;
670 __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; 818 __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
671 __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; 819 __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
672 ), 820 ),
673 821
674 TP_printk("dev %s ino %lu data_blocks %u meta_blocks %u", 822 TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u",
675 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 823 __entry->dev_major, __entry->dev_minor,
824 (unsigned long) __entry->ino,
676 __entry->data_blocks, __entry->meta_blocks) 825 __entry->data_blocks, __entry->meta_blocks)
677); 826);
678 827
@@ -682,7 +831,8 @@ TRACE_EVENT(ext4_mballoc_alloc,
682 TP_ARGS(ac), 831 TP_ARGS(ac),
683 832
684 TP_STRUCT__entry( 833 TP_STRUCT__entry(
685 __field( dev_t, dev ) 834 __field( int, dev_major )
835 __field( int, dev_minor )
686 __field( ino_t, ino ) 836 __field( ino_t, ino )
687 __field( __u16, found ) 837 __field( __u16, found )
688 __field( __u16, groups ) 838 __field( __u16, groups )
@@ -705,7 +855,8 @@ TRACE_EVENT(ext4_mballoc_alloc,
705 ), 855 ),
706 856
707 TP_fast_assign( 857 TP_fast_assign(
708 __entry->dev = ac->ac_inode->i_sb->s_dev; 858 __entry->dev_major = MAJOR(ac->ac_inode->i_sb->s_dev);
859 __entry->dev_minor = MINOR(ac->ac_inode->i_sb->s_dev);
709 __entry->ino = ac->ac_inode->i_ino; 860 __entry->ino = ac->ac_inode->i_ino;
710 __entry->found = ac->ac_found; 861 __entry->found = ac->ac_found;
711 __entry->flags = ac->ac_flags; 862 __entry->flags = ac->ac_flags;
@@ -727,10 +878,11 @@ TRACE_EVENT(ext4_mballoc_alloc,
727 __entry->result_len = ac->ac_f_ex.fe_len; 878 __entry->result_len = ac->ac_f_ex.fe_len;
728 ), 879 ),
729 880
730 TP_printk("dev %s inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " 881 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
731 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " 882 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x "
732 "tail %u broken %u", 883 "tail %u broken %u",
733 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 884 __entry->dev_major, __entry->dev_minor,
885 (unsigned long) __entry->ino,
734 __entry->orig_group, __entry->orig_start, 886 __entry->orig_group, __entry->orig_start,
735 __entry->orig_len, __entry->orig_logical, 887 __entry->orig_len, __entry->orig_logical,
736 __entry->goal_group, __entry->goal_start, 888 __entry->goal_group, __entry->goal_start,
@@ -748,7 +900,8 @@ TRACE_EVENT(ext4_mballoc_prealloc,
748 TP_ARGS(ac), 900 TP_ARGS(ac),
749 901
750 TP_STRUCT__entry( 902 TP_STRUCT__entry(
751 __field( dev_t, dev ) 903 __field( int, dev_major )
904 __field( int, dev_minor )
752 __field( ino_t, ino ) 905 __field( ino_t, ino )
753 __field( __u32, orig_logical ) 906 __field( __u32, orig_logical )
754 __field( int, orig_start ) 907 __field( int, orig_start )
@@ -761,7 +914,8 @@ TRACE_EVENT(ext4_mballoc_prealloc,
761 ), 914 ),
762 915
763 TP_fast_assign( 916 TP_fast_assign(
764 __entry->dev = ac->ac_inode->i_sb->s_dev; 917 __entry->dev_major = MAJOR(ac->ac_inode->i_sb->s_dev);
918 __entry->dev_minor = MINOR(ac->ac_inode->i_sb->s_dev);
765 __entry->ino = ac->ac_inode->i_ino; 919 __entry->ino = ac->ac_inode->i_ino;
766 __entry->orig_logical = ac->ac_o_ex.fe_logical; 920 __entry->orig_logical = ac->ac_o_ex.fe_logical;
767 __entry->orig_start = ac->ac_o_ex.fe_start; 921 __entry->orig_start = ac->ac_o_ex.fe_start;
@@ -773,8 +927,9 @@ TRACE_EVENT(ext4_mballoc_prealloc,
773 __entry->result_len = ac->ac_b_ex.fe_len; 927 __entry->result_len = ac->ac_b_ex.fe_len;
774 ), 928 ),
775 929
776 TP_printk("dev %s inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", 930 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
777 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 931 __entry->dev_major, __entry->dev_minor,
932 (unsigned long) __entry->ino,
778 __entry->orig_group, __entry->orig_start, 933 __entry->orig_group, __entry->orig_start,
779 __entry->orig_len, __entry->orig_logical, 934 __entry->orig_len, __entry->orig_logical,
780 __entry->result_group, __entry->result_start, 935 __entry->result_group, __entry->result_start,
@@ -782,46 +937,59 @@ TRACE_EVENT(ext4_mballoc_prealloc,
782); 937);
783 938
784DECLARE_EVENT_CLASS(ext4__mballoc, 939DECLARE_EVENT_CLASS(ext4__mballoc,
785 TP_PROTO(struct ext4_allocation_context *ac), 940 TP_PROTO(struct super_block *sb,
941 struct inode *inode,
942 ext4_group_t group,
943 ext4_grpblk_t start,
944 ext4_grpblk_t len),
786 945
787 TP_ARGS(ac), 946 TP_ARGS(sb, inode, group, start, len),
788 947
789 TP_STRUCT__entry( 948 TP_STRUCT__entry(
790 __field( dev_t, dev ) 949 __field( int, dev_major )
950 __field( int, dev_minor )
791 __field( ino_t, ino ) 951 __field( ino_t, ino )
792 __field( __u32, result_logical )
793 __field( int, result_start ) 952 __field( int, result_start )
794 __field( __u32, result_group ) 953 __field( __u32, result_group )
795 __field( int, result_len ) 954 __field( int, result_len )
796 ), 955 ),
797 956
798 TP_fast_assign( 957 TP_fast_assign(
799 __entry->dev = ac->ac_inode->i_sb->s_dev; 958 __entry->dev_major = MAJOR(sb->s_dev);
800 __entry->ino = ac->ac_inode->i_ino; 959 __entry->dev_minor = MINOR(sb->s_dev);
801 __entry->result_logical = ac->ac_b_ex.fe_logical; 960 __entry->ino = inode ? inode->i_ino : 0;
802 __entry->result_start = ac->ac_b_ex.fe_start; 961 __entry->result_start = start;
803 __entry->result_group = ac->ac_b_ex.fe_group; 962 __entry->result_group = group;
804 __entry->result_len = ac->ac_b_ex.fe_len; 963 __entry->result_len = len;
805 ), 964 ),
806 965
807 TP_printk("dev %s inode %lu extent %u/%d/%u@%u ", 966 TP_printk("dev %d,%d inode %lu extent %u/%d/%u ",
808 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 967 __entry->dev_major, __entry->dev_minor,
968 (unsigned long) __entry->ino,
809 __entry->result_group, __entry->result_start, 969 __entry->result_group, __entry->result_start,
810 __entry->result_len, __entry->result_logical) 970 __entry->result_len)
811); 971);
812 972
813DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard, 973DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard,
814 974
815 TP_PROTO(struct ext4_allocation_context *ac), 975 TP_PROTO(struct super_block *sb,
976 struct inode *inode,
977 ext4_group_t group,
978 ext4_grpblk_t start,
979 ext4_grpblk_t len),
816 980
817 TP_ARGS(ac) 981 TP_ARGS(sb, inode, group, start, len)
818); 982);
819 983
820DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free, 984DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free,
821 985
822 TP_PROTO(struct ext4_allocation_context *ac), 986 TP_PROTO(struct super_block *sb,
987 struct inode *inode,
988 ext4_group_t group,
989 ext4_grpblk_t start,
990 ext4_grpblk_t len),
823 991
824 TP_ARGS(ac) 992 TP_ARGS(sb, inode, group, start, len)
825); 993);
826 994
827TRACE_EVENT(ext4_forget, 995TRACE_EVENT(ext4_forget,
@@ -830,7 +998,8 @@ TRACE_EVENT(ext4_forget,
830 TP_ARGS(inode, is_metadata, block), 998 TP_ARGS(inode, is_metadata, block),
831 999
832 TP_STRUCT__entry( 1000 TP_STRUCT__entry(
833 __field( dev_t, dev ) 1001 __field( int, dev_major )
1002 __field( int, dev_minor )
834 __field( ino_t, ino ) 1003 __field( ino_t, ino )
835 __field( umode_t, mode ) 1004 __field( umode_t, mode )
836 __field( int, is_metadata ) 1005 __field( int, is_metadata )
@@ -838,16 +1007,18 @@ TRACE_EVENT(ext4_forget,
838 ), 1007 ),
839 1008
840 TP_fast_assign( 1009 TP_fast_assign(
841 __entry->dev = inode->i_sb->s_dev; 1010 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
1011 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
842 __entry->ino = inode->i_ino; 1012 __entry->ino = inode->i_ino;
843 __entry->mode = inode->i_mode; 1013 __entry->mode = inode->i_mode;
844 __entry->is_metadata = is_metadata; 1014 __entry->is_metadata = is_metadata;
845 __entry->block = block; 1015 __entry->block = block;
846 ), 1016 ),
847 1017
848 TP_printk("dev %s ino %lu mode 0%o is_metadata %d block %llu", 1018 TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu",
849 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 1019 __entry->dev_major, __entry->dev_minor,
850 __entry->mode, __entry->is_metadata, __entry->block) 1020 (unsigned long) __entry->ino, __entry->mode,
1021 __entry->is_metadata, __entry->block)
851); 1022);
852 1023
853TRACE_EVENT(ext4_da_update_reserve_space, 1024TRACE_EVENT(ext4_da_update_reserve_space,
@@ -856,7 +1027,8 @@ TRACE_EVENT(ext4_da_update_reserve_space,
856 TP_ARGS(inode, used_blocks), 1027 TP_ARGS(inode, used_blocks),
857 1028
858 TP_STRUCT__entry( 1029 TP_STRUCT__entry(
859 __field( dev_t, dev ) 1030 __field( int, dev_major )
1031 __field( int, dev_minor )
860 __field( ino_t, ino ) 1032 __field( ino_t, ino )
861 __field( umode_t, mode ) 1033 __field( umode_t, mode )
862 __field( __u64, i_blocks ) 1034 __field( __u64, i_blocks )
@@ -867,7 +1039,8 @@ TRACE_EVENT(ext4_da_update_reserve_space,
867 ), 1039 ),
868 1040
869 TP_fast_assign( 1041 TP_fast_assign(
870 __entry->dev = inode->i_sb->s_dev; 1042 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
1043 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
871 __entry->ino = inode->i_ino; 1044 __entry->ino = inode->i_ino;
872 __entry->mode = inode->i_mode; 1045 __entry->mode = inode->i_mode;
873 __entry->i_blocks = inode->i_blocks; 1046 __entry->i_blocks = inode->i_blocks;
@@ -877,9 +1050,10 @@ TRACE_EVENT(ext4_da_update_reserve_space,
877 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; 1050 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks;
878 ), 1051 ),
879 1052
880 TP_printk("dev %s ino %lu mode 0%o i_blocks %llu used_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", 1053 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d",
881 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 1054 __entry->dev_major, __entry->dev_minor,
882 __entry->mode, (unsigned long long) __entry->i_blocks, 1055 (unsigned long) __entry->ino, __entry->mode,
1056 (unsigned long long) __entry->i_blocks,
883 __entry->used_blocks, __entry->reserved_data_blocks, 1057 __entry->used_blocks, __entry->reserved_data_blocks,
884 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) 1058 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
885); 1059);
@@ -890,7 +1064,8 @@ TRACE_EVENT(ext4_da_reserve_space,
890 TP_ARGS(inode, md_needed), 1064 TP_ARGS(inode, md_needed),
891 1065
892 TP_STRUCT__entry( 1066 TP_STRUCT__entry(
893 __field( dev_t, dev ) 1067 __field( int, dev_major )
1068 __field( int, dev_minor )
894 __field( ino_t, ino ) 1069 __field( ino_t, ino )
895 __field( umode_t, mode ) 1070 __field( umode_t, mode )
896 __field( __u64, i_blocks ) 1071 __field( __u64, i_blocks )
@@ -900,7 +1075,8 @@ TRACE_EVENT(ext4_da_reserve_space,
900 ), 1075 ),
901 1076
902 TP_fast_assign( 1077 TP_fast_assign(
903 __entry->dev = inode->i_sb->s_dev; 1078 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
1079 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
904 __entry->ino = inode->i_ino; 1080 __entry->ino = inode->i_ino;
905 __entry->mode = inode->i_mode; 1081 __entry->mode = inode->i_mode;
906 __entry->i_blocks = inode->i_blocks; 1082 __entry->i_blocks = inode->i_blocks;
@@ -909,8 +1085,9 @@ TRACE_EVENT(ext4_da_reserve_space,
909 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; 1085 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
910 ), 1086 ),
911 1087
912 TP_printk("dev %s ino %lu mode 0%o i_blocks %llu md_needed %d reserved_data_blocks %d reserved_meta_blocks %d", 1088 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d reserved_data_blocks %d reserved_meta_blocks %d",
913 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 1089 __entry->dev_major, __entry->dev_minor,
1090 (unsigned long) __entry->ino,
914 __entry->mode, (unsigned long long) __entry->i_blocks, 1091 __entry->mode, (unsigned long long) __entry->i_blocks,
915 __entry->md_needed, __entry->reserved_data_blocks, 1092 __entry->md_needed, __entry->reserved_data_blocks,
916 __entry->reserved_meta_blocks) 1093 __entry->reserved_meta_blocks)
@@ -922,7 +1099,8 @@ TRACE_EVENT(ext4_da_release_space,
922 TP_ARGS(inode, freed_blocks), 1099 TP_ARGS(inode, freed_blocks),
923 1100
924 TP_STRUCT__entry( 1101 TP_STRUCT__entry(
925 __field( dev_t, dev ) 1102 __field( int, dev_major )
1103 __field( int, dev_minor )
926 __field( ino_t, ino ) 1104 __field( ino_t, ino )
927 __field( umode_t, mode ) 1105 __field( umode_t, mode )
928 __field( __u64, i_blocks ) 1106 __field( __u64, i_blocks )
@@ -933,7 +1111,8 @@ TRACE_EVENT(ext4_da_release_space,
933 ), 1111 ),
934 1112
935 TP_fast_assign( 1113 TP_fast_assign(
936 __entry->dev = inode->i_sb->s_dev; 1114 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
1115 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
937 __entry->ino = inode->i_ino; 1116 __entry->ino = inode->i_ino;
938 __entry->mode = inode->i_mode; 1117 __entry->mode = inode->i_mode;
939 __entry->i_blocks = inode->i_blocks; 1118 __entry->i_blocks = inode->i_blocks;
@@ -943,8 +1122,9 @@ TRACE_EVENT(ext4_da_release_space,
943 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; 1122 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks;
944 ), 1123 ),
945 1124
946 TP_printk("dev %s ino %lu mode 0%o i_blocks %llu freed_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", 1125 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d",
947 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 1126 __entry->dev_major, __entry->dev_minor,
1127 (unsigned long) __entry->ino,
948 __entry->mode, (unsigned long long) __entry->i_blocks, 1128 __entry->mode, (unsigned long long) __entry->i_blocks,
949 __entry->freed_blocks, __entry->reserved_data_blocks, 1129 __entry->freed_blocks, __entry->reserved_data_blocks,
950 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) 1130 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
@@ -956,18 +1136,20 @@ DECLARE_EVENT_CLASS(ext4__bitmap_load,
956 TP_ARGS(sb, group), 1136 TP_ARGS(sb, group),
957 1137
958 TP_STRUCT__entry( 1138 TP_STRUCT__entry(
959 __field( dev_t, dev ) 1139 __field( int, dev_major )
1140 __field( int, dev_minor )
960 __field( __u32, group ) 1141 __field( __u32, group )
961 1142
962 ), 1143 ),
963 1144
964 TP_fast_assign( 1145 TP_fast_assign(
965 __entry->dev = sb->s_dev; 1146 __entry->dev_major = MAJOR(sb->s_dev);
1147 __entry->dev_minor = MINOR(sb->s_dev);
966 __entry->group = group; 1148 __entry->group = group;
967 ), 1149 ),
968 1150
969 TP_printk("dev %s group %u", 1151 TP_printk("dev %d,%d group %u",
970 jbd2_dev_to_name(__entry->dev), __entry->group) 1152 __entry->dev_major, __entry->dev_minor, __entry->group)
971); 1153);
972 1154
973DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, 1155DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load,
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
index 0e4cfb694fe7..1c09820df585 100644
--- a/include/trace/events/irq.h
+++ b/include/trace/events/irq.h
@@ -5,7 +5,9 @@
5#define _TRACE_IRQ_H 5#define _TRACE_IRQ_H
6 6
7#include <linux/tracepoint.h> 7#include <linux/tracepoint.h>
8#include <linux/interrupt.h> 8
9struct irqaction;
10struct softirq_action;
9 11
10#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } 12#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq }
11#define show_softirq_name(val) \ 13#define show_softirq_name(val) \
@@ -84,56 +86,62 @@ TRACE_EVENT(irq_handler_exit,
84 86
85DECLARE_EVENT_CLASS(softirq, 87DECLARE_EVENT_CLASS(softirq,
86 88
87 TP_PROTO(struct softirq_action *h, struct softirq_action *vec), 89 TP_PROTO(unsigned int vec_nr),
88 90
89 TP_ARGS(h, vec), 91 TP_ARGS(vec_nr),
90 92
91 TP_STRUCT__entry( 93 TP_STRUCT__entry(
92 __field( int, vec ) 94 __field( unsigned int, vec )
93 ), 95 ),
94 96
95 TP_fast_assign( 97 TP_fast_assign(
96 __entry->vec = (int)(h - vec); 98 __entry->vec = vec_nr;
97 ), 99 ),
98 100
99 TP_printk("vec=%d [action=%s]", __entry->vec, 101 TP_printk("vec=%u [action=%s]", __entry->vec,
100 show_softirq_name(__entry->vec)) 102 show_softirq_name(__entry->vec))
101); 103);
102 104
103/** 105/**
104 * softirq_entry - called immediately before the softirq handler 106 * softirq_entry - called immediately before the softirq handler
105 * @h: pointer to struct softirq_action 107 * @vec_nr: softirq vector number
106 * @vec: pointer to first struct softirq_action in softirq_vec array
107 * 108 *
108 * The @h parameter, contains a pointer to the struct softirq_action 109 * When used in combination with the softirq_exit tracepoint
109 * which has a pointer to the action handler that is called. By subtracting 110 * we can determine the softirq handler runtine.
110 * the @vec pointer from the @h pointer, we can determine the softirq
111 * number. Also, when used in combination with the softirq_exit tracepoint
112 * we can determine the softirq latency.
113 */ 111 */
114DEFINE_EVENT(softirq, softirq_entry, 112DEFINE_EVENT(softirq, softirq_entry,
115 113
116 TP_PROTO(struct softirq_action *h, struct softirq_action *vec), 114 TP_PROTO(unsigned int vec_nr),
117 115
118 TP_ARGS(h, vec) 116 TP_ARGS(vec_nr)
119); 117);
120 118
121/** 119/**
122 * softirq_exit - called immediately after the softirq handler returns 120 * softirq_exit - called immediately after the softirq handler returns
123 * @h: pointer to struct softirq_action 121 * @vec_nr: softirq vector number
124 * @vec: pointer to first struct softirq_action in softirq_vec array
125 * 122 *
126 * The @h parameter contains a pointer to the struct softirq_action 123 * When used in combination with the softirq_entry tracepoint
127 * that has handled the softirq. By subtracting the @vec pointer from 124 * we can determine the softirq handler runtine.
128 * the @h pointer, we can determine the softirq number. Also, when used in
129 * combination with the softirq_entry tracepoint we can determine the softirq
130 * latency.
131 */ 125 */
132DEFINE_EVENT(softirq, softirq_exit, 126DEFINE_EVENT(softirq, softirq_exit,
133 127
134 TP_PROTO(struct softirq_action *h, struct softirq_action *vec), 128 TP_PROTO(unsigned int vec_nr),
129
130 TP_ARGS(vec_nr)
131);
132
133/**
134 * softirq_raise - called immediately when a softirq is raised
135 * @vec_nr: softirq vector number
136 *
137 * When used in combination with the softirq_entry tracepoint
138 * we can determine the softirq raise to run latency.
139 */
140DEFINE_EVENT(softirq, softirq_raise,
141
142 TP_PROTO(unsigned int vec_nr),
135 143
136 TP_ARGS(h, vec) 144 TP_ARGS(vec_nr)
137); 145);
138 146
139#endif /* _TRACE_IRQ_H */ 147#endif /* _TRACE_IRQ_H */
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h
index bf16545cc977..7447ea9305b5 100644
--- a/include/trace/events/jbd2.h
+++ b/include/trace/events/jbd2.h
@@ -17,17 +17,19 @@ 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( dev_t, dev ) 20 __field( int, dev_major )
21 __field( int, dev_minor )
21 __field( int, result ) 22 __field( int, result )
22 ), 23 ),
23 24
24 TP_fast_assign( 25 TP_fast_assign(
25 __entry->dev = journal->j_fs_dev->bd_dev; 26 __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev);
27 __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
26 __entry->result = result; 28 __entry->result = result;
27 ), 29 ),
28 30
29 TP_printk("dev %s result %d", 31 TP_printk("dev %d,%d result %d",
30 jbd2_dev_to_name(__entry->dev), __entry->result) 32 __entry->dev_major, __entry->dev_minor, __entry->result)
31); 33);
32 34
33DECLARE_EVENT_CLASS(jbd2_commit, 35DECLARE_EVENT_CLASS(jbd2_commit,
@@ -37,20 +39,22 @@ DECLARE_EVENT_CLASS(jbd2_commit,
37 TP_ARGS(journal, commit_transaction), 39 TP_ARGS(journal, commit_transaction),
38 40
39 TP_STRUCT__entry( 41 TP_STRUCT__entry(
40 __field( dev_t, dev ) 42 __field( int, dev_major )
43 __field( int, dev_minor )
41 __field( char, sync_commit ) 44 __field( char, sync_commit )
42 __field( int, transaction ) 45 __field( int, transaction )
43 ), 46 ),
44 47
45 TP_fast_assign( 48 TP_fast_assign(
46 __entry->dev = journal->j_fs_dev->bd_dev; 49 __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev);
50 __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
47 __entry->sync_commit = commit_transaction->t_synchronous_commit; 51 __entry->sync_commit = commit_transaction->t_synchronous_commit;
48 __entry->transaction = commit_transaction->t_tid; 52 __entry->transaction = commit_transaction->t_tid;
49 ), 53 ),
50 54
51 TP_printk("dev %s transaction %d sync %d", 55 TP_printk("dev %d,%d transaction %d sync %d",
52 jbd2_dev_to_name(__entry->dev), __entry->transaction, 56 __entry->dev_major, __entry->dev_minor,
53 __entry->sync_commit) 57 __entry->transaction, __entry->sync_commit)
54); 58);
55 59
56DEFINE_EVENT(jbd2_commit, jbd2_start_commit, 60DEFINE_EVENT(jbd2_commit, jbd2_start_commit,
@@ -87,22 +91,24 @@ TRACE_EVENT(jbd2_end_commit,
87 TP_ARGS(journal, commit_transaction), 91 TP_ARGS(journal, commit_transaction),
88 92
89 TP_STRUCT__entry( 93 TP_STRUCT__entry(
90 __field( dev_t, dev ) 94 __field( int, dev_major )
95 __field( int, dev_minor )
91 __field( char, sync_commit ) 96 __field( char, sync_commit )
92 __field( int, transaction ) 97 __field( int, transaction )
93 __field( int, head ) 98 __field( int, head )
94 ), 99 ),
95 100
96 TP_fast_assign( 101 TP_fast_assign(
97 __entry->dev = journal->j_fs_dev->bd_dev; 102 __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev);
103 __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
98 __entry->sync_commit = commit_transaction->t_synchronous_commit; 104 __entry->sync_commit = commit_transaction->t_synchronous_commit;
99 __entry->transaction = commit_transaction->t_tid; 105 __entry->transaction = commit_transaction->t_tid;
100 __entry->head = journal->j_tail_sequence; 106 __entry->head = journal->j_tail_sequence;
101 ), 107 ),
102 108
103 TP_printk("dev %s transaction %d sync %d head %d", 109 TP_printk("dev %d,%d transaction %d sync %d head %d",
104 jbd2_dev_to_name(__entry->dev), __entry->transaction, 110 __entry->dev_major, __entry->dev_minor,
105 __entry->sync_commit, __entry->head) 111 __entry->transaction, __entry->sync_commit, __entry->head)
106); 112);
107 113
108TRACE_EVENT(jbd2_submit_inode_data, 114TRACE_EVENT(jbd2_submit_inode_data,
@@ -111,17 +117,20 @@ TRACE_EVENT(jbd2_submit_inode_data,
111 TP_ARGS(inode), 117 TP_ARGS(inode),
112 118
113 TP_STRUCT__entry( 119 TP_STRUCT__entry(
114 __field( dev_t, dev ) 120 __field( int, dev_major )
121 __field( int, dev_minor )
115 __field( ino_t, ino ) 122 __field( ino_t, ino )
116 ), 123 ),
117 124
118 TP_fast_assign( 125 TP_fast_assign(
119 __entry->dev = inode->i_sb->s_dev; 126 __entry->dev_major = MAJOR(inode->i_sb->s_dev);
127 __entry->dev_minor = MINOR(inode->i_sb->s_dev);
120 __entry->ino = inode->i_ino; 128 __entry->ino = inode->i_ino;
121 ), 129 ),
122 130
123 TP_printk("dev %s ino %lu", 131 TP_printk("dev %d,%d ino %lu",
124 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) 132 __entry->dev_major, __entry->dev_minor,
133 (unsigned long) __entry->ino)
125); 134);
126 135
127TRACE_EVENT(jbd2_run_stats, 136TRACE_EVENT(jbd2_run_stats,
@@ -131,7 +140,8 @@ TRACE_EVENT(jbd2_run_stats,
131 TP_ARGS(dev, tid, stats), 140 TP_ARGS(dev, tid, stats),
132 141
133 TP_STRUCT__entry( 142 TP_STRUCT__entry(
134 __field( dev_t, dev ) 143 __field( int, dev_major )
144 __field( int, dev_minor )
135 __field( unsigned long, tid ) 145 __field( unsigned long, tid )
136 __field( unsigned long, wait ) 146 __field( unsigned long, wait )
137 __field( unsigned long, running ) 147 __field( unsigned long, running )
@@ -144,7 +154,8 @@ TRACE_EVENT(jbd2_run_stats,
144 ), 154 ),
145 155
146 TP_fast_assign( 156 TP_fast_assign(
147 __entry->dev = dev; 157 __entry->dev_major = MAJOR(dev);
158 __entry->dev_minor = MINOR(dev);
148 __entry->tid = tid; 159 __entry->tid = tid;
149 __entry->wait = stats->rs_wait; 160 __entry->wait = stats->rs_wait;
150 __entry->running = stats->rs_running; 161 __entry->running = stats->rs_running;
@@ -156,9 +167,9 @@ TRACE_EVENT(jbd2_run_stats,
156 __entry->blocks_logged = stats->rs_blocks_logged; 167 __entry->blocks_logged = stats->rs_blocks_logged;
157 ), 168 ),
158 169
159 TP_printk("dev %s tid %lu wait %u running %u locked %u flushing %u " 170 TP_printk("dev %d,%d tid %lu wait %u running %u locked %u flushing %u "
160 "logging %u handle_count %u blocks %u blocks_logged %u", 171 "logging %u handle_count %u blocks %u blocks_logged %u",
161 jbd2_dev_to_name(__entry->dev), __entry->tid, 172 __entry->dev_major, __entry->dev_minor, __entry->tid,
162 jiffies_to_msecs(__entry->wait), 173 jiffies_to_msecs(__entry->wait),
163 jiffies_to_msecs(__entry->running), 174 jiffies_to_msecs(__entry->running),
164 jiffies_to_msecs(__entry->locked), 175 jiffies_to_msecs(__entry->locked),
@@ -175,7 +186,8 @@ TRACE_EVENT(jbd2_checkpoint_stats,
175 TP_ARGS(dev, tid, stats), 186 TP_ARGS(dev, tid, stats),
176 187
177 TP_STRUCT__entry( 188 TP_STRUCT__entry(
178 __field( dev_t, dev ) 189 __field( int, dev_major )
190 __field( int, dev_minor )
179 __field( unsigned long, tid ) 191 __field( unsigned long, tid )
180 __field( unsigned long, chp_time ) 192 __field( unsigned long, chp_time )
181 __field( __u32, forced_to_close ) 193 __field( __u32, forced_to_close )
@@ -184,7 +196,8 @@ TRACE_EVENT(jbd2_checkpoint_stats,
184 ), 196 ),
185 197
186 TP_fast_assign( 198 TP_fast_assign(
187 __entry->dev = dev; 199 __entry->dev_major = MAJOR(dev);
200 __entry->dev_minor = MINOR(dev);
188 __entry->tid = tid; 201 __entry->tid = tid;
189 __entry->chp_time = stats->cs_chp_time; 202 __entry->chp_time = stats->cs_chp_time;
190 __entry->forced_to_close= stats->cs_forced_to_close; 203 __entry->forced_to_close= stats->cs_forced_to_close;
@@ -192,9 +205,9 @@ TRACE_EVENT(jbd2_checkpoint_stats,
192 __entry->dropped = stats->cs_dropped; 205 __entry->dropped = stats->cs_dropped;
193 ), 206 ),
194 207
195 TP_printk("dev %s tid %lu chp_time %u forced_to_close %u " 208 TP_printk("dev %d,%d tid %lu chp_time %u forced_to_close %u "
196 "written %u dropped %u", 209 "written %u dropped %u",
197 jbd2_dev_to_name(__entry->dev), __entry->tid, 210 __entry->dev_major, __entry->dev_minor, __entry->tid,
198 jiffies_to_msecs(__entry->chp_time), 211 jiffies_to_msecs(__entry->chp_time),
199 __entry->forced_to_close, __entry->written, __entry->dropped) 212 __entry->forced_to_close, __entry->written, __entry->dropped)
200); 213);
@@ -207,7 +220,8 @@ TRACE_EVENT(jbd2_cleanup_journal_tail,
207 TP_ARGS(journal, first_tid, block_nr, freed), 220 TP_ARGS(journal, first_tid, block_nr, freed),
208 221
209 TP_STRUCT__entry( 222 TP_STRUCT__entry(
210 __field( dev_t, dev ) 223 __field( int, dev_major )
224 __field( int, dev_minor )
211 __field( tid_t, tail_sequence ) 225 __field( tid_t, tail_sequence )
212 __field( tid_t, first_tid ) 226 __field( tid_t, first_tid )
213 __field(unsigned long, block_nr ) 227 __field(unsigned long, block_nr )
@@ -215,16 +229,18 @@ TRACE_EVENT(jbd2_cleanup_journal_tail,
215 ), 229 ),
216 230
217 TP_fast_assign( 231 TP_fast_assign(
218 __entry->dev = journal->j_fs_dev->bd_dev; 232 __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev);
233 __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev);
219 __entry->tail_sequence = journal->j_tail_sequence; 234 __entry->tail_sequence = journal->j_tail_sequence;
220 __entry->first_tid = first_tid; 235 __entry->first_tid = first_tid;
221 __entry->block_nr = block_nr; 236 __entry->block_nr = block_nr;
222 __entry->freed = freed; 237 __entry->freed = freed;
223 ), 238 ),
224 239
225 TP_printk("dev %s from %u to %u offset %lu freed %lu", 240 TP_printk("dev %d,%d from %u to %u offset %lu freed %lu",
226 jbd2_dev_to_name(__entry->dev), __entry->tail_sequence, 241 __entry->dev_major, __entry->dev_minor,
227 __entry->first_tid, __entry->block_nr, __entry->freed) 242 __entry->tail_sequence, __entry->first_tid,
243 __entry->block_nr, __entry->freed)
228); 244);
229 245
230#endif /* _TRACE_JBD2_H */ 246#endif /* _TRACE_JBD2_H */
diff --git a/include/trace/events/napi.h b/include/trace/events/napi.h
index 188deca2f3c7..8fe1e93f531d 100644
--- a/include/trace/events/napi.h
+++ b/include/trace/events/napi.h
@@ -6,10 +6,31 @@
6 6
7#include <linux/netdevice.h> 7#include <linux/netdevice.h>
8#include <linux/tracepoint.h> 8#include <linux/tracepoint.h>
9#include <linux/ftrace.h>
10
11#define NO_DEV "(no_device)"
12
13TRACE_EVENT(napi_poll,
9 14
10DECLARE_TRACE(napi_poll,
11 TP_PROTO(struct napi_struct *napi), 15 TP_PROTO(struct napi_struct *napi),
12 TP_ARGS(napi)); 16
17 TP_ARGS(napi),
18
19 TP_STRUCT__entry(
20 __field( struct napi_struct *, napi)
21 __string( dev_name, napi->dev ? napi->dev->name : NO_DEV)
22 ),
23
24 TP_fast_assign(
25 __entry->napi = napi;
26 __assign_str(dev_name, napi->dev ? napi->dev->name : NO_DEV);
27 ),
28
29 TP_printk("napi poll on napi struct %p for device %s",
30 __entry->napi, __get_str(dev_name))
31);
32
33#undef NO_DEV
13 34
14#endif /* _TRACE_NAPI_H_ */ 35#endif /* _TRACE_NAPI_H_ */
15 36
diff --git a/include/trace/events/net.h b/include/trace/events/net.h
new file mode 100644
index 000000000000..5f247f5ffc56
--- /dev/null
+++ b/include/trace/events/net.h
@@ -0,0 +1,82 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM net
3
4#if !defined(_TRACE_NET_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_NET_H
6
7#include <linux/skbuff.h>
8#include <linux/netdevice.h>
9#include <linux/ip.h>
10#include <linux/tracepoint.h>
11
12TRACE_EVENT(net_dev_xmit,
13
14 TP_PROTO(struct sk_buff *skb,
15 int rc),
16
17 TP_ARGS(skb, rc),
18
19 TP_STRUCT__entry(
20 __field( void *, skbaddr )
21 __field( unsigned int, len )
22 __field( int, rc )
23 __string( name, skb->dev->name )
24 ),
25
26 TP_fast_assign(
27 __entry->skbaddr = skb;
28 __entry->len = skb->len;
29 __entry->rc = rc;
30 __assign_str(name, skb->dev->name);
31 ),
32
33 TP_printk("dev=%s skbaddr=%p len=%u rc=%d",
34 __get_str(name), __entry->skbaddr, __entry->len, __entry->rc)
35);
36
37DECLARE_EVENT_CLASS(net_dev_template,
38
39 TP_PROTO(struct sk_buff *skb),
40
41 TP_ARGS(skb),
42
43 TP_STRUCT__entry(
44 __field( void *, skbaddr )
45 __field( unsigned int, len )
46 __string( name, skb->dev->name )
47 ),
48
49 TP_fast_assign(
50 __entry->skbaddr = skb;
51 __entry->len = skb->len;
52 __assign_str(name, skb->dev->name);
53 ),
54
55 TP_printk("dev=%s skbaddr=%p len=%u",
56 __get_str(name), __entry->skbaddr, __entry->len)
57)
58
59DEFINE_EVENT(net_dev_template, net_dev_queue,
60
61 TP_PROTO(struct sk_buff *skb),
62
63 TP_ARGS(skb)
64);
65
66DEFINE_EVENT(net_dev_template, netif_receive_skb,
67
68 TP_PROTO(struct sk_buff *skb),
69
70 TP_ARGS(skb)
71);
72
73DEFINE_EVENT(net_dev_template, netif_rx,
74
75 TP_PROTO(struct sk_buff *skb),
76
77 TP_ARGS(skb)
78);
79#endif /* _TRACE_NET_H */
80
81/* This part must be outside protection */
82#include <trace/define_trace.h>
diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index 35a2a6e7bf1e..286784d69b8f 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -10,12 +10,17 @@
10#ifndef _TRACE_POWER_ENUM_ 10#ifndef _TRACE_POWER_ENUM_
11#define _TRACE_POWER_ENUM_ 11#define _TRACE_POWER_ENUM_
12enum { 12enum {
13 POWER_NONE = 0, 13 POWER_NONE = 0,
14 POWER_CSTATE = 1, 14 POWER_CSTATE = 1, /* C-State */
15 POWER_PSTATE = 2, 15 POWER_PSTATE = 2, /* Fequency change or DVFS */
16 POWER_SSTATE = 3, /* Suspend */
16}; 17};
17#endif 18#endif
18 19
20/*
21 * The power events are used for cpuidle & suspend (power_start, power_end)
22 * and for cpufreq (power_frequency)
23 */
19DECLARE_EVENT_CLASS(power, 24DECLARE_EVENT_CLASS(power,
20 25
21 TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), 26 TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
@@ -70,6 +75,85 @@ TRACE_EVENT(power_end,
70 75
71); 76);
72 77
78/*
79 * The clock events are used for clock enable/disable and for
80 * clock rate change
81 */
82DECLARE_EVENT_CLASS(clock,
83
84 TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
85
86 TP_ARGS(name, state, cpu_id),
87
88 TP_STRUCT__entry(
89 __string( name, name )
90 __field( u64, state )
91 __field( u64, cpu_id )
92 ),
93
94 TP_fast_assign(
95 __assign_str(name, name);
96 __entry->state = state;
97 __entry->cpu_id = cpu_id;
98 ),
99
100 TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
101 (unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
102);
103
104DEFINE_EVENT(clock, clock_enable,
105
106 TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
107
108 TP_ARGS(name, state, cpu_id)
109);
110
111DEFINE_EVENT(clock, clock_disable,
112
113 TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
114
115 TP_ARGS(name, state, cpu_id)
116);
117
118DEFINE_EVENT(clock, clock_set_rate,
119
120 TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
121
122 TP_ARGS(name, state, cpu_id)
123);
124
125/*
126 * The power domain events are used for power domains transitions
127 */
128DECLARE_EVENT_CLASS(power_domain,
129
130 TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
131
132 TP_ARGS(name, state, cpu_id),
133
134 TP_STRUCT__entry(
135 __string( name, name )
136 __field( u64, state )
137 __field( u64, cpu_id )
138 ),
139
140 TP_fast_assign(
141 __assign_str(name, name);
142 __entry->state = state;
143 __entry->cpu_id = cpu_id;
144),
145
146 TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
147 (unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
148);
149
150DEFINE_EVENT(power_domain, power_domain_target,
151
152 TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
153
154 TP_ARGS(name, state, cpu_id)
155);
156
73#endif /* _TRACE_POWER_H */ 157#endif /* _TRACE_POWER_H */
74 158
75/* This part must be outside protection */ 159/* This part must be outside protection */
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index 9208c92aeab5..f6334782a593 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -362,6 +362,35 @@ TRACE_EVENT(sched_stat_runtime,
362 (unsigned long long)__entry->vruntime) 362 (unsigned long long)__entry->vruntime)
363); 363);
364 364
365/*
366 * Tracepoint for showing priority inheritance modifying a tasks
367 * priority.
368 */
369TRACE_EVENT(sched_pi_setprio,
370
371 TP_PROTO(struct task_struct *tsk, int newprio),
372
373 TP_ARGS(tsk, newprio),
374
375 TP_STRUCT__entry(
376 __array( char, comm, TASK_COMM_LEN )
377 __field( pid_t, pid )
378 __field( int, oldprio )
379 __field( int, newprio )
380 ),
381
382 TP_fast_assign(
383 memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
384 __entry->pid = tsk->pid;
385 __entry->oldprio = tsk->prio;
386 __entry->newprio = newprio;
387 ),
388
389 TP_printk("comm=%s pid=%d oldprio=%d newprio=%d",
390 __entry->comm, __entry->pid,
391 __entry->oldprio, __entry->newprio)
392);
393
365#endif /* _TRACE_SCHED_H */ 394#endif /* _TRACE_SCHED_H */
366 395
367/* This part must be outside protection */ 396/* This part must be outside protection */
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h
index 4b2be6dc76f0..75ce9d500d8e 100644
--- a/include/trace/events/skb.h
+++ b/include/trace/events/skb.h
@@ -35,6 +35,23 @@ TRACE_EVENT(kfree_skb,
35 __entry->skbaddr, __entry->protocol, __entry->location) 35 __entry->skbaddr, __entry->protocol, __entry->location)
36); 36);
37 37
38TRACE_EVENT(consume_skb,
39
40 TP_PROTO(struct sk_buff *skb),
41
42 TP_ARGS(skb),
43
44 TP_STRUCT__entry(
45 __field( void *, skbaddr )
46 ),
47
48 TP_fast_assign(
49 __entry->skbaddr = skb;
50 ),
51
52 TP_printk("skbaddr=%p", __entry->skbaddr)
53);
54
38TRACE_EVENT(skb_copy_datagram_iovec, 55TRACE_EVENT(skb_copy_datagram_iovec,
39 56
40 TP_PROTO(const struct sk_buff *skb, int len), 57 TP_PROTO(const struct sk_buff *skb, int len),
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index 370aa5a87322..c255fcc587bf 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -10,6 +10,7 @@
10 10
11#define RECLAIM_WB_ANON 0x0001u 11#define RECLAIM_WB_ANON 0x0001u
12#define RECLAIM_WB_FILE 0x0002u 12#define RECLAIM_WB_FILE 0x0002u
13#define RECLAIM_WB_MIXED 0x0010u
13#define RECLAIM_WB_SYNC 0x0004u 14#define RECLAIM_WB_SYNC 0x0004u
14#define RECLAIM_WB_ASYNC 0x0008u 15#define RECLAIM_WB_ASYNC 0x0008u
15 16
@@ -17,13 +18,20 @@
17 (flags) ? __print_flags(flags, "|", \ 18 (flags) ? __print_flags(flags, "|", \
18 {RECLAIM_WB_ANON, "RECLAIM_WB_ANON"}, \ 19 {RECLAIM_WB_ANON, "RECLAIM_WB_ANON"}, \
19 {RECLAIM_WB_FILE, "RECLAIM_WB_FILE"}, \ 20 {RECLAIM_WB_FILE, "RECLAIM_WB_FILE"}, \
21 {RECLAIM_WB_MIXED, "RECLAIM_WB_MIXED"}, \
20 {RECLAIM_WB_SYNC, "RECLAIM_WB_SYNC"}, \ 22 {RECLAIM_WB_SYNC, "RECLAIM_WB_SYNC"}, \
21 {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \ 23 {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \
22 ) : "RECLAIM_WB_NONE" 24 ) : "RECLAIM_WB_NONE"
23 25
24#define trace_reclaim_flags(page, sync) ( \ 26#define trace_reclaim_flags(page, sync) ( \
25 (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ 27 (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \
26 (sync == PAGEOUT_IO_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \ 28 (sync == LUMPY_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \
29 )
30
31#define trace_shrink_flags(file, sync) ( \
32 (sync == LUMPY_MODE_SYNC ? RECLAIM_WB_MIXED : \
33 (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON)) | \
34 (sync == LUMPY_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \
27 ) 35 )
28 36
29TRACE_EVENT(mm_vmscan_kswapd_sleep, 37TRACE_EVENT(mm_vmscan_kswapd_sleep,
@@ -269,6 +277,40 @@ TRACE_EVENT(mm_vmscan_writepage,
269 show_reclaim_flags(__entry->reclaim_flags)) 277 show_reclaim_flags(__entry->reclaim_flags))
270); 278);
271 279
280TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
281
282 TP_PROTO(int nid, int zid,
283 unsigned long nr_scanned, unsigned long nr_reclaimed,
284 int priority, int reclaim_flags),
285
286 TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags),
287
288 TP_STRUCT__entry(
289 __field(int, nid)
290 __field(int, zid)
291 __field(unsigned long, nr_scanned)
292 __field(unsigned long, nr_reclaimed)
293 __field(int, priority)
294 __field(int, reclaim_flags)
295 ),
296
297 TP_fast_assign(
298 __entry->nid = nid;
299 __entry->zid = zid;
300 __entry->nr_scanned = nr_scanned;
301 __entry->nr_reclaimed = nr_reclaimed;
302 __entry->priority = priority;
303 __entry->reclaim_flags = reclaim_flags;
304 ),
305
306 TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s",
307 __entry->nid, __entry->zid,
308 __entry->nr_scanned, __entry->nr_reclaimed,
309 __entry->priority,
310 show_reclaim_flags(__entry->reclaim_flags))
311);
312
313
272#endif /* _TRACE_VMSCAN_H */ 314#endif /* _TRACE_VMSCAN_H */
273 315
274/* This part must be outside protection */ 316/* This part must be outside protection */
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h
index 49682d7e9d60..7d497291c85d 100644
--- a/include/trace/events/workqueue.h
+++ b/include/trace/events/workqueue.h
@@ -7,38 +7,83 @@
7#include <linux/tracepoint.h> 7#include <linux/tracepoint.h>
8#include <linux/workqueue.h> 8#include <linux/workqueue.h>
9 9
10DECLARE_EVENT_CLASS(workqueue_work,
11
12 TP_PROTO(struct work_struct *work),
13
14 TP_ARGS(work),
15
16 TP_STRUCT__entry(
17 __field( void *, work )
18 ),
19
20 TP_fast_assign(
21 __entry->work = work;
22 ),
23
24 TP_printk("work struct %p", __entry->work)
25);
26
10/** 27/**
11 * workqueue_execute_start - called immediately before the workqueue callback 28 * workqueue_queue_work - called when a work gets queued
29 * @req_cpu: the requested cpu
30 * @cwq: pointer to struct cpu_workqueue_struct
12 * @work: pointer to struct work_struct 31 * @work: pointer to struct work_struct
13 * 32 *
14 * Allows to track workqueue execution. 33 * This event occurs when a work is queued immediately or once a
34 * delayed work is actually queued on a workqueue (ie: once the delay
35 * has been reached).
15 */ 36 */
16TRACE_EVENT(workqueue_execute_start, 37TRACE_EVENT(workqueue_queue_work,
17 38
18 TP_PROTO(struct work_struct *work), 39 TP_PROTO(unsigned int req_cpu, struct cpu_workqueue_struct *cwq,
40 struct work_struct *work),
19 41
20 TP_ARGS(work), 42 TP_ARGS(req_cpu, cwq, work),
21 43
22 TP_STRUCT__entry( 44 TP_STRUCT__entry(
23 __field( void *, work ) 45 __field( void *, work )
24 __field( void *, function) 46 __field( void *, function)
47 __field( void *, workqueue)
48 __field( unsigned int, req_cpu )
49 __field( unsigned int, cpu )
25 ), 50 ),
26 51
27 TP_fast_assign( 52 TP_fast_assign(
28 __entry->work = work; 53 __entry->work = work;
29 __entry->function = work->func; 54 __entry->function = work->func;
55 __entry->workqueue = cwq->wq;
56 __entry->req_cpu = req_cpu;
57 __entry->cpu = cwq->gcwq->cpu;
30 ), 58 ),
31 59
32 TP_printk("work struct %p: function %pf", __entry->work, __entry->function) 60 TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u",
61 __entry->work, __entry->function, __entry->workqueue,
62 __entry->req_cpu, __entry->cpu)
33); 63);
34 64
35/** 65/**
36 * workqueue_execute_end - called immediately before the workqueue callback 66 * workqueue_activate_work - called when a work gets activated
67 * @work: pointer to struct work_struct
68 *
69 * This event occurs when a queued work is put on the active queue,
70 * which happens immediately after queueing unless @max_active limit
71 * is reached.
72 */
73DEFINE_EVENT(workqueue_work, workqueue_activate_work,
74
75 TP_PROTO(struct work_struct *work),
76
77 TP_ARGS(work)
78);
79
80/**
81 * workqueue_execute_start - called immediately before the workqueue callback
37 * @work: pointer to struct work_struct 82 * @work: pointer to struct work_struct
38 * 83 *
39 * Allows to track workqueue execution. 84 * Allows to track workqueue execution.
40 */ 85 */
41TRACE_EVENT(workqueue_execute_end, 86TRACE_EVENT(workqueue_execute_start,
42 87
43 TP_PROTO(struct work_struct *work), 88 TP_PROTO(struct work_struct *work),
44 89
@@ -46,15 +91,29 @@ TRACE_EVENT(workqueue_execute_end,
46 91
47 TP_STRUCT__entry( 92 TP_STRUCT__entry(
48 __field( void *, work ) 93 __field( void *, work )
94 __field( void *, function)
49 ), 95 ),
50 96
51 TP_fast_assign( 97 TP_fast_assign(
52 __entry->work = work; 98 __entry->work = work;
99 __entry->function = work->func;
53 ), 100 ),
54 101
55 TP_printk("work struct %p", __entry->work) 102 TP_printk("work struct %p: function %pf", __entry->work, __entry->function)
56); 103);
57 104
105/**
106 * workqueue_execute_end - called immediately before the workqueue callback
107 * @work: pointer to struct work_struct
108 *
109 * Allows to track workqueue execution.
110 */
111DEFINE_EVENT(workqueue_work, workqueue_execute_end,
112
113 TP_PROTO(struct work_struct *work),
114
115 TP_ARGS(work)
116);
58 117
59#endif /* _TRACE_WORKQUEUE_H */ 118#endif /* _TRACE_WORKQUEUE_H */
60 119
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index f345f66ae9d1..89a2b2db4375 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -96,8 +96,6 @@ DECLARE_EVENT_CLASS(wbc_class,
96 __field(long, nr_to_write) 96 __field(long, nr_to_write)
97 __field(long, pages_skipped) 97 __field(long, pages_skipped)
98 __field(int, sync_mode) 98 __field(int, sync_mode)
99 __field(int, nonblocking)
100 __field(int, encountered_congestion)
101 __field(int, for_kupdate) 99 __field(int, for_kupdate)
102 __field(int, for_background) 100 __field(int, for_background)
103 __field(int, for_reclaim) 101 __field(int, for_reclaim)
@@ -153,6 +151,41 @@ DEFINE_WBC_EVENT(wbc_balance_dirty_written);
153DEFINE_WBC_EVENT(wbc_balance_dirty_wait); 151DEFINE_WBC_EVENT(wbc_balance_dirty_wait);
154DEFINE_WBC_EVENT(wbc_writepage); 152DEFINE_WBC_EVENT(wbc_writepage);
155 153
154DECLARE_EVENT_CLASS(writeback_congest_waited_template,
155
156 TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),
157
158 TP_ARGS(usec_timeout, usec_delayed),
159
160 TP_STRUCT__entry(
161 __field( unsigned int, usec_timeout )
162 __field( unsigned int, usec_delayed )
163 ),
164
165 TP_fast_assign(
166 __entry->usec_timeout = usec_timeout;
167 __entry->usec_delayed = usec_delayed;
168 ),
169
170 TP_printk("usec_timeout=%u usec_delayed=%u",
171 __entry->usec_timeout,
172 __entry->usec_delayed)
173);
174
175DEFINE_EVENT(writeback_congest_waited_template, writeback_congestion_wait,
176
177 TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),
178
179 TP_ARGS(usec_timeout, usec_delayed)
180);
181
182DEFINE_EVENT(writeback_congest_waited_template, writeback_wait_iff_congested,
183
184 TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),
185
186 TP_ARGS(usec_timeout, usec_delayed)
187);
188
156#endif /* _TRACE_WRITEBACK_H */ 189#endif /* _TRACE_WRITEBACK_H */
157 190
158/* This part must be outside protection */ 191/* This part must be outside protection */