diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-12-07 01:28:35 -0500 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-12-07 01:29:22 -0500 |
commit | 6548698f929814375fa5d62ae1db96959b0418c1 (patch) | |
tree | 340924ae82cb0946aa15045b2b72186de52a8146 /include/trace/events | |
parent | 1d2c6cfd40b2dece3bb958cbbc405a2c1536ab75 (diff) | |
parent | 22763c5cf3690a681551162c15d34d935308c8d7 (diff) |
Merge commit 'v2.6.32' into reiserfs/kill-bkl
Merge-reason: The tree was based 2.6.31. It's better to be up to date
with 2.6.32. Although no conflicting changes were made in between,
it gives benchmarking results closer to the lastest kernel behaviour.
Diffstat (limited to 'include/trace/events')
-rw-r--r-- | include/trace/events/block.h | 37 | ||||
-rw-r--r-- | include/trace/events/ext4.h | 320 | ||||
-rw-r--r-- | include/trace/events/irq.h | 21 | ||||
-rw-r--r-- | include/trace/events/jbd2.h | 80 | ||||
-rw-r--r-- | include/trace/events/kmem.h | 163 | ||||
-rw-r--r-- | include/trace/events/kvm.h | 151 | ||||
-rw-r--r-- | include/trace/events/module.h | 126 | ||||
-rw-r--r-- | include/trace/events/power.h | 81 | ||||
-rw-r--r-- | include/trace/events/sched.h | 140 | ||||
-rw-r--r-- | include/trace/events/skb.h | 20 | ||||
-rw-r--r-- | include/trace/events/syscalls.h | 70 | ||||
-rw-r--r-- | include/trace/events/timer.h | 342 | ||||
-rw-r--r-- | include/trace/events/workqueue.h | 4 |
13 files changed, 1495 insertions, 60 deletions
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 9a74b468a229..00405b5f624a 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -171,6 +171,7 @@ TRACE_EVENT(block_rq_complete, | |||
171 | (unsigned long long)__entry->sector, | 171 | (unsigned long long)__entry->sector, |
172 | __entry->nr_sector, __entry->errors) | 172 | __entry->nr_sector, __entry->errors) |
173 | ); | 173 | ); |
174 | |||
174 | TRACE_EVENT(block_bio_bounce, | 175 | TRACE_EVENT(block_bio_bounce, |
175 | 176 | ||
176 | TP_PROTO(struct request_queue *q, struct bio *bio), | 177 | TP_PROTO(struct request_queue *q, struct bio *bio), |
@@ -186,7 +187,8 @@ TRACE_EVENT(block_bio_bounce, | |||
186 | ), | 187 | ), |
187 | 188 | ||
188 | TP_fast_assign( | 189 | TP_fast_assign( |
189 | __entry->dev = bio->bi_bdev->bd_dev; | 190 | __entry->dev = bio->bi_bdev ? |
191 | bio->bi_bdev->bd_dev : 0; | ||
190 | __entry->sector = bio->bi_sector; | 192 | __entry->sector = bio->bi_sector; |
191 | __entry->nr_sector = bio->bi_size >> 9; | 193 | __entry->nr_sector = bio->bi_size >> 9; |
192 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); | 194 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); |
@@ -486,6 +488,39 @@ TRACE_EVENT(block_remap, | |||
486 | (unsigned long long)__entry->old_sector) | 488 | (unsigned long long)__entry->old_sector) |
487 | ); | 489 | ); |
488 | 490 | ||
491 | TRACE_EVENT(block_rq_remap, | ||
492 | |||
493 | TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev, | ||
494 | sector_t from), | ||
495 | |||
496 | TP_ARGS(q, rq, dev, from), | ||
497 | |||
498 | TP_STRUCT__entry( | ||
499 | __field( dev_t, dev ) | ||
500 | __field( sector_t, sector ) | ||
501 | __field( unsigned int, nr_sector ) | ||
502 | __field( dev_t, old_dev ) | ||
503 | __field( sector_t, old_sector ) | ||
504 | __array( char, rwbs, 6 ) | ||
505 | ), | ||
506 | |||
507 | TP_fast_assign( | ||
508 | __entry->dev = disk_devt(rq->rq_disk); | ||
509 | __entry->sector = blk_rq_pos(rq); | ||
510 | __entry->nr_sector = blk_rq_sectors(rq); | ||
511 | __entry->old_dev = dev; | ||
512 | __entry->old_sector = from; | ||
513 | blk_fill_rwbs_rq(__entry->rwbs, rq); | ||
514 | ), | ||
515 | |||
516 | TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", | ||
517 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, | ||
518 | (unsigned long long)__entry->sector, | ||
519 | __entry->nr_sector, | ||
520 | MAJOR(__entry->old_dev), MINOR(__entry->old_dev), | ||
521 | (unsigned long long)__entry->old_sector) | ||
522 | ); | ||
523 | |||
489 | #endif /* _TRACE_BLOCK_H */ | 524 | #endif /* _TRACE_BLOCK_H */ |
490 | 525 | ||
491 | /* This part must be outside protection */ | 526 | /* This part must be outside protection */ |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 7d8b5bc74185..d09550bf3f95 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -5,10 +5,16 @@ | |||
5 | #define _TRACE_EXT4_H | 5 | #define _TRACE_EXT4_H |
6 | 6 | ||
7 | #include <linux/writeback.h> | 7 | #include <linux/writeback.h> |
8 | #include "../../../fs/ext4/ext4.h" | ||
9 | #include "../../../fs/ext4/mballoc.h" | ||
10 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
11 | 9 | ||
10 | struct ext4_allocation_context; | ||
11 | struct ext4_allocation_request; | ||
12 | struct ext4_prealloc_space; | ||
13 | struct ext4_inode_info; | ||
14 | struct mpage_da_data; | ||
15 | |||
16 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) | ||
17 | |||
12 | TRACE_EVENT(ext4_free_inode, | 18 | TRACE_EVENT(ext4_free_inode, |
13 | TP_PROTO(struct inode *inode), | 19 | TP_PROTO(struct inode *inode), |
14 | 20 | ||
@@ -33,8 +39,8 @@ TRACE_EVENT(ext4_free_inode, | |||
33 | ), | 39 | ), |
34 | 40 | ||
35 | TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", | 41 | TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", |
36 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->mode, | 42 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
37 | __entry->uid, __entry->gid, | 43 | __entry->mode, __entry->uid, __entry->gid, |
38 | (unsigned long long) __entry->blocks) | 44 | (unsigned long long) __entry->blocks) |
39 | ); | 45 | ); |
40 | 46 | ||
@@ -56,7 +62,8 @@ TRACE_EVENT(ext4_request_inode, | |||
56 | ), | 62 | ), |
57 | 63 | ||
58 | TP_printk("dev %s dir %lu mode %d", | 64 | TP_printk("dev %s dir %lu mode %d", |
59 | jbd2_dev_to_name(__entry->dev), __entry->dir, __entry->mode) | 65 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->dir, |
66 | __entry->mode) | ||
60 | ); | 67 | ); |
61 | 68 | ||
62 | TRACE_EVENT(ext4_allocate_inode, | 69 | TRACE_EVENT(ext4_allocate_inode, |
@@ -79,7 +86,8 @@ TRACE_EVENT(ext4_allocate_inode, | |||
79 | ), | 86 | ), |
80 | 87 | ||
81 | TP_printk("dev %s ino %lu dir %lu mode %d", | 88 | TP_printk("dev %s ino %lu dir %lu mode %d", |
82 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->dir, __entry->mode) | 89 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
90 | (unsigned long) __entry->dir, __entry->mode) | ||
83 | ); | 91 | ); |
84 | 92 | ||
85 | TRACE_EVENT(ext4_write_begin, | 93 | TRACE_EVENT(ext4_write_begin, |
@@ -106,8 +114,8 @@ TRACE_EVENT(ext4_write_begin, | |||
106 | ), | 114 | ), |
107 | 115 | ||
108 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", | 116 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", |
109 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | 117 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
110 | __entry->flags) | 118 | __entry->pos, __entry->len, __entry->flags) |
111 | ); | 119 | ); |
112 | 120 | ||
113 | TRACE_EVENT(ext4_ordered_write_end, | 121 | TRACE_EVENT(ext4_ordered_write_end, |
@@ -133,8 +141,8 @@ TRACE_EVENT(ext4_ordered_write_end, | |||
133 | ), | 141 | ), |
134 | 142 | ||
135 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | 143 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
136 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | 144 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
137 | __entry->copied) | 145 | __entry->pos, __entry->len, __entry->copied) |
138 | ); | 146 | ); |
139 | 147 | ||
140 | TRACE_EVENT(ext4_writeback_write_end, | 148 | TRACE_EVENT(ext4_writeback_write_end, |
@@ -160,8 +168,8 @@ TRACE_EVENT(ext4_writeback_write_end, | |||
160 | ), | 168 | ), |
161 | 169 | ||
162 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | 170 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
163 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | 171 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
164 | __entry->copied) | 172 | __entry->pos, __entry->len, __entry->copied) |
165 | ); | 173 | ); |
166 | 174 | ||
167 | TRACE_EVENT(ext4_journalled_write_end, | 175 | TRACE_EVENT(ext4_journalled_write_end, |
@@ -186,8 +194,8 @@ TRACE_EVENT(ext4_journalled_write_end, | |||
186 | ), | 194 | ), |
187 | 195 | ||
188 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | 196 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
189 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | 197 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
190 | __entry->copied) | 198 | __entry->pos, __entry->len, __entry->copied) |
191 | ); | 199 | ); |
192 | 200 | ||
193 | TRACE_EVENT(ext4_writepage, | 201 | TRACE_EVENT(ext4_writepage, |
@@ -209,7 +217,8 @@ TRACE_EVENT(ext4_writepage, | |||
209 | ), | 217 | ), |
210 | 218 | ||
211 | TP_printk("dev %s ino %lu page_index %lu", | 219 | TP_printk("dev %s ino %lu page_index %lu", |
212 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) | 220 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
221 | __entry->index) | ||
213 | ); | 222 | ); |
214 | 223 | ||
215 | TRACE_EVENT(ext4_da_writepages, | 224 | TRACE_EVENT(ext4_da_writepages, |
@@ -227,8 +236,8 @@ TRACE_EVENT(ext4_da_writepages, | |||
227 | __field( char, nonblocking ) | 236 | __field( char, nonblocking ) |
228 | __field( char, for_kupdate ) | 237 | __field( char, for_kupdate ) |
229 | __field( char, for_reclaim ) | 238 | __field( char, for_reclaim ) |
230 | __field( char, for_writepages ) | ||
231 | __field( char, range_cyclic ) | 239 | __field( char, range_cyclic ) |
240 | __field( pgoff_t, writeback_index ) | ||
232 | ), | 241 | ), |
233 | 242 | ||
234 | TP_fast_assign( | 243 | TP_fast_assign( |
@@ -241,16 +250,52 @@ TRACE_EVENT(ext4_da_writepages, | |||
241 | __entry->nonblocking = wbc->nonblocking; | 250 | __entry->nonblocking = wbc->nonblocking; |
242 | __entry->for_kupdate = wbc->for_kupdate; | 251 | __entry->for_kupdate = wbc->for_kupdate; |
243 | __entry->for_reclaim = wbc->for_reclaim; | 252 | __entry->for_reclaim = wbc->for_reclaim; |
244 | __entry->for_writepages = wbc->for_writepages; | ||
245 | __entry->range_cyclic = wbc->range_cyclic; | 253 | __entry->range_cyclic = wbc->range_cyclic; |
254 | __entry->writeback_index = inode->i_mapping->writeback_index; | ||
246 | ), | 255 | ), |
247 | 256 | ||
248 | TP_printk("dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d for_writepages %d range_cyclic %d", | 257 | 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", |
249 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->nr_to_write, | 258 | jbd2_dev_to_name(__entry->dev), |
259 | (unsigned long) __entry->ino, __entry->nr_to_write, | ||
250 | __entry->pages_skipped, __entry->range_start, | 260 | __entry->pages_skipped, __entry->range_start, |
251 | __entry->range_end, __entry->nonblocking, | 261 | __entry->range_end, __entry->nonblocking, |
252 | __entry->for_kupdate, __entry->for_reclaim, | 262 | __entry->for_kupdate, __entry->for_reclaim, |
253 | __entry->for_writepages, __entry->range_cyclic) | 263 | __entry->range_cyclic, |
264 | (unsigned long) __entry->writeback_index) | ||
265 | ); | ||
266 | |||
267 | TRACE_EVENT(ext4_da_write_pages, | ||
268 | TP_PROTO(struct inode *inode, struct mpage_da_data *mpd), | ||
269 | |||
270 | TP_ARGS(inode, mpd), | ||
271 | |||
272 | TP_STRUCT__entry( | ||
273 | __field( dev_t, dev ) | ||
274 | __field( ino_t, ino ) | ||
275 | __field( __u64, b_blocknr ) | ||
276 | __field( __u32, b_size ) | ||
277 | __field( __u32, b_state ) | ||
278 | __field( unsigned long, first_page ) | ||
279 | __field( int, io_done ) | ||
280 | __field( int, pages_written ) | ||
281 | ), | ||
282 | |||
283 | TP_fast_assign( | ||
284 | __entry->dev = inode->i_sb->s_dev; | ||
285 | __entry->ino = inode->i_ino; | ||
286 | __entry->b_blocknr = mpd->b_blocknr; | ||
287 | __entry->b_size = mpd->b_size; | ||
288 | __entry->b_state = mpd->b_state; | ||
289 | __entry->first_page = mpd->first_page; | ||
290 | __entry->io_done = mpd->io_done; | ||
291 | __entry->pages_written = mpd->pages_written; | ||
292 | ), | ||
293 | |||
294 | 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", | ||
295 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
296 | __entry->b_blocknr, __entry->b_size, | ||
297 | __entry->b_state, __entry->first_page, | ||
298 | __entry->io_done, __entry->pages_written) | ||
254 | ); | 299 | ); |
255 | 300 | ||
256 | TRACE_EVENT(ext4_da_writepages_result, | 301 | TRACE_EVENT(ext4_da_writepages_result, |
@@ -268,6 +313,7 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
268 | __field( char, encountered_congestion ) | 313 | __field( char, encountered_congestion ) |
269 | __field( char, more_io ) | 314 | __field( char, more_io ) |
270 | __field( char, no_nrwrite_index_update ) | 315 | __field( char, no_nrwrite_index_update ) |
316 | __field( pgoff_t, writeback_index ) | ||
271 | ), | 317 | ), |
272 | 318 | ||
273 | TP_fast_assign( | 319 | TP_fast_assign( |
@@ -279,13 +325,16 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
279 | __entry->encountered_congestion = wbc->encountered_congestion; | 325 | __entry->encountered_congestion = wbc->encountered_congestion; |
280 | __entry->more_io = wbc->more_io; | 326 | __entry->more_io = wbc->more_io; |
281 | __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; | 327 | __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; |
328 | __entry->writeback_index = inode->i_mapping->writeback_index; | ||
282 | ), | 329 | ), |
283 | 330 | ||
284 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d", | 331 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d writeback_index %lu", |
285 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->ret, | 332 | jbd2_dev_to_name(__entry->dev), |
333 | (unsigned long) __entry->ino, __entry->ret, | ||
286 | __entry->pages_written, __entry->pages_skipped, | 334 | __entry->pages_written, __entry->pages_skipped, |
287 | __entry->encountered_congestion, __entry->more_io, | 335 | __entry->encountered_congestion, __entry->more_io, |
288 | __entry->no_nrwrite_index_update) | 336 | __entry->no_nrwrite_index_update, |
337 | (unsigned long) __entry->writeback_index) | ||
289 | ); | 338 | ); |
290 | 339 | ||
291 | TRACE_EVENT(ext4_da_write_begin, | 340 | TRACE_EVENT(ext4_da_write_begin, |
@@ -311,8 +360,8 @@ TRACE_EVENT(ext4_da_write_begin, | |||
311 | ), | 360 | ), |
312 | 361 | ||
313 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", | 362 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", |
314 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | 363 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
315 | __entry->flags) | 364 | __entry->pos, __entry->len, __entry->flags) |
316 | ); | 365 | ); |
317 | 366 | ||
318 | TRACE_EVENT(ext4_da_write_end, | 367 | TRACE_EVENT(ext4_da_write_end, |
@@ -338,8 +387,8 @@ TRACE_EVENT(ext4_da_write_end, | |||
338 | ), | 387 | ), |
339 | 388 | ||
340 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | 389 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
341 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | 390 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
342 | __entry->copied) | 391 | __entry->pos, __entry->len, __entry->copied) |
343 | ); | 392 | ); |
344 | 393 | ||
345 | TRACE_EVENT(ext4_discard_blocks, | 394 | TRACE_EVENT(ext4_discard_blocks, |
@@ -389,8 +438,8 @@ TRACE_EVENT(ext4_mb_new_inode_pa, | |||
389 | ), | 438 | ), |
390 | 439 | ||
391 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", | 440 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", |
392 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, | 441 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
393 | __entry->pa_len, __entry->pa_lstart) | 442 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
394 | ); | 443 | ); |
395 | 444 | ||
396 | TRACE_EVENT(ext4_mb_new_group_pa, | 445 | TRACE_EVENT(ext4_mb_new_group_pa, |
@@ -417,8 +466,8 @@ TRACE_EVENT(ext4_mb_new_group_pa, | |||
417 | ), | 466 | ), |
418 | 467 | ||
419 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", | 468 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", |
420 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, | 469 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
421 | __entry->pa_len, __entry->pa_lstart) | 470 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
422 | ); | 471 | ); |
423 | 472 | ||
424 | TRACE_EVENT(ext4_mb_release_inode_pa, | 473 | TRACE_EVENT(ext4_mb_release_inode_pa, |
@@ -444,8 +493,8 @@ TRACE_EVENT(ext4_mb_release_inode_pa, | |||
444 | ), | 493 | ), |
445 | 494 | ||
446 | TP_printk("dev %s ino %lu block %llu count %u", | 495 | TP_printk("dev %s ino %lu block %llu count %u", |
447 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, | 496 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
448 | __entry->count) | 497 | __entry->block, __entry->count) |
449 | ); | 498 | ); |
450 | 499 | ||
451 | TRACE_EVENT(ext4_mb_release_group_pa, | 500 | TRACE_EVENT(ext4_mb_release_group_pa, |
@@ -490,7 +539,7 @@ TRACE_EVENT(ext4_discard_preallocations, | |||
490 | ), | 539 | ), |
491 | 540 | ||
492 | TP_printk("dev %s ino %lu", | 541 | TP_printk("dev %s ino %lu", |
493 | jbd2_dev_to_name(__entry->dev), __entry->ino) | 542 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) |
494 | ); | 543 | ); |
495 | 544 | ||
496 | TRACE_EVENT(ext4_mb_discard_preallocations, | 545 | TRACE_EVENT(ext4_mb_discard_preallocations, |
@@ -545,8 +594,8 @@ TRACE_EVENT(ext4_request_blocks, | |||
545 | ), | 594 | ), |
546 | 595 | ||
547 | TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", | 596 | TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", |
548 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags, | 597 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
549 | __entry->len, | 598 | __entry->flags, __entry->len, |
550 | (unsigned long long) __entry->logical, | 599 | (unsigned long long) __entry->logical, |
551 | (unsigned long long) __entry->goal, | 600 | (unsigned long long) __entry->goal, |
552 | (unsigned long long) __entry->lleft, | 601 | (unsigned long long) __entry->lleft, |
@@ -589,8 +638,8 @@ TRACE_EVENT(ext4_allocate_blocks, | |||
589 | ), | 638 | ), |
590 | 639 | ||
591 | TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", | 640 | TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", |
592 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags, | 641 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
593 | __entry->len, __entry->block, | 642 | __entry->flags, __entry->len, __entry->block, |
594 | (unsigned long long) __entry->logical, | 643 | (unsigned long long) __entry->logical, |
595 | (unsigned long long) __entry->goal, | 644 | (unsigned long long) __entry->goal, |
596 | (unsigned long long) __entry->lleft, | 645 | (unsigned long long) __entry->lleft, |
@@ -623,8 +672,8 @@ TRACE_EVENT(ext4_free_blocks, | |||
623 | ), | 672 | ), |
624 | 673 | ||
625 | TP_printk("dev %s ino %lu block %llu count %lu metadata %d", | 674 | TP_printk("dev %s ino %lu block %llu count %lu metadata %d", |
626 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, | 675 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
627 | __entry->count, __entry->metadata) | 676 | __entry->block, __entry->count, __entry->metadata) |
628 | ); | 677 | ); |
629 | 678 | ||
630 | TRACE_EVENT(ext4_sync_file, | 679 | TRACE_EVENT(ext4_sync_file, |
@@ -647,8 +696,8 @@ TRACE_EVENT(ext4_sync_file, | |||
647 | ), | 696 | ), |
648 | 697 | ||
649 | TP_printk("dev %s ino %ld parent %ld datasync %d ", | 698 | TP_printk("dev %s ino %ld parent %ld datasync %d ", |
650 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->parent, | 699 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
651 | __entry->datasync) | 700 | (unsigned long) __entry->parent, __entry->datasync) |
652 | ); | 701 | ); |
653 | 702 | ||
654 | TRACE_EVENT(ext4_sync_fs, | 703 | TRACE_EVENT(ext4_sync_fs, |
@@ -671,6 +720,193 @@ TRACE_EVENT(ext4_sync_fs, | |||
671 | __entry->wait) | 720 | __entry->wait) |
672 | ); | 721 | ); |
673 | 722 | ||
723 | TRACE_EVENT(ext4_alloc_da_blocks, | ||
724 | TP_PROTO(struct inode *inode), | ||
725 | |||
726 | TP_ARGS(inode), | ||
727 | |||
728 | TP_STRUCT__entry( | ||
729 | __field( dev_t, dev ) | ||
730 | __field( ino_t, ino ) | ||
731 | __field( unsigned int, data_blocks ) | ||
732 | __field( unsigned int, meta_blocks ) | ||
733 | ), | ||
734 | |||
735 | TP_fast_assign( | ||
736 | __entry->dev = inode->i_sb->s_dev; | ||
737 | __entry->ino = inode->i_ino; | ||
738 | __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; | ||
739 | __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | ||
740 | ), | ||
741 | |||
742 | TP_printk("dev %s ino %lu data_blocks %u meta_blocks %u", | ||
743 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
744 | __entry->data_blocks, __entry->meta_blocks) | ||
745 | ); | ||
746 | |||
747 | TRACE_EVENT(ext4_mballoc_alloc, | ||
748 | TP_PROTO(struct ext4_allocation_context *ac), | ||
749 | |||
750 | TP_ARGS(ac), | ||
751 | |||
752 | TP_STRUCT__entry( | ||
753 | __field( dev_t, dev ) | ||
754 | __field( ino_t, ino ) | ||
755 | __field( __u16, found ) | ||
756 | __field( __u16, groups ) | ||
757 | __field( __u16, buddy ) | ||
758 | __field( __u16, flags ) | ||
759 | __field( __u16, tail ) | ||
760 | __field( __u8, cr ) | ||
761 | __field( __u32, orig_logical ) | ||
762 | __field( int, orig_start ) | ||
763 | __field( __u32, orig_group ) | ||
764 | __field( int, orig_len ) | ||
765 | __field( __u32, goal_logical ) | ||
766 | __field( int, goal_start ) | ||
767 | __field( __u32, goal_group ) | ||
768 | __field( int, goal_len ) | ||
769 | __field( __u32, result_logical ) | ||
770 | __field( int, result_start ) | ||
771 | __field( __u32, result_group ) | ||
772 | __field( int, result_len ) | ||
773 | ), | ||
774 | |||
775 | TP_fast_assign( | ||
776 | __entry->dev = ac->ac_inode->i_sb->s_dev; | ||
777 | __entry->ino = ac->ac_inode->i_ino; | ||
778 | __entry->found = ac->ac_found; | ||
779 | __entry->flags = ac->ac_flags; | ||
780 | __entry->groups = ac->ac_groups_scanned; | ||
781 | __entry->buddy = ac->ac_buddy; | ||
782 | __entry->tail = ac->ac_tail; | ||
783 | __entry->cr = ac->ac_criteria; | ||
784 | __entry->orig_logical = ac->ac_o_ex.fe_logical; | ||
785 | __entry->orig_start = ac->ac_o_ex.fe_start; | ||
786 | __entry->orig_group = ac->ac_o_ex.fe_group; | ||
787 | __entry->orig_len = ac->ac_o_ex.fe_len; | ||
788 | __entry->goal_logical = ac->ac_g_ex.fe_logical; | ||
789 | __entry->goal_start = ac->ac_g_ex.fe_start; | ||
790 | __entry->goal_group = ac->ac_g_ex.fe_group; | ||
791 | __entry->goal_len = ac->ac_g_ex.fe_len; | ||
792 | __entry->result_logical = ac->ac_f_ex.fe_logical; | ||
793 | __entry->result_start = ac->ac_f_ex.fe_start; | ||
794 | __entry->result_group = ac->ac_f_ex.fe_group; | ||
795 | __entry->result_len = ac->ac_f_ex.fe_len; | ||
796 | ), | ||
797 | |||
798 | TP_printk("dev %s inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " | ||
799 | "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " | ||
800 | "tail %u broken %u", | ||
801 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
802 | __entry->orig_group, __entry->orig_start, | ||
803 | __entry->orig_len, __entry->orig_logical, | ||
804 | __entry->goal_group, __entry->goal_start, | ||
805 | __entry->goal_len, __entry->goal_logical, | ||
806 | __entry->result_group, __entry->result_start, | ||
807 | __entry->result_len, __entry->result_logical, | ||
808 | __entry->found, __entry->groups, __entry->cr, | ||
809 | __entry->flags, __entry->tail, | ||
810 | __entry->buddy ? 1 << __entry->buddy : 0) | ||
811 | ); | ||
812 | |||
813 | TRACE_EVENT(ext4_mballoc_prealloc, | ||
814 | TP_PROTO(struct ext4_allocation_context *ac), | ||
815 | |||
816 | TP_ARGS(ac), | ||
817 | |||
818 | TP_STRUCT__entry( | ||
819 | __field( dev_t, dev ) | ||
820 | __field( ino_t, ino ) | ||
821 | __field( __u32, orig_logical ) | ||
822 | __field( int, orig_start ) | ||
823 | __field( __u32, orig_group ) | ||
824 | __field( int, orig_len ) | ||
825 | __field( __u32, result_logical ) | ||
826 | __field( int, result_start ) | ||
827 | __field( __u32, result_group ) | ||
828 | __field( int, result_len ) | ||
829 | ), | ||
830 | |||
831 | TP_fast_assign( | ||
832 | __entry->dev = ac->ac_inode->i_sb->s_dev; | ||
833 | __entry->ino = ac->ac_inode->i_ino; | ||
834 | __entry->orig_logical = ac->ac_o_ex.fe_logical; | ||
835 | __entry->orig_start = ac->ac_o_ex.fe_start; | ||
836 | __entry->orig_group = ac->ac_o_ex.fe_group; | ||
837 | __entry->orig_len = ac->ac_o_ex.fe_len; | ||
838 | __entry->result_logical = ac->ac_b_ex.fe_logical; | ||
839 | __entry->result_start = ac->ac_b_ex.fe_start; | ||
840 | __entry->result_group = ac->ac_b_ex.fe_group; | ||
841 | __entry->result_len = ac->ac_b_ex.fe_len; | ||
842 | ), | ||
843 | |||
844 | TP_printk("dev %s inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", | ||
845 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
846 | __entry->orig_group, __entry->orig_start, | ||
847 | __entry->orig_len, __entry->orig_logical, | ||
848 | __entry->result_group, __entry->result_start, | ||
849 | __entry->result_len, __entry->result_logical) | ||
850 | ); | ||
851 | |||
852 | TRACE_EVENT(ext4_mballoc_discard, | ||
853 | TP_PROTO(struct ext4_allocation_context *ac), | ||
854 | |||
855 | TP_ARGS(ac), | ||
856 | |||
857 | TP_STRUCT__entry( | ||
858 | __field( dev_t, dev ) | ||
859 | __field( ino_t, ino ) | ||
860 | __field( __u32, result_logical ) | ||
861 | __field( int, result_start ) | ||
862 | __field( __u32, result_group ) | ||
863 | __field( int, result_len ) | ||
864 | ), | ||
865 | |||
866 | TP_fast_assign( | ||
867 | __entry->dev = ac->ac_inode->i_sb->s_dev; | ||
868 | __entry->ino = ac->ac_inode->i_ino; | ||
869 | __entry->result_logical = ac->ac_b_ex.fe_logical; | ||
870 | __entry->result_start = ac->ac_b_ex.fe_start; | ||
871 | __entry->result_group = ac->ac_b_ex.fe_group; | ||
872 | __entry->result_len = ac->ac_b_ex.fe_len; | ||
873 | ), | ||
874 | |||
875 | TP_printk("dev %s inode %lu extent %u/%d/%u@%u ", | ||
876 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
877 | __entry->result_group, __entry->result_start, | ||
878 | __entry->result_len, __entry->result_logical) | ||
879 | ); | ||
880 | |||
881 | TRACE_EVENT(ext4_mballoc_free, | ||
882 | TP_PROTO(struct ext4_allocation_context *ac), | ||
883 | |||
884 | TP_ARGS(ac), | ||
885 | |||
886 | TP_STRUCT__entry( | ||
887 | __field( dev_t, dev ) | ||
888 | __field( ino_t, ino ) | ||
889 | __field( __u32, result_logical ) | ||
890 | __field( int, result_start ) | ||
891 | __field( __u32, result_group ) | ||
892 | __field( int, result_len ) | ||
893 | ), | ||
894 | |||
895 | TP_fast_assign( | ||
896 | __entry->dev = ac->ac_inode->i_sb->s_dev; | ||
897 | __entry->ino = ac->ac_inode->i_ino; | ||
898 | __entry->result_logical = ac->ac_b_ex.fe_logical; | ||
899 | __entry->result_start = ac->ac_b_ex.fe_start; | ||
900 | __entry->result_group = ac->ac_b_ex.fe_group; | ||
901 | __entry->result_len = ac->ac_b_ex.fe_len; | ||
902 | ), | ||
903 | |||
904 | TP_printk("dev %s inode %lu extent %u/%d/%u@%u ", | ||
905 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
906 | __entry->result_group, __entry->result_start, | ||
907 | __entry->result_len, __entry->result_logical) | ||
908 | ); | ||
909 | |||
674 | #endif /* _TRACE_EXT4_H */ | 910 | #endif /* _TRACE_EXT4_H */ |
675 | 911 | ||
676 | /* This part must be outside protection */ | 912 | /* This part must be outside protection */ |
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h index 1cb0c3aa11e6..b89f9db4a404 100644 --- a/include/trace/events/irq.h +++ b/include/trace/events/irq.h | |||
@@ -8,16 +8,17 @@ | |||
8 | #include <linux/interrupt.h> | 8 | #include <linux/interrupt.h> |
9 | 9 | ||
10 | #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } | 10 | #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } |
11 | #define show_softirq_name(val) \ | 11 | #define show_softirq_name(val) \ |
12 | __print_symbolic(val, \ | 12 | __print_symbolic(val, \ |
13 | softirq_name(HI), \ | 13 | softirq_name(HI), \ |
14 | softirq_name(TIMER), \ | 14 | softirq_name(TIMER), \ |
15 | softirq_name(NET_TX), \ | 15 | softirq_name(NET_TX), \ |
16 | softirq_name(NET_RX), \ | 16 | softirq_name(NET_RX), \ |
17 | softirq_name(BLOCK), \ | 17 | softirq_name(BLOCK), \ |
18 | softirq_name(TASKLET), \ | 18 | softirq_name(BLOCK_IOPOLL), \ |
19 | softirq_name(SCHED), \ | 19 | softirq_name(TASKLET), \ |
20 | softirq_name(HRTIMER), \ | 20 | softirq_name(SCHED), \ |
21 | softirq_name(HRTIMER), \ | ||
21 | softirq_name(RCU)) | 22 | softirq_name(RCU)) |
22 | 23 | ||
23 | /** | 24 | /** |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 10813fa0c8d0..3c60b75adb9e 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -7,6 +7,9 @@ | |||
7 | #include <linux/jbd2.h> | 7 | #include <linux/jbd2.h> |
8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
9 | 9 | ||
10 | struct transaction_chp_stats_s; | ||
11 | struct transaction_run_stats_s; | ||
12 | |||
10 | TRACE_EVENT(jbd2_checkpoint, | 13 | TRACE_EVENT(jbd2_checkpoint, |
11 | 14 | ||
12 | TP_PROTO(journal_t *journal, int result), | 15 | TP_PROTO(journal_t *journal, int result), |
@@ -159,7 +162,82 @@ TRACE_EVENT(jbd2_submit_inode_data, | |||
159 | ), | 162 | ), |
160 | 163 | ||
161 | TP_printk("dev %s ino %lu", | 164 | TP_printk("dev %s ino %lu", |
162 | jbd2_dev_to_name(__entry->dev), __entry->ino) | 165 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) |
166 | ); | ||
167 | |||
168 | TRACE_EVENT(jbd2_run_stats, | ||
169 | TP_PROTO(dev_t dev, unsigned long tid, | ||
170 | struct transaction_run_stats_s *stats), | ||
171 | |||
172 | TP_ARGS(dev, tid, stats), | ||
173 | |||
174 | TP_STRUCT__entry( | ||
175 | __field( dev_t, dev ) | ||
176 | __field( unsigned long, tid ) | ||
177 | __field( unsigned long, wait ) | ||
178 | __field( unsigned long, running ) | ||
179 | __field( unsigned long, locked ) | ||
180 | __field( unsigned long, flushing ) | ||
181 | __field( unsigned long, logging ) | ||
182 | __field( __u32, handle_count ) | ||
183 | __field( __u32, blocks ) | ||
184 | __field( __u32, blocks_logged ) | ||
185 | ), | ||
186 | |||
187 | TP_fast_assign( | ||
188 | __entry->dev = dev; | ||
189 | __entry->tid = tid; | ||
190 | __entry->wait = stats->rs_wait; | ||
191 | __entry->running = stats->rs_running; | ||
192 | __entry->locked = stats->rs_locked; | ||
193 | __entry->flushing = stats->rs_flushing; | ||
194 | __entry->logging = stats->rs_logging; | ||
195 | __entry->handle_count = stats->rs_handle_count; | ||
196 | __entry->blocks = stats->rs_blocks; | ||
197 | __entry->blocks_logged = stats->rs_blocks_logged; | ||
198 | ), | ||
199 | |||
200 | TP_printk("dev %s tid %lu wait %u running %u locked %u flushing %u " | ||
201 | "logging %u handle_count %u blocks %u blocks_logged %u", | ||
202 | jbd2_dev_to_name(__entry->dev), __entry->tid, | ||
203 | jiffies_to_msecs(__entry->wait), | ||
204 | jiffies_to_msecs(__entry->running), | ||
205 | jiffies_to_msecs(__entry->locked), | ||
206 | jiffies_to_msecs(__entry->flushing), | ||
207 | jiffies_to_msecs(__entry->logging), | ||
208 | __entry->handle_count, __entry->blocks, | ||
209 | __entry->blocks_logged) | ||
210 | ); | ||
211 | |||
212 | TRACE_EVENT(jbd2_checkpoint_stats, | ||
213 | TP_PROTO(dev_t dev, unsigned long tid, | ||
214 | struct transaction_chp_stats_s *stats), | ||
215 | |||
216 | TP_ARGS(dev, tid, stats), | ||
217 | |||
218 | TP_STRUCT__entry( | ||
219 | __field( dev_t, dev ) | ||
220 | __field( unsigned long, tid ) | ||
221 | __field( unsigned long, chp_time ) | ||
222 | __field( __u32, forced_to_close ) | ||
223 | __field( __u32, written ) | ||
224 | __field( __u32, dropped ) | ||
225 | ), | ||
226 | |||
227 | TP_fast_assign( | ||
228 | __entry->dev = dev; | ||
229 | __entry->tid = tid; | ||
230 | __entry->chp_time = stats->cs_chp_time; | ||
231 | __entry->forced_to_close= stats->cs_forced_to_close; | ||
232 | __entry->written = stats->cs_written; | ||
233 | __entry->dropped = stats->cs_dropped; | ||
234 | ), | ||
235 | |||
236 | TP_printk("dev %s tid %lu chp_time %u forced_to_close %u " | ||
237 | "written %u dropped %u", | ||
238 | jbd2_dev_to_name(__entry->dev), __entry->tid, | ||
239 | jiffies_to_msecs(__entry->chp_time), | ||
240 | __entry->forced_to_close, __entry->written, __entry->dropped) | ||
163 | ); | 241 | ); |
164 | 242 | ||
165 | #endif /* _TRACE_JBD2_H */ | 243 | #endif /* _TRACE_JBD2_H */ |
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index 1493c541f9c4..eaf46bdd18a5 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h | |||
@@ -225,6 +225,169 @@ TRACE_EVENT(kmem_cache_free, | |||
225 | 225 | ||
226 | TP_printk("call_site=%lx ptr=%p", __entry->call_site, __entry->ptr) | 226 | TP_printk("call_site=%lx ptr=%p", __entry->call_site, __entry->ptr) |
227 | ); | 227 | ); |
228 | |||
229 | TRACE_EVENT(mm_page_free_direct, | ||
230 | |||
231 | TP_PROTO(struct page *page, unsigned int order), | ||
232 | |||
233 | TP_ARGS(page, order), | ||
234 | |||
235 | TP_STRUCT__entry( | ||
236 | __field( struct page *, page ) | ||
237 | __field( unsigned int, order ) | ||
238 | ), | ||
239 | |||
240 | TP_fast_assign( | ||
241 | __entry->page = page; | ||
242 | __entry->order = order; | ||
243 | ), | ||
244 | |||
245 | TP_printk("page=%p pfn=%lu order=%d", | ||
246 | __entry->page, | ||
247 | page_to_pfn(__entry->page), | ||
248 | __entry->order) | ||
249 | ); | ||
250 | |||
251 | TRACE_EVENT(mm_pagevec_free, | ||
252 | |||
253 | TP_PROTO(struct page *page, int cold), | ||
254 | |||
255 | TP_ARGS(page, cold), | ||
256 | |||
257 | TP_STRUCT__entry( | ||
258 | __field( struct page *, page ) | ||
259 | __field( int, cold ) | ||
260 | ), | ||
261 | |||
262 | TP_fast_assign( | ||
263 | __entry->page = page; | ||
264 | __entry->cold = cold; | ||
265 | ), | ||
266 | |||
267 | TP_printk("page=%p pfn=%lu order=0 cold=%d", | ||
268 | __entry->page, | ||
269 | page_to_pfn(__entry->page), | ||
270 | __entry->cold) | ||
271 | ); | ||
272 | |||
273 | TRACE_EVENT(mm_page_alloc, | ||
274 | |||
275 | TP_PROTO(struct page *page, unsigned int order, | ||
276 | gfp_t gfp_flags, int migratetype), | ||
277 | |||
278 | TP_ARGS(page, order, gfp_flags, migratetype), | ||
279 | |||
280 | TP_STRUCT__entry( | ||
281 | __field( struct page *, page ) | ||
282 | __field( unsigned int, order ) | ||
283 | __field( gfp_t, gfp_flags ) | ||
284 | __field( int, migratetype ) | ||
285 | ), | ||
286 | |||
287 | TP_fast_assign( | ||
288 | __entry->page = page; | ||
289 | __entry->order = order; | ||
290 | __entry->gfp_flags = gfp_flags; | ||
291 | __entry->migratetype = migratetype; | ||
292 | ), | ||
293 | |||
294 | TP_printk("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s", | ||
295 | __entry->page, | ||
296 | page_to_pfn(__entry->page), | ||
297 | __entry->order, | ||
298 | __entry->migratetype, | ||
299 | show_gfp_flags(__entry->gfp_flags)) | ||
300 | ); | ||
301 | |||
302 | TRACE_EVENT(mm_page_alloc_zone_locked, | ||
303 | |||
304 | TP_PROTO(struct page *page, unsigned int order, int migratetype), | ||
305 | |||
306 | TP_ARGS(page, order, migratetype), | ||
307 | |||
308 | TP_STRUCT__entry( | ||
309 | __field( struct page *, page ) | ||
310 | __field( unsigned int, order ) | ||
311 | __field( int, migratetype ) | ||
312 | ), | ||
313 | |||
314 | TP_fast_assign( | ||
315 | __entry->page = page; | ||
316 | __entry->order = order; | ||
317 | __entry->migratetype = migratetype; | ||
318 | ), | ||
319 | |||
320 | TP_printk("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d", | ||
321 | __entry->page, | ||
322 | page_to_pfn(__entry->page), | ||
323 | __entry->order, | ||
324 | __entry->migratetype, | ||
325 | __entry->order == 0) | ||
326 | ); | ||
327 | |||
328 | TRACE_EVENT(mm_page_pcpu_drain, | ||
329 | |||
330 | TP_PROTO(struct page *page, int order, int migratetype), | ||
331 | |||
332 | TP_ARGS(page, order, migratetype), | ||
333 | |||
334 | TP_STRUCT__entry( | ||
335 | __field( struct page *, page ) | ||
336 | __field( int, order ) | ||
337 | __field( int, migratetype ) | ||
338 | ), | ||
339 | |||
340 | TP_fast_assign( | ||
341 | __entry->page = page; | ||
342 | __entry->order = order; | ||
343 | __entry->migratetype = migratetype; | ||
344 | ), | ||
345 | |||
346 | TP_printk("page=%p pfn=%lu order=%d migratetype=%d", | ||
347 | __entry->page, | ||
348 | page_to_pfn(__entry->page), | ||
349 | __entry->order, | ||
350 | __entry->migratetype) | ||
351 | ); | ||
352 | |||
353 | TRACE_EVENT(mm_page_alloc_extfrag, | ||
354 | |||
355 | TP_PROTO(struct page *page, | ||
356 | int alloc_order, int fallback_order, | ||
357 | int alloc_migratetype, int fallback_migratetype), | ||
358 | |||
359 | TP_ARGS(page, | ||
360 | alloc_order, fallback_order, | ||
361 | alloc_migratetype, fallback_migratetype), | ||
362 | |||
363 | TP_STRUCT__entry( | ||
364 | __field( struct page *, page ) | ||
365 | __field( int, alloc_order ) | ||
366 | __field( int, fallback_order ) | ||
367 | __field( int, alloc_migratetype ) | ||
368 | __field( int, fallback_migratetype ) | ||
369 | ), | ||
370 | |||
371 | TP_fast_assign( | ||
372 | __entry->page = page; | ||
373 | __entry->alloc_order = alloc_order; | ||
374 | __entry->fallback_order = fallback_order; | ||
375 | __entry->alloc_migratetype = alloc_migratetype; | ||
376 | __entry->fallback_migratetype = fallback_migratetype; | ||
377 | ), | ||
378 | |||
379 | TP_printk("page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d", | ||
380 | __entry->page, | ||
381 | page_to_pfn(__entry->page), | ||
382 | __entry->alloc_order, | ||
383 | __entry->fallback_order, | ||
384 | pageblock_order, | ||
385 | __entry->alloc_migratetype, | ||
386 | __entry->fallback_migratetype, | ||
387 | __entry->fallback_order < pageblock_order, | ||
388 | __entry->alloc_migratetype == __entry->fallback_migratetype) | ||
389 | ); | ||
390 | |||
228 | #endif /* _TRACE_KMEM_H */ | 391 | #endif /* _TRACE_KMEM_H */ |
229 | 392 | ||
230 | /* This part must be outside protection */ | 393 | /* This part must be outside protection */ |
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h new file mode 100644 index 000000000000..dbe108455275 --- /dev/null +++ b/include/trace/events/kvm.h | |||
@@ -0,0 +1,151 @@ | |||
1 | #if !defined(_TRACE_KVM_MAIN_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_KVM_MAIN_H | ||
3 | |||
4 | #include <linux/tracepoint.h> | ||
5 | |||
6 | #undef TRACE_SYSTEM | ||
7 | #define TRACE_SYSTEM kvm | ||
8 | #define TRACE_INCLUDE_FILE kvm | ||
9 | |||
10 | #if defined(__KVM_HAVE_IOAPIC) | ||
11 | TRACE_EVENT(kvm_set_irq, | ||
12 | TP_PROTO(unsigned int gsi, int level, int irq_source_id), | ||
13 | TP_ARGS(gsi, level, irq_source_id), | ||
14 | |||
15 | TP_STRUCT__entry( | ||
16 | __field( unsigned int, gsi ) | ||
17 | __field( int, level ) | ||
18 | __field( int, irq_source_id ) | ||
19 | ), | ||
20 | |||
21 | TP_fast_assign( | ||
22 | __entry->gsi = gsi; | ||
23 | __entry->level = level; | ||
24 | __entry->irq_source_id = irq_source_id; | ||
25 | ), | ||
26 | |||
27 | TP_printk("gsi %u level %d source %d", | ||
28 | __entry->gsi, __entry->level, __entry->irq_source_id) | ||
29 | ); | ||
30 | |||
31 | #define kvm_deliver_mode \ | ||
32 | {0x0, "Fixed"}, \ | ||
33 | {0x1, "LowPrio"}, \ | ||
34 | {0x2, "SMI"}, \ | ||
35 | {0x3, "Res3"}, \ | ||
36 | {0x4, "NMI"}, \ | ||
37 | {0x5, "INIT"}, \ | ||
38 | {0x6, "SIPI"}, \ | ||
39 | {0x7, "ExtINT"} | ||
40 | |||
41 | TRACE_EVENT(kvm_ioapic_set_irq, | ||
42 | TP_PROTO(__u64 e, int pin, bool coalesced), | ||
43 | TP_ARGS(e, pin, coalesced), | ||
44 | |||
45 | TP_STRUCT__entry( | ||
46 | __field( __u64, e ) | ||
47 | __field( int, pin ) | ||
48 | __field( bool, coalesced ) | ||
49 | ), | ||
50 | |||
51 | TP_fast_assign( | ||
52 | __entry->e = e; | ||
53 | __entry->pin = pin; | ||
54 | __entry->coalesced = coalesced; | ||
55 | ), | ||
56 | |||
57 | TP_printk("pin %u dst %x vec=%u (%s|%s|%s%s)%s", | ||
58 | __entry->pin, (u8)(__entry->e >> 56), (u8)__entry->e, | ||
59 | __print_symbolic((__entry->e >> 8 & 0x7), kvm_deliver_mode), | ||
60 | (__entry->e & (1<<11)) ? "logical" : "physical", | ||
61 | (__entry->e & (1<<15)) ? "level" : "edge", | ||
62 | (__entry->e & (1<<16)) ? "|masked" : "", | ||
63 | __entry->coalesced ? " (coalesced)" : "") | ||
64 | ); | ||
65 | |||
66 | TRACE_EVENT(kvm_msi_set_irq, | ||
67 | TP_PROTO(__u64 address, __u64 data), | ||
68 | TP_ARGS(address, data), | ||
69 | |||
70 | TP_STRUCT__entry( | ||
71 | __field( __u64, address ) | ||
72 | __field( __u64, data ) | ||
73 | ), | ||
74 | |||
75 | TP_fast_assign( | ||
76 | __entry->address = address; | ||
77 | __entry->data = data; | ||
78 | ), | ||
79 | |||
80 | TP_printk("dst %u vec %x (%s|%s|%s%s)", | ||
81 | (u8)(__entry->address >> 12), (u8)__entry->data, | ||
82 | __print_symbolic((__entry->data >> 8 & 0x7), kvm_deliver_mode), | ||
83 | (__entry->address & (1<<2)) ? "logical" : "physical", | ||
84 | (__entry->data & (1<<15)) ? "level" : "edge", | ||
85 | (__entry->address & (1<<3)) ? "|rh" : "") | ||
86 | ); | ||
87 | |||
88 | #define kvm_irqchips \ | ||
89 | {KVM_IRQCHIP_PIC_MASTER, "PIC master"}, \ | ||
90 | {KVM_IRQCHIP_PIC_SLAVE, "PIC slave"}, \ | ||
91 | {KVM_IRQCHIP_IOAPIC, "IOAPIC"} | ||
92 | |||
93 | TRACE_EVENT(kvm_ack_irq, | ||
94 | TP_PROTO(unsigned int irqchip, unsigned int pin), | ||
95 | TP_ARGS(irqchip, pin), | ||
96 | |||
97 | TP_STRUCT__entry( | ||
98 | __field( unsigned int, irqchip ) | ||
99 | __field( unsigned int, pin ) | ||
100 | ), | ||
101 | |||
102 | TP_fast_assign( | ||
103 | __entry->irqchip = irqchip; | ||
104 | __entry->pin = pin; | ||
105 | ), | ||
106 | |||
107 | TP_printk("irqchip %s pin %u", | ||
108 | __print_symbolic(__entry->irqchip, kvm_irqchips), | ||
109 | __entry->pin) | ||
110 | ); | ||
111 | |||
112 | |||
113 | |||
114 | #endif /* defined(__KVM_HAVE_IOAPIC) */ | ||
115 | |||
116 | #define KVM_TRACE_MMIO_READ_UNSATISFIED 0 | ||
117 | #define KVM_TRACE_MMIO_READ 1 | ||
118 | #define KVM_TRACE_MMIO_WRITE 2 | ||
119 | |||
120 | #define kvm_trace_symbol_mmio \ | ||
121 | { KVM_TRACE_MMIO_READ_UNSATISFIED, "unsatisfied-read" }, \ | ||
122 | { KVM_TRACE_MMIO_READ, "read" }, \ | ||
123 | { KVM_TRACE_MMIO_WRITE, "write" } | ||
124 | |||
125 | TRACE_EVENT(kvm_mmio, | ||
126 | TP_PROTO(int type, int len, u64 gpa, u64 val), | ||
127 | TP_ARGS(type, len, gpa, val), | ||
128 | |||
129 | TP_STRUCT__entry( | ||
130 | __field( u32, type ) | ||
131 | __field( u32, len ) | ||
132 | __field( u64, gpa ) | ||
133 | __field( u64, val ) | ||
134 | ), | ||
135 | |||
136 | TP_fast_assign( | ||
137 | __entry->type = type; | ||
138 | __entry->len = len; | ||
139 | __entry->gpa = gpa; | ||
140 | __entry->val = val; | ||
141 | ), | ||
142 | |||
143 | TP_printk("mmio %s len %u gpa 0x%llx val 0x%llx", | ||
144 | __print_symbolic(__entry->type, kvm_trace_symbol_mmio), | ||
145 | __entry->len, __entry->gpa, __entry->val) | ||
146 | ); | ||
147 | |||
148 | #endif /* _TRACE_KVM_MAIN_H */ | ||
149 | |||
150 | /* This part must be outside protection */ | ||
151 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/module.h b/include/trace/events/module.h new file mode 100644 index 000000000000..84160fb18478 --- /dev/null +++ b/include/trace/events/module.h | |||
@@ -0,0 +1,126 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM module | ||
3 | |||
4 | #if !defined(_TRACE_MODULE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_MODULE_H | ||
6 | |||
7 | #include <linux/tracepoint.h> | ||
8 | |||
9 | #ifdef CONFIG_MODULES | ||
10 | |||
11 | struct module; | ||
12 | |||
13 | #define show_module_flags(flags) __print_flags(flags, "", \ | ||
14 | { (1UL << TAINT_PROPRIETARY_MODULE), "P" }, \ | ||
15 | { (1UL << TAINT_FORCED_MODULE), "F" }, \ | ||
16 | { (1UL << TAINT_CRAP), "C" }) | ||
17 | |||
18 | TRACE_EVENT(module_load, | ||
19 | |||
20 | TP_PROTO(struct module *mod), | ||
21 | |||
22 | TP_ARGS(mod), | ||
23 | |||
24 | TP_STRUCT__entry( | ||
25 | __field( unsigned int, taints ) | ||
26 | __string( name, mod->name ) | ||
27 | ), | ||
28 | |||
29 | TP_fast_assign( | ||
30 | __entry->taints = mod->taints; | ||
31 | __assign_str(name, mod->name); | ||
32 | ), | ||
33 | |||
34 | TP_printk("%s %s", __get_str(name), show_module_flags(__entry->taints)) | ||
35 | ); | ||
36 | |||
37 | TRACE_EVENT(module_free, | ||
38 | |||
39 | TP_PROTO(struct module *mod), | ||
40 | |||
41 | TP_ARGS(mod), | ||
42 | |||
43 | TP_STRUCT__entry( | ||
44 | __string( name, mod->name ) | ||
45 | ), | ||
46 | |||
47 | TP_fast_assign( | ||
48 | __assign_str(name, mod->name); | ||
49 | ), | ||
50 | |||
51 | TP_printk("%s", __get_str(name)) | ||
52 | ); | ||
53 | |||
54 | TRACE_EVENT(module_get, | ||
55 | |||
56 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), | ||
57 | |||
58 | TP_ARGS(mod, ip, refcnt), | ||
59 | |||
60 | TP_STRUCT__entry( | ||
61 | __field( unsigned long, ip ) | ||
62 | __field( int, refcnt ) | ||
63 | __string( name, mod->name ) | ||
64 | ), | ||
65 | |||
66 | TP_fast_assign( | ||
67 | __entry->ip = ip; | ||
68 | __entry->refcnt = refcnt; | ||
69 | __assign_str(name, mod->name); | ||
70 | ), | ||
71 | |||
72 | TP_printk("%s call_site=%pf refcnt=%d", | ||
73 | __get_str(name), (void *)__entry->ip, __entry->refcnt) | ||
74 | ); | ||
75 | |||
76 | TRACE_EVENT(module_put, | ||
77 | |||
78 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), | ||
79 | |||
80 | TP_ARGS(mod, ip, refcnt), | ||
81 | |||
82 | TP_STRUCT__entry( | ||
83 | __field( unsigned long, ip ) | ||
84 | __field( int, refcnt ) | ||
85 | __string( name, mod->name ) | ||
86 | ), | ||
87 | |||
88 | TP_fast_assign( | ||
89 | __entry->ip = ip; | ||
90 | __entry->refcnt = refcnt; | ||
91 | __assign_str(name, mod->name); | ||
92 | ), | ||
93 | |||
94 | TP_printk("%s call_site=%pf refcnt=%d", | ||
95 | __get_str(name), (void *)__entry->ip, __entry->refcnt) | ||
96 | ); | ||
97 | |||
98 | TRACE_EVENT(module_request, | ||
99 | |||
100 | TP_PROTO(char *name, bool wait, unsigned long ip), | ||
101 | |||
102 | TP_ARGS(name, wait, ip), | ||
103 | |||
104 | TP_STRUCT__entry( | ||
105 | __field( bool, wait ) | ||
106 | __field( unsigned long, ip ) | ||
107 | __string( name, name ) | ||
108 | ), | ||
109 | |||
110 | TP_fast_assign( | ||
111 | __entry->wait = wait; | ||
112 | __entry->ip = ip; | ||
113 | __assign_str(name, name); | ||
114 | ), | ||
115 | |||
116 | TP_printk("%s wait=%d call_site=%pf", | ||
117 | __get_str(name), (int)__entry->wait, (void *)__entry->ip) | ||
118 | ); | ||
119 | |||
120 | #endif /* CONFIG_MODULES */ | ||
121 | |||
122 | #endif /* _TRACE_MODULE_H */ | ||
123 | |||
124 | /* This part must be outside protection */ | ||
125 | #include <trace/define_trace.h> | ||
126 | |||
diff --git a/include/trace/events/power.h b/include/trace/events/power.h new file mode 100644 index 000000000000..ea6d579261ad --- /dev/null +++ b/include/trace/events/power.h | |||
@@ -0,0 +1,81 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM power | ||
3 | |||
4 | #if !defined(_TRACE_POWER_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_POWER_H | ||
6 | |||
7 | #include <linux/ktime.h> | ||
8 | #include <linux/tracepoint.h> | ||
9 | |||
10 | #ifndef _TRACE_POWER_ENUM_ | ||
11 | #define _TRACE_POWER_ENUM_ | ||
12 | enum { | ||
13 | POWER_NONE = 0, | ||
14 | POWER_CSTATE = 1, | ||
15 | POWER_PSTATE = 2, | ||
16 | }; | ||
17 | #endif | ||
18 | |||
19 | |||
20 | |||
21 | TRACE_EVENT(power_start, | ||
22 | |||
23 | TP_PROTO(unsigned int type, unsigned int state), | ||
24 | |||
25 | TP_ARGS(type, state), | ||
26 | |||
27 | TP_STRUCT__entry( | ||
28 | __field( u64, type ) | ||
29 | __field( u64, state ) | ||
30 | ), | ||
31 | |||
32 | TP_fast_assign( | ||
33 | __entry->type = type; | ||
34 | __entry->state = state; | ||
35 | ), | ||
36 | |||
37 | TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long)__entry->state) | ||
38 | ); | ||
39 | |||
40 | TRACE_EVENT(power_end, | ||
41 | |||
42 | TP_PROTO(int dummy), | ||
43 | |||
44 | TP_ARGS(dummy), | ||
45 | |||
46 | TP_STRUCT__entry( | ||
47 | __field( u64, dummy ) | ||
48 | ), | ||
49 | |||
50 | TP_fast_assign( | ||
51 | __entry->dummy = 0xffff; | ||
52 | ), | ||
53 | |||
54 | TP_printk("dummy=%lu", (unsigned long)__entry->dummy) | ||
55 | |||
56 | ); | ||
57 | |||
58 | |||
59 | TRACE_EVENT(power_frequency, | ||
60 | |||
61 | TP_PROTO(unsigned int type, unsigned int state), | ||
62 | |||
63 | TP_ARGS(type, state), | ||
64 | |||
65 | TP_STRUCT__entry( | ||
66 | __field( u64, type ) | ||
67 | __field( u64, state ) | ||
68 | ), | ||
69 | |||
70 | TP_fast_assign( | ||
71 | __entry->type = type; | ||
72 | __entry->state = state; | ||
73 | ), | ||
74 | |||
75 | TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long) __entry->state) | ||
76 | ); | ||
77 | |||
78 | #endif /* _TRACE_POWER_H */ | ||
79 | |||
80 | /* This part must be outside protection */ | ||
81 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 8949bb7eb082..4069c43f4187 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -94,6 +94,7 @@ TRACE_EVENT(sched_wakeup, | |||
94 | __field( pid_t, pid ) | 94 | __field( pid_t, pid ) |
95 | __field( int, prio ) | 95 | __field( int, prio ) |
96 | __field( int, success ) | 96 | __field( int, success ) |
97 | __field( int, cpu ) | ||
97 | ), | 98 | ), |
98 | 99 | ||
99 | TP_fast_assign( | 100 | TP_fast_assign( |
@@ -101,11 +102,12 @@ TRACE_EVENT(sched_wakeup, | |||
101 | __entry->pid = p->pid; | 102 | __entry->pid = p->pid; |
102 | __entry->prio = p->prio; | 103 | __entry->prio = p->prio; |
103 | __entry->success = success; | 104 | __entry->success = success; |
105 | __entry->cpu = task_cpu(p); | ||
104 | ), | 106 | ), |
105 | 107 | ||
106 | TP_printk("task %s:%d [%d] success=%d", | 108 | TP_printk("task %s:%d [%d] success=%d [%03d]", |
107 | __entry->comm, __entry->pid, __entry->prio, | 109 | __entry->comm, __entry->pid, __entry->prio, |
108 | __entry->success) | 110 | __entry->success, __entry->cpu) |
109 | ); | 111 | ); |
110 | 112 | ||
111 | /* | 113 | /* |
@@ -125,6 +127,7 @@ TRACE_EVENT(sched_wakeup_new, | |||
125 | __field( pid_t, pid ) | 127 | __field( pid_t, pid ) |
126 | __field( int, prio ) | 128 | __field( int, prio ) |
127 | __field( int, success ) | 129 | __field( int, success ) |
130 | __field( int, cpu ) | ||
128 | ), | 131 | ), |
129 | 132 | ||
130 | TP_fast_assign( | 133 | TP_fast_assign( |
@@ -132,11 +135,12 @@ TRACE_EVENT(sched_wakeup_new, | |||
132 | __entry->pid = p->pid; | 135 | __entry->pid = p->pid; |
133 | __entry->prio = p->prio; | 136 | __entry->prio = p->prio; |
134 | __entry->success = success; | 137 | __entry->success = success; |
138 | __entry->cpu = task_cpu(p); | ||
135 | ), | 139 | ), |
136 | 140 | ||
137 | TP_printk("task %s:%d [%d] success=%d", | 141 | TP_printk("task %s:%d [%d] success=%d [%03d]", |
138 | __entry->comm, __entry->pid, __entry->prio, | 142 | __entry->comm, __entry->pid, __entry->prio, |
139 | __entry->success) | 143 | __entry->success, __entry->cpu) |
140 | ); | 144 | ); |
141 | 145 | ||
142 | /* | 146 | /* |
@@ -340,6 +344,134 @@ TRACE_EVENT(sched_signal_send, | |||
340 | __entry->sig, __entry->comm, __entry->pid) | 344 | __entry->sig, __entry->comm, __entry->pid) |
341 | ); | 345 | ); |
342 | 346 | ||
347 | /* | ||
348 | * XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE | ||
349 | * adding sched_stat support to SCHED_FIFO/RR would be welcome. | ||
350 | */ | ||
351 | |||
352 | /* | ||
353 | * Tracepoint for accounting wait time (time the task is runnable | ||
354 | * but not actually running due to scheduler contention). | ||
355 | */ | ||
356 | TRACE_EVENT(sched_stat_wait, | ||
357 | |||
358 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
359 | |||
360 | TP_ARGS(tsk, delay), | ||
361 | |||
362 | TP_STRUCT__entry( | ||
363 | __array( char, comm, TASK_COMM_LEN ) | ||
364 | __field( pid_t, pid ) | ||
365 | __field( u64, delay ) | ||
366 | ), | ||
367 | |||
368 | TP_fast_assign( | ||
369 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); | ||
370 | __entry->pid = tsk->pid; | ||
371 | __entry->delay = delay; | ||
372 | ) | ||
373 | TP_perf_assign( | ||
374 | __perf_count(delay); | ||
375 | ), | ||
376 | |||
377 | TP_printk("task: %s:%d wait: %Lu [ns]", | ||
378 | __entry->comm, __entry->pid, | ||
379 | (unsigned long long)__entry->delay) | ||
380 | ); | ||
381 | |||
382 | /* | ||
383 | * Tracepoint for accounting runtime (time the task is executing | ||
384 | * on a CPU). | ||
385 | */ | ||
386 | TRACE_EVENT(sched_stat_runtime, | ||
387 | |||
388 | TP_PROTO(struct task_struct *tsk, u64 runtime, u64 vruntime), | ||
389 | |||
390 | TP_ARGS(tsk, runtime, vruntime), | ||
391 | |||
392 | TP_STRUCT__entry( | ||
393 | __array( char, comm, TASK_COMM_LEN ) | ||
394 | __field( pid_t, pid ) | ||
395 | __field( u64, runtime ) | ||
396 | __field( u64, vruntime ) | ||
397 | ), | ||
398 | |||
399 | TP_fast_assign( | ||
400 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); | ||
401 | __entry->pid = tsk->pid; | ||
402 | __entry->runtime = runtime; | ||
403 | __entry->vruntime = vruntime; | ||
404 | ) | ||
405 | TP_perf_assign( | ||
406 | __perf_count(runtime); | ||
407 | ), | ||
408 | |||
409 | TP_printk("task: %s:%d runtime: %Lu [ns], vruntime: %Lu [ns]", | ||
410 | __entry->comm, __entry->pid, | ||
411 | (unsigned long long)__entry->runtime, | ||
412 | (unsigned long long)__entry->vruntime) | ||
413 | ); | ||
414 | |||
415 | /* | ||
416 | * Tracepoint for accounting sleep time (time the task is not runnable, | ||
417 | * including iowait, see below). | ||
418 | */ | ||
419 | TRACE_EVENT(sched_stat_sleep, | ||
420 | |||
421 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
422 | |||
423 | TP_ARGS(tsk, delay), | ||
424 | |||
425 | TP_STRUCT__entry( | ||
426 | __array( char, comm, TASK_COMM_LEN ) | ||
427 | __field( pid_t, pid ) | ||
428 | __field( u64, delay ) | ||
429 | ), | ||
430 | |||
431 | TP_fast_assign( | ||
432 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); | ||
433 | __entry->pid = tsk->pid; | ||
434 | __entry->delay = delay; | ||
435 | ) | ||
436 | TP_perf_assign( | ||
437 | __perf_count(delay); | ||
438 | ), | ||
439 | |||
440 | TP_printk("task: %s:%d sleep: %Lu [ns]", | ||
441 | __entry->comm, __entry->pid, | ||
442 | (unsigned long long)__entry->delay) | ||
443 | ); | ||
444 | |||
445 | /* | ||
446 | * Tracepoint for accounting iowait time (time the task is not runnable | ||
447 | * due to waiting on IO to complete). | ||
448 | */ | ||
449 | TRACE_EVENT(sched_stat_iowait, | ||
450 | |||
451 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
452 | |||
453 | TP_ARGS(tsk, delay), | ||
454 | |||
455 | TP_STRUCT__entry( | ||
456 | __array( char, comm, TASK_COMM_LEN ) | ||
457 | __field( pid_t, pid ) | ||
458 | __field( u64, delay ) | ||
459 | ), | ||
460 | |||
461 | TP_fast_assign( | ||
462 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); | ||
463 | __entry->pid = tsk->pid; | ||
464 | __entry->delay = delay; | ||
465 | ) | ||
466 | TP_perf_assign( | ||
467 | __perf_count(delay); | ||
468 | ), | ||
469 | |||
470 | TP_printk("task: %s:%d iowait: %Lu [ns]", | ||
471 | __entry->comm, __entry->pid, | ||
472 | (unsigned long long)__entry->delay) | ||
473 | ); | ||
474 | |||
343 | #endif /* _TRACE_SCHED_H */ | 475 | #endif /* _TRACE_SCHED_H */ |
344 | 476 | ||
345 | /* This part must be outside protection */ | 477 | /* This part must be outside protection */ |
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h index e499863b9669..4b2be6dc76f0 100644 --- a/include/trace/events/skb.h +++ b/include/trace/events/skb.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #define _TRACE_SKB_H | 5 | #define _TRACE_SKB_H |
6 | 6 | ||
7 | #include <linux/skbuff.h> | 7 | #include <linux/skbuff.h> |
8 | #include <linux/netdevice.h> | ||
8 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
9 | 10 | ||
10 | /* | 11 | /* |
@@ -34,6 +35,25 @@ TRACE_EVENT(kfree_skb, | |||
34 | __entry->skbaddr, __entry->protocol, __entry->location) | 35 | __entry->skbaddr, __entry->protocol, __entry->location) |
35 | ); | 36 | ); |
36 | 37 | ||
38 | TRACE_EVENT(skb_copy_datagram_iovec, | ||
39 | |||
40 | TP_PROTO(const struct sk_buff *skb, int len), | ||
41 | |||
42 | TP_ARGS(skb, len), | ||
43 | |||
44 | TP_STRUCT__entry( | ||
45 | __field( const void *, skbaddr ) | ||
46 | __field( int, len ) | ||
47 | ), | ||
48 | |||
49 | TP_fast_assign( | ||
50 | __entry->skbaddr = skb; | ||
51 | __entry->len = len; | ||
52 | ), | ||
53 | |||
54 | TP_printk("skbaddr=%p len=%d", __entry->skbaddr, __entry->len) | ||
55 | ); | ||
56 | |||
37 | #endif /* _TRACE_SKB_H */ | 57 | #endif /* _TRACE_SKB_H */ |
38 | 58 | ||
39 | /* This part must be outside protection */ | 59 | /* This part must be outside protection */ |
diff --git a/include/trace/events/syscalls.h b/include/trace/events/syscalls.h new file mode 100644 index 000000000000..397dff2dbd5a --- /dev/null +++ b/include/trace/events/syscalls.h | |||
@@ -0,0 +1,70 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM syscalls | ||
3 | |||
4 | #if !defined(_TRACE_EVENTS_SYSCALLS_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_EVENTS_SYSCALLS_H | ||
6 | |||
7 | #include <linux/tracepoint.h> | ||
8 | |||
9 | #include <asm/ptrace.h> | ||
10 | #include <asm/syscall.h> | ||
11 | |||
12 | |||
13 | #ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS | ||
14 | |||
15 | extern void syscall_regfunc(void); | ||
16 | extern void syscall_unregfunc(void); | ||
17 | |||
18 | TRACE_EVENT_FN(sys_enter, | ||
19 | |||
20 | TP_PROTO(struct pt_regs *regs, long id), | ||
21 | |||
22 | TP_ARGS(regs, id), | ||
23 | |||
24 | TP_STRUCT__entry( | ||
25 | __field( long, id ) | ||
26 | __array( unsigned long, args, 6 ) | ||
27 | ), | ||
28 | |||
29 | TP_fast_assign( | ||
30 | __entry->id = id; | ||
31 | syscall_get_arguments(current, regs, 0, 6, __entry->args); | ||
32 | ), | ||
33 | |||
34 | TP_printk("NR %ld (%lx, %lx, %lx, %lx, %lx, %lx)", | ||
35 | __entry->id, | ||
36 | __entry->args[0], __entry->args[1], __entry->args[2], | ||
37 | __entry->args[3], __entry->args[4], __entry->args[5]), | ||
38 | |||
39 | syscall_regfunc, syscall_unregfunc | ||
40 | ); | ||
41 | |||
42 | TRACE_EVENT_FN(sys_exit, | ||
43 | |||
44 | TP_PROTO(struct pt_regs *regs, long ret), | ||
45 | |||
46 | TP_ARGS(regs, ret), | ||
47 | |||
48 | TP_STRUCT__entry( | ||
49 | __field( long, id ) | ||
50 | __field( long, ret ) | ||
51 | ), | ||
52 | |||
53 | TP_fast_assign( | ||
54 | __entry->id = syscall_get_nr(current, regs); | ||
55 | __entry->ret = ret; | ||
56 | ), | ||
57 | |||
58 | TP_printk("NR %ld = %ld", | ||
59 | __entry->id, __entry->ret), | ||
60 | |||
61 | syscall_regfunc, syscall_unregfunc | ||
62 | ); | ||
63 | |||
64 | #endif /* CONFIG_HAVE_SYSCALL_TRACEPOINTS */ | ||
65 | |||
66 | #endif /* _TRACE_EVENTS_SYSCALLS_H */ | ||
67 | |||
68 | /* This part must be outside protection */ | ||
69 | #include <trace/define_trace.h> | ||
70 | |||
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h new file mode 100644 index 000000000000..1844c48d640e --- /dev/null +++ b/include/trace/events/timer.h | |||
@@ -0,0 +1,342 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM timer | ||
3 | |||
4 | #if !defined(_TRACE_TIMER_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_TIMER_H | ||
6 | |||
7 | #include <linux/tracepoint.h> | ||
8 | #include <linux/hrtimer.h> | ||
9 | #include <linux/timer.h> | ||
10 | |||
11 | /** | ||
12 | * timer_init - called when the timer is initialized | ||
13 | * @timer: pointer to struct timer_list | ||
14 | */ | ||
15 | TRACE_EVENT(timer_init, | ||
16 | |||
17 | TP_PROTO(struct timer_list *timer), | ||
18 | |||
19 | TP_ARGS(timer), | ||
20 | |||
21 | TP_STRUCT__entry( | ||
22 | __field( void *, timer ) | ||
23 | ), | ||
24 | |||
25 | TP_fast_assign( | ||
26 | __entry->timer = timer; | ||
27 | ), | ||
28 | |||
29 | TP_printk("timer %p", __entry->timer) | ||
30 | ); | ||
31 | |||
32 | /** | ||
33 | * timer_start - called when the timer is started | ||
34 | * @timer: pointer to struct timer_list | ||
35 | * @expires: the timers expiry time | ||
36 | */ | ||
37 | TRACE_EVENT(timer_start, | ||
38 | |||
39 | TP_PROTO(struct timer_list *timer, unsigned long expires), | ||
40 | |||
41 | TP_ARGS(timer, expires), | ||
42 | |||
43 | TP_STRUCT__entry( | ||
44 | __field( void *, timer ) | ||
45 | __field( void *, function ) | ||
46 | __field( unsigned long, expires ) | ||
47 | __field( unsigned long, now ) | ||
48 | ), | ||
49 | |||
50 | TP_fast_assign( | ||
51 | __entry->timer = timer; | ||
52 | __entry->function = timer->function; | ||
53 | __entry->expires = expires; | ||
54 | __entry->now = jiffies; | ||
55 | ), | ||
56 | |||
57 | TP_printk("timer %p: func %pf, expires %lu, timeout %ld", | ||
58 | __entry->timer, __entry->function, __entry->expires, | ||
59 | (long)__entry->expires - __entry->now) | ||
60 | ); | ||
61 | |||
62 | /** | ||
63 | * timer_expire_entry - called immediately before the timer callback | ||
64 | * @timer: pointer to struct timer_list | ||
65 | * | ||
66 | * Allows to determine the timer latency. | ||
67 | */ | ||
68 | TRACE_EVENT(timer_expire_entry, | ||
69 | |||
70 | TP_PROTO(struct timer_list *timer), | ||
71 | |||
72 | TP_ARGS(timer), | ||
73 | |||
74 | TP_STRUCT__entry( | ||
75 | __field( void *, timer ) | ||
76 | __field( unsigned long, now ) | ||
77 | ), | ||
78 | |||
79 | TP_fast_assign( | ||
80 | __entry->timer = timer; | ||
81 | __entry->now = jiffies; | ||
82 | ), | ||
83 | |||
84 | TP_printk("timer %p: now %lu", __entry->timer, __entry->now) | ||
85 | ); | ||
86 | |||
87 | /** | ||
88 | * timer_expire_exit - called immediately after the timer callback returns | ||
89 | * @timer: pointer to struct timer_list | ||
90 | * | ||
91 | * When used in combination with the timer_expire_entry tracepoint we can | ||
92 | * determine the runtime of the timer callback function. | ||
93 | * | ||
94 | * NOTE: Do NOT derefernce timer in TP_fast_assign. The pointer might | ||
95 | * be invalid. We solely track the pointer. | ||
96 | */ | ||
97 | TRACE_EVENT(timer_expire_exit, | ||
98 | |||
99 | TP_PROTO(struct timer_list *timer), | ||
100 | |||
101 | TP_ARGS(timer), | ||
102 | |||
103 | TP_STRUCT__entry( | ||
104 | __field(void *, timer ) | ||
105 | ), | ||
106 | |||
107 | TP_fast_assign( | ||
108 | __entry->timer = timer; | ||
109 | ), | ||
110 | |||
111 | TP_printk("timer %p", __entry->timer) | ||
112 | ); | ||
113 | |||
114 | /** | ||
115 | * timer_cancel - called when the timer is canceled | ||
116 | * @timer: pointer to struct timer_list | ||
117 | */ | ||
118 | TRACE_EVENT(timer_cancel, | ||
119 | |||
120 | TP_PROTO(struct timer_list *timer), | ||
121 | |||
122 | TP_ARGS(timer), | ||
123 | |||
124 | TP_STRUCT__entry( | ||
125 | __field( void *, timer ) | ||
126 | ), | ||
127 | |||
128 | TP_fast_assign( | ||
129 | __entry->timer = timer; | ||
130 | ), | ||
131 | |||
132 | TP_printk("timer %p", __entry->timer) | ||
133 | ); | ||
134 | |||
135 | /** | ||
136 | * hrtimer_init - called when the hrtimer is initialized | ||
137 | * @timer: pointer to struct hrtimer | ||
138 | * @clockid: the hrtimers clock | ||
139 | * @mode: the hrtimers mode | ||
140 | */ | ||
141 | TRACE_EVENT(hrtimer_init, | ||
142 | |||
143 | TP_PROTO(struct hrtimer *timer, clockid_t clockid, | ||
144 | enum hrtimer_mode mode), | ||
145 | |||
146 | TP_ARGS(timer, clockid, mode), | ||
147 | |||
148 | TP_STRUCT__entry( | ||
149 | __field( void *, timer ) | ||
150 | __field( clockid_t, clockid ) | ||
151 | __field( enum hrtimer_mode, mode ) | ||
152 | ), | ||
153 | |||
154 | TP_fast_assign( | ||
155 | __entry->timer = timer; | ||
156 | __entry->clockid = clockid; | ||
157 | __entry->mode = mode; | ||
158 | ), | ||
159 | |||
160 | TP_printk("hrtimer %p, clockid %s, mode %s", __entry->timer, | ||
161 | __entry->clockid == CLOCK_REALTIME ? | ||
162 | "CLOCK_REALTIME" : "CLOCK_MONOTONIC", | ||
163 | __entry->mode == HRTIMER_MODE_ABS ? | ||
164 | "HRTIMER_MODE_ABS" : "HRTIMER_MODE_REL") | ||
165 | ); | ||
166 | |||
167 | /** | ||
168 | * hrtimer_start - called when the hrtimer is started | ||
169 | * @timer: pointer to struct hrtimer | ||
170 | */ | ||
171 | TRACE_EVENT(hrtimer_start, | ||
172 | |||
173 | TP_PROTO(struct hrtimer *timer), | ||
174 | |||
175 | TP_ARGS(timer), | ||
176 | |||
177 | TP_STRUCT__entry( | ||
178 | __field( void *, timer ) | ||
179 | __field( void *, function ) | ||
180 | __field( s64, expires ) | ||
181 | __field( s64, softexpires ) | ||
182 | ), | ||
183 | |||
184 | TP_fast_assign( | ||
185 | __entry->timer = timer; | ||
186 | __entry->function = timer->function; | ||
187 | __entry->expires = hrtimer_get_expires(timer).tv64; | ||
188 | __entry->softexpires = hrtimer_get_softexpires(timer).tv64; | ||
189 | ), | ||
190 | |||
191 | TP_printk("hrtimer %p, func %pf, expires %llu, softexpires %llu", | ||
192 | __entry->timer, __entry->function, | ||
193 | (unsigned long long)ktime_to_ns((ktime_t) { | ||
194 | .tv64 = __entry->expires }), | ||
195 | (unsigned long long)ktime_to_ns((ktime_t) { | ||
196 | .tv64 = __entry->softexpires })) | ||
197 | ); | ||
198 | |||
199 | /** | ||
200 | * htimmer_expire_entry - called immediately before the hrtimer callback | ||
201 | * @timer: pointer to struct hrtimer | ||
202 | * @now: pointer to variable which contains current time of the | ||
203 | * timers base. | ||
204 | * | ||
205 | * Allows to determine the timer latency. | ||
206 | */ | ||
207 | TRACE_EVENT(hrtimer_expire_entry, | ||
208 | |||
209 | TP_PROTO(struct hrtimer *timer, ktime_t *now), | ||
210 | |||
211 | TP_ARGS(timer, now), | ||
212 | |||
213 | TP_STRUCT__entry( | ||
214 | __field( void *, timer ) | ||
215 | __field( s64, now ) | ||
216 | ), | ||
217 | |||
218 | TP_fast_assign( | ||
219 | __entry->timer = timer; | ||
220 | __entry->now = now->tv64; | ||
221 | ), | ||
222 | |||
223 | TP_printk("hrtimer %p, now %llu", __entry->timer, | ||
224 | (unsigned long long)ktime_to_ns((ktime_t) { | ||
225 | .tv64 = __entry->now })) | ||
226 | ); | ||
227 | |||
228 | /** | ||
229 | * hrtimer_expire_exit - called immediately after the hrtimer callback returns | ||
230 | * @timer: pointer to struct hrtimer | ||
231 | * | ||
232 | * When used in combination with the hrtimer_expire_entry tracepoint we can | ||
233 | * determine the runtime of the callback function. | ||
234 | */ | ||
235 | TRACE_EVENT(hrtimer_expire_exit, | ||
236 | |||
237 | TP_PROTO(struct hrtimer *timer), | ||
238 | |||
239 | TP_ARGS(timer), | ||
240 | |||
241 | TP_STRUCT__entry( | ||
242 | __field( void *, timer ) | ||
243 | ), | ||
244 | |||
245 | TP_fast_assign( | ||
246 | __entry->timer = timer; | ||
247 | ), | ||
248 | |||
249 | TP_printk("hrtimer %p", __entry->timer) | ||
250 | ); | ||
251 | |||
252 | /** | ||
253 | * hrtimer_cancel - called when the hrtimer is canceled | ||
254 | * @timer: pointer to struct hrtimer | ||
255 | */ | ||
256 | TRACE_EVENT(hrtimer_cancel, | ||
257 | |||
258 | TP_PROTO(struct hrtimer *timer), | ||
259 | |||
260 | TP_ARGS(timer), | ||
261 | |||
262 | TP_STRUCT__entry( | ||
263 | __field( void *, timer ) | ||
264 | ), | ||
265 | |||
266 | TP_fast_assign( | ||
267 | __entry->timer = timer; | ||
268 | ), | ||
269 | |||
270 | TP_printk("hrtimer %p", __entry->timer) | ||
271 | ); | ||
272 | |||
273 | /** | ||
274 | * itimer_state - called when itimer is started or canceled | ||
275 | * @which: name of the interval timer | ||
276 | * @value: the itimers value, itimer is canceled if value->it_value is | ||
277 | * zero, otherwise it is started | ||
278 | * @expires: the itimers expiry time | ||
279 | */ | ||
280 | TRACE_EVENT(itimer_state, | ||
281 | |||
282 | TP_PROTO(int which, const struct itimerval *const value, | ||
283 | cputime_t expires), | ||
284 | |||
285 | TP_ARGS(which, value, expires), | ||
286 | |||
287 | TP_STRUCT__entry( | ||
288 | __field( int, which ) | ||
289 | __field( cputime_t, expires ) | ||
290 | __field( long, value_sec ) | ||
291 | __field( long, value_usec ) | ||
292 | __field( long, interval_sec ) | ||
293 | __field( long, interval_usec ) | ||
294 | ), | ||
295 | |||
296 | TP_fast_assign( | ||
297 | __entry->which = which; | ||
298 | __entry->expires = expires; | ||
299 | __entry->value_sec = value->it_value.tv_sec; | ||
300 | __entry->value_usec = value->it_value.tv_usec; | ||
301 | __entry->interval_sec = value->it_interval.tv_sec; | ||
302 | __entry->interval_usec = value->it_interval.tv_usec; | ||
303 | ), | ||
304 | |||
305 | TP_printk("which %d, expires %lu, it_value %lu.%lu, it_interval %lu.%lu", | ||
306 | __entry->which, __entry->expires, | ||
307 | __entry->value_sec, __entry->value_usec, | ||
308 | __entry->interval_sec, __entry->interval_usec) | ||
309 | ); | ||
310 | |||
311 | /** | ||
312 | * itimer_expire - called when itimer expires | ||
313 | * @which: type of the interval timer | ||
314 | * @pid: pid of the process which owns the timer | ||
315 | * @now: current time, used to calculate the latency of itimer | ||
316 | */ | ||
317 | TRACE_EVENT(itimer_expire, | ||
318 | |||
319 | TP_PROTO(int which, struct pid *pid, cputime_t now), | ||
320 | |||
321 | TP_ARGS(which, pid, now), | ||
322 | |||
323 | TP_STRUCT__entry( | ||
324 | __field( int , which ) | ||
325 | __field( pid_t, pid ) | ||
326 | __field( cputime_t, now ) | ||
327 | ), | ||
328 | |||
329 | TP_fast_assign( | ||
330 | __entry->which = which; | ||
331 | __entry->now = now; | ||
332 | __entry->pid = pid_nr(pid); | ||
333 | ), | ||
334 | |||
335 | TP_printk("which %d, pid %d, now %lu", __entry->which, | ||
336 | (int) __entry->pid, __entry->now) | ||
337 | ); | ||
338 | |||
339 | #endif /* _TRACE_TIMER_H */ | ||
340 | |||
341 | /* This part must be outside protection */ | ||
342 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h index fcfd9a1e4b96..e4612dbd7ba6 100644 --- a/include/trace/events/workqueue.h +++ b/include/trace/events/workqueue.h | |||
@@ -26,7 +26,7 @@ TRACE_EVENT(workqueue_insertion, | |||
26 | __entry->func = work->func; | 26 | __entry->func = work->func; |
27 | ), | 27 | ), |
28 | 28 | ||
29 | TP_printk("thread=%s:%d func=%pF", __entry->thread_comm, | 29 | TP_printk("thread=%s:%d func=%pf", __entry->thread_comm, |
30 | __entry->thread_pid, __entry->func) | 30 | __entry->thread_pid, __entry->func) |
31 | ); | 31 | ); |
32 | 32 | ||
@@ -48,7 +48,7 @@ TRACE_EVENT(workqueue_execution, | |||
48 | __entry->func = work->func; | 48 | __entry->func = work->func; |
49 | ), | 49 | ), |
50 | 50 | ||
51 | TP_printk("thread=%s:%d func=%pF", __entry->thread_comm, | 51 | TP_printk("thread=%s:%d func=%pf", __entry->thread_comm, |
52 | __entry->thread_pid, __entry->func) | 52 | __entry->thread_pid, __entry->func) |
53 | ); | 53 | ); |
54 | 54 | ||