diff options
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/bcache.h | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/include/trace/events/bcache.h b/include/trace/events/bcache.h index 5ebda976ea93..e2b9576d00e2 100644 --- a/include/trace/events/bcache.h +++ b/include/trace/events/bcache.h | |||
| @@ -6,11 +6,9 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
| 8 | 8 | ||
| 9 | struct search; | ||
| 10 | |||
| 11 | DECLARE_EVENT_CLASS(bcache_request, | 9 | DECLARE_EVENT_CLASS(bcache_request, |
| 12 | TP_PROTO(struct search *s, struct bio *bio), | 10 | TP_PROTO(struct bcache_device *d, struct bio *bio), |
| 13 | TP_ARGS(s, bio), | 11 | TP_ARGS(d, bio), |
| 14 | 12 | ||
| 15 | TP_STRUCT__entry( | 13 | TP_STRUCT__entry( |
| 16 | __field(dev_t, dev ) | 14 | __field(dev_t, dev ) |
| @@ -24,8 +22,8 @@ DECLARE_EVENT_CLASS(bcache_request, | |||
| 24 | 22 | ||
| 25 | TP_fast_assign( | 23 | TP_fast_assign( |
| 26 | __entry->dev = bio->bi_bdev->bd_dev; | 24 | __entry->dev = bio->bi_bdev->bd_dev; |
| 27 | __entry->orig_major = s->d->disk->major; | 25 | __entry->orig_major = d->disk->major; |
| 28 | __entry->orig_minor = s->d->disk->first_minor; | 26 | __entry->orig_minor = d->disk->first_minor; |
| 29 | __entry->sector = bio->bi_sector; | 27 | __entry->sector = bio->bi_sector; |
| 30 | __entry->orig_sector = bio->bi_sector - 16; | 28 | __entry->orig_sector = bio->bi_sector - 16; |
| 31 | __entry->nr_sector = bio->bi_size >> 9; | 29 | __entry->nr_sector = bio->bi_size >> 9; |
| @@ -79,13 +77,13 @@ DECLARE_EVENT_CLASS(btree_node, | |||
| 79 | /* request.c */ | 77 | /* request.c */ |
| 80 | 78 | ||
| 81 | DEFINE_EVENT(bcache_request, bcache_request_start, | 79 | DEFINE_EVENT(bcache_request, bcache_request_start, |
| 82 | TP_PROTO(struct search *s, struct bio *bio), | 80 | TP_PROTO(struct bcache_device *d, struct bio *bio), |
| 83 | TP_ARGS(s, bio) | 81 | TP_ARGS(d, bio) |
| 84 | ); | 82 | ); |
| 85 | 83 | ||
| 86 | DEFINE_EVENT(bcache_request, bcache_request_end, | 84 | DEFINE_EVENT(bcache_request, bcache_request_end, |
| 87 | TP_PROTO(struct search *s, struct bio *bio), | 85 | TP_PROTO(struct bcache_device *d, struct bio *bio), |
| 88 | TP_ARGS(s, bio) | 86 | TP_ARGS(d, bio) |
| 89 | ); | 87 | ); |
| 90 | 88 | ||
| 91 | DECLARE_EVENT_CLASS(bcache_bio, | 89 | DECLARE_EVENT_CLASS(bcache_bio, |
| @@ -370,6 +368,35 @@ DEFINE_EVENT(btree_node, bcache_btree_set_root, | |||
| 370 | TP_ARGS(b) | 368 | TP_ARGS(b) |
| 371 | ); | 369 | ); |
| 372 | 370 | ||
| 371 | TRACE_EVENT(bcache_keyscan, | ||
| 372 | TP_PROTO(unsigned nr_found, | ||
| 373 | unsigned start_inode, uint64_t start_offset, | ||
| 374 | unsigned end_inode, uint64_t end_offset), | ||
| 375 | TP_ARGS(nr_found, | ||
| 376 | start_inode, start_offset, | ||
| 377 | end_inode, end_offset), | ||
| 378 | |||
| 379 | TP_STRUCT__entry( | ||
| 380 | __field(__u32, nr_found ) | ||
| 381 | __field(__u32, start_inode ) | ||
| 382 | __field(__u64, start_offset ) | ||
| 383 | __field(__u32, end_inode ) | ||
| 384 | __field(__u64, end_offset ) | ||
| 385 | ), | ||
| 386 | |||
| 387 | TP_fast_assign( | ||
| 388 | __entry->nr_found = nr_found; | ||
| 389 | __entry->start_inode = start_inode; | ||
| 390 | __entry->start_offset = start_offset; | ||
| 391 | __entry->end_inode = end_inode; | ||
| 392 | __entry->end_offset = end_offset; | ||
| 393 | ), | ||
| 394 | |||
| 395 | TP_printk("found %u keys from %u:%llu to %u:%llu", __entry->nr_found, | ||
| 396 | __entry->start_inode, __entry->start_offset, | ||
| 397 | __entry->end_inode, __entry->end_offset) | ||
| 398 | ); | ||
| 399 | |||
| 373 | /* Allocator */ | 400 | /* Allocator */ |
| 374 | 401 | ||
| 375 | TRACE_EVENT(bcache_alloc_invalidate, | 402 | TRACE_EVENT(bcache_alloc_invalidate, |
