diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2013-12-16 05:23:45 -0500 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-16 05:23:45 -0500 |
| commit | c4de673b775e4db48cd2db6277e0c6714332ca0c (patch) | |
| tree | 84f9e4728e6ccf257236d2ba063b6e784ec8b65d /include/trace | |
| parent | bafdc614a1f4f8be8cde41b8ab10ac17e67c1837 (diff) | |
| parent | 55957fb7a0b61d8ab6ff3f04e279b8fc22b738fa (diff) | |
Merge remote-tracking branch 'wireless-next/master' into mac80211-next
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/asoc.h | 1 | ||||
| -rw-r--r-- | include/trace/events/bcache.h | 47 | ||||
| -rw-r--r-- | include/trace/events/block.h | 6 | ||||
| -rw-r--r-- | include/trace/events/btrfs.h | 1 | ||||
| -rw-r--r-- | include/trace/events/f2fs.h | 51 | ||||
| -rw-r--r-- | include/trace/events/iommu.h | 162 | ||||
| -rw-r--r-- | include/trace/events/kmem.h | 10 | ||||
| -rw-r--r-- | include/trace/events/kvm.h | 10 | ||||
| -rw-r--r-- | include/trace/events/power_cpu_migrate.h | 67 | ||||
| -rw-r--r-- | include/trace/events/random.h | 183 | ||||
| -rw-r--r-- | include/trace/events/rcu.h | 80 | ||||
| -rw-r--r-- | include/trace/events/sched.h | 21 | ||||
| -rw-r--r-- | include/trace/events/spi.h | 156 | ||||
| -rw-r--r-- | include/trace/events/swiotlb.h | 46 | ||||
| -rw-r--r-- | include/trace/events/target.h | 4 | ||||
| -rw-r--r-- | include/trace/events/writeback.h | 6 | ||||
| -rw-r--r-- | include/trace/ftrace.h | 7 |
17 files changed, 809 insertions, 49 deletions
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h index 5fc2dcdd21cd..03996b2bb04f 100644 --- a/include/trace/events/asoc.h +++ b/include/trace/events/asoc.h | |||
| @@ -14,6 +14,7 @@ struct snd_soc_codec; | |||
| 14 | struct snd_soc_platform; | 14 | struct snd_soc_platform; |
| 15 | struct snd_soc_card; | 15 | struct snd_soc_card; |
| 16 | struct snd_soc_dapm_widget; | 16 | struct snd_soc_dapm_widget; |
| 17 | struct snd_soc_dapm_path; | ||
| 17 | 18 | ||
| 18 | /* | 19 | /* |
| 19 | * Log register events | 20 | * Log register events |
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, |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 60ae7c3db912..4c2301d2ef1a 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
| @@ -618,6 +618,7 @@ TRACE_EVENT(block_rq_remap, | |||
| 618 | __field( unsigned int, nr_sector ) | 618 | __field( unsigned int, nr_sector ) |
| 619 | __field( dev_t, old_dev ) | 619 | __field( dev_t, old_dev ) |
| 620 | __field( sector_t, old_sector ) | 620 | __field( sector_t, old_sector ) |
| 621 | __field( unsigned int, nr_bios ) | ||
| 621 | __array( char, rwbs, RWBS_LEN) | 622 | __array( char, rwbs, RWBS_LEN) |
| 622 | ), | 623 | ), |
| 623 | 624 | ||
| @@ -627,15 +628,16 @@ TRACE_EVENT(block_rq_remap, | |||
| 627 | __entry->nr_sector = blk_rq_sectors(rq); | 628 | __entry->nr_sector = blk_rq_sectors(rq); |
| 628 | __entry->old_dev = dev; | 629 | __entry->old_dev = dev; |
| 629 | __entry->old_sector = from; | 630 | __entry->old_sector = from; |
| 631 | __entry->nr_bios = blk_rq_count_bios(rq); | ||
| 630 | blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); | 632 | blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); |
| 631 | ), | 633 | ), |
| 632 | 634 | ||
| 633 | TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", | 635 | TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu %u", |
| 634 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, | 636 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, |
| 635 | (unsigned long long)__entry->sector, | 637 | (unsigned long long)__entry->sector, |
| 636 | __entry->nr_sector, | 638 | __entry->nr_sector, |
| 637 | MAJOR(__entry->old_dev), MINOR(__entry->old_dev), | 639 | MAJOR(__entry->old_dev), MINOR(__entry->old_dev), |
| 638 | (unsigned long long)__entry->old_sector) | 640 | (unsigned long long)__entry->old_sector, __entry->nr_bios) |
| 639 | ); | 641 | ); |
| 640 | 642 | ||
| 641 | #endif /* _TRACE_BLOCK_H */ | 643 | #endif /* _TRACE_BLOCK_H */ |
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index 45702c3c3837..f18b3b76e01e 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h | |||
| @@ -42,6 +42,7 @@ struct extent_buffer; | |||
| 42 | { BTRFS_TREE_LOG_OBJECTID, "TREE_LOG" }, \ | 42 | { BTRFS_TREE_LOG_OBJECTID, "TREE_LOG" }, \ |
| 43 | { BTRFS_QUOTA_TREE_OBJECTID, "QUOTA_TREE" }, \ | 43 | { BTRFS_QUOTA_TREE_OBJECTID, "QUOTA_TREE" }, \ |
| 44 | { BTRFS_TREE_RELOC_OBJECTID, "TREE_RELOC" }, \ | 44 | { BTRFS_TREE_RELOC_OBJECTID, "TREE_RELOC" }, \ |
| 45 | { BTRFS_UUID_TREE_OBJECTID, "UUID_RELOC" }, \ | ||
| 45 | { BTRFS_DATA_RELOC_TREE_OBJECTID, "DATA_RELOC_TREE" }) | 46 | { BTRFS_DATA_RELOC_TREE_OBJECTID, "DATA_RELOC_TREE" }) |
| 46 | 47 | ||
| 47 | #define show_root_type(obj) \ | 48 | #define show_root_type(obj) \ |
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index 52ae54828eda..e0dc355fa317 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h | |||
| @@ -36,6 +36,11 @@ | |||
| 36 | { CURSEG_COLD_NODE, "Cold NODE" }, \ | 36 | { CURSEG_COLD_NODE, "Cold NODE" }, \ |
| 37 | { NO_CHECK_TYPE, "No TYPE" }) | 37 | { NO_CHECK_TYPE, "No TYPE" }) |
| 38 | 38 | ||
| 39 | #define show_file_type(type) \ | ||
| 40 | __print_symbolic(type, \ | ||
| 41 | { 0, "FILE" }, \ | ||
| 42 | { 1, "DIR" }) | ||
| 43 | |||
| 39 | #define show_gc_type(type) \ | 44 | #define show_gc_type(type) \ |
| 40 | __print_symbolic(type, \ | 45 | __print_symbolic(type, \ |
| 41 | { FG_GC, "Foreground GC" }, \ | 46 | { FG_GC, "Foreground GC" }, \ |
| @@ -623,6 +628,52 @@ TRACE_EVENT(f2fs_do_submit_bio, | |||
| 623 | __entry->size) | 628 | __entry->size) |
| 624 | ); | 629 | ); |
| 625 | 630 | ||
| 631 | DECLARE_EVENT_CLASS(f2fs__page, | ||
| 632 | |||
| 633 | TP_PROTO(struct page *page, int type), | ||
| 634 | |||
| 635 | TP_ARGS(page, type), | ||
| 636 | |||
| 637 | TP_STRUCT__entry( | ||
| 638 | __field(dev_t, dev) | ||
| 639 | __field(ino_t, ino) | ||
| 640 | __field(int, type) | ||
| 641 | __field(int, dir) | ||
| 642 | __field(pgoff_t, index) | ||
| 643 | __field(int, dirty) | ||
| 644 | ), | ||
| 645 | |||
| 646 | TP_fast_assign( | ||
| 647 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
| 648 | __entry->ino = page->mapping->host->i_ino; | ||
| 649 | __entry->type = type; | ||
| 650 | __entry->dir = S_ISDIR(page->mapping->host->i_mode); | ||
| 651 | __entry->index = page->index; | ||
| 652 | __entry->dirty = PageDirty(page); | ||
| 653 | ), | ||
| 654 | |||
| 655 | TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, dirty = %d", | ||
| 656 | show_dev_ino(__entry), | ||
| 657 | show_block_type(__entry->type), | ||
| 658 | show_file_type(__entry->dir), | ||
| 659 | (unsigned long)__entry->index, | ||
| 660 | __entry->dirty) | ||
| 661 | ); | ||
| 662 | |||
| 663 | DEFINE_EVENT(f2fs__page, f2fs_set_page_dirty, | ||
| 664 | |||
| 665 | TP_PROTO(struct page *page, int type), | ||
| 666 | |||
| 667 | TP_ARGS(page, type) | ||
| 668 | ); | ||
| 669 | |||
| 670 | DEFINE_EVENT(f2fs__page, f2fs_vm_page_mkwrite, | ||
| 671 | |||
| 672 | TP_PROTO(struct page *page, int type), | ||
| 673 | |||
| 674 | TP_ARGS(page, type) | ||
| 675 | ); | ||
| 676 | |||
| 626 | TRACE_EVENT(f2fs_submit_write_page, | 677 | TRACE_EVENT(f2fs_submit_write_page, |
| 627 | 678 | ||
| 628 | TP_PROTO(struct page *page, block_t blk_addr, int type), | 679 | TP_PROTO(struct page *page, block_t blk_addr, int type), |
diff --git a/include/trace/events/iommu.h b/include/trace/events/iommu.h new file mode 100644 index 000000000000..a8f5c32d174b --- /dev/null +++ b/include/trace/events/iommu.h | |||
| @@ -0,0 +1,162 @@ | |||
| 1 | /* | ||
| 2 | * iommu trace points | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013 Shuah Khan <shuah.kh@samsung.com> | ||
| 5 | * | ||
| 6 | */ | ||
| 7 | #undef TRACE_SYSTEM | ||
| 8 | #define TRACE_SYSTEM iommu | ||
| 9 | |||
| 10 | #if !defined(_TRACE_IOMMU_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 11 | #define _TRACE_IOMMU_H | ||
| 12 | |||
| 13 | #include <linux/tracepoint.h> | ||
| 14 | #include <linux/pci.h> | ||
| 15 | |||
| 16 | struct device; | ||
| 17 | |||
| 18 | DECLARE_EVENT_CLASS(iommu_group_event, | ||
| 19 | |||
| 20 | TP_PROTO(int group_id, struct device *dev), | ||
| 21 | |||
| 22 | TP_ARGS(group_id, dev), | ||
| 23 | |||
| 24 | TP_STRUCT__entry( | ||
| 25 | __field(int, gid) | ||
| 26 | __string(device, dev_name(dev)) | ||
| 27 | ), | ||
| 28 | |||
| 29 | TP_fast_assign( | ||
| 30 | __entry->gid = group_id; | ||
| 31 | __assign_str(device, dev_name(dev)); | ||
| 32 | ), | ||
| 33 | |||
| 34 | TP_printk("IOMMU: groupID=%d device=%s", | ||
| 35 | __entry->gid, __get_str(device) | ||
| 36 | ) | ||
| 37 | ); | ||
| 38 | |||
| 39 | DEFINE_EVENT(iommu_group_event, add_device_to_group, | ||
| 40 | |||
| 41 | TP_PROTO(int group_id, struct device *dev), | ||
| 42 | |||
| 43 | TP_ARGS(group_id, dev) | ||
| 44 | |||
| 45 | ); | ||
| 46 | |||
| 47 | DEFINE_EVENT(iommu_group_event, remove_device_from_group, | ||
| 48 | |||
| 49 | TP_PROTO(int group_id, struct device *dev), | ||
| 50 | |||
| 51 | TP_ARGS(group_id, dev) | ||
| 52 | ); | ||
| 53 | |||
| 54 | DECLARE_EVENT_CLASS(iommu_device_event, | ||
| 55 | |||
| 56 | TP_PROTO(struct device *dev), | ||
| 57 | |||
| 58 | TP_ARGS(dev), | ||
| 59 | |||
| 60 | TP_STRUCT__entry( | ||
| 61 | __string(device, dev_name(dev)) | ||
| 62 | ), | ||
| 63 | |||
| 64 | TP_fast_assign( | ||
| 65 | __assign_str(device, dev_name(dev)); | ||
| 66 | ), | ||
| 67 | |||
| 68 | TP_printk("IOMMU: device=%s", __get_str(device) | ||
| 69 | ) | ||
| 70 | ); | ||
| 71 | |||
| 72 | DEFINE_EVENT(iommu_device_event, attach_device_to_domain, | ||
| 73 | |||
| 74 | TP_PROTO(struct device *dev), | ||
| 75 | |||
| 76 | TP_ARGS(dev) | ||
| 77 | ); | ||
| 78 | |||
| 79 | DEFINE_EVENT(iommu_device_event, detach_device_from_domain, | ||
| 80 | |||
| 81 | TP_PROTO(struct device *dev), | ||
| 82 | |||
| 83 | TP_ARGS(dev) | ||
| 84 | ); | ||
| 85 | |||
| 86 | DECLARE_EVENT_CLASS(iommu_map_unmap, | ||
| 87 | |||
| 88 | TP_PROTO(unsigned long iova, phys_addr_t paddr, size_t size), | ||
| 89 | |||
| 90 | TP_ARGS(iova, paddr, size), | ||
| 91 | |||
| 92 | TP_STRUCT__entry( | ||
| 93 | __field(u64, iova) | ||
| 94 | __field(u64, paddr) | ||
| 95 | __field(int, size) | ||
| 96 | ), | ||
| 97 | |||
| 98 | TP_fast_assign( | ||
| 99 | __entry->iova = iova; | ||
| 100 | __entry->paddr = paddr; | ||
| 101 | __entry->size = size; | ||
| 102 | ), | ||
| 103 | |||
| 104 | TP_printk("IOMMU: iova=0x%016llx paddr=0x%016llx size=0x%x", | ||
| 105 | __entry->iova, __entry->paddr, __entry->size | ||
| 106 | ) | ||
| 107 | ); | ||
| 108 | |||
| 109 | DEFINE_EVENT(iommu_map_unmap, map, | ||
| 110 | |||
| 111 | TP_PROTO(unsigned long iova, phys_addr_t paddr, size_t size), | ||
| 112 | |||
| 113 | TP_ARGS(iova, paddr, size) | ||
| 114 | ); | ||
| 115 | |||
| 116 | DEFINE_EVENT_PRINT(iommu_map_unmap, unmap, | ||
| 117 | |||
| 118 | TP_PROTO(unsigned long iova, phys_addr_t paddr, size_t size), | ||
| 119 | |||
| 120 | TP_ARGS(iova, paddr, size), | ||
| 121 | |||
| 122 | TP_printk("IOMMU: iova=0x%016llx size=0x%x", | ||
| 123 | __entry->iova, __entry->size | ||
| 124 | ) | ||
| 125 | ); | ||
| 126 | |||
| 127 | DECLARE_EVENT_CLASS(iommu_error, | ||
| 128 | |||
| 129 | TP_PROTO(struct device *dev, unsigned long iova, int flags), | ||
| 130 | |||
| 131 | TP_ARGS(dev, iova, flags), | ||
| 132 | |||
| 133 | TP_STRUCT__entry( | ||
| 134 | __string(device, dev_name(dev)) | ||
| 135 | __string(driver, dev_driver_string(dev)) | ||
| 136 | __field(u64, iova) | ||
| 137 | __field(int, flags) | ||
| 138 | ), | ||
| 139 | |||
| 140 | TP_fast_assign( | ||
| 141 | __assign_str(device, dev_name(dev)); | ||
| 142 | __assign_str(driver, dev_driver_string(dev)); | ||
| 143 | __entry->iova = iova; | ||
| 144 | __entry->flags = flags; | ||
| 145 | ), | ||
| 146 | |||
| 147 | TP_printk("IOMMU:%s %s iova=0x%016llx flags=0x%04x", | ||
| 148 | __get_str(driver), __get_str(device), | ||
| 149 | __entry->iova, __entry->flags | ||
| 150 | ) | ||
| 151 | ); | ||
| 152 | |||
| 153 | DEFINE_EVENT(iommu_error, io_page_fault, | ||
| 154 | |||
| 155 | TP_PROTO(struct device *dev, unsigned long iova, int flags), | ||
| 156 | |||
| 157 | TP_ARGS(dev, iova, flags) | ||
| 158 | ); | ||
| 159 | #endif /* _TRACE_IOMMU_H */ | ||
| 160 | |||
| 161 | /* This part must be outside protection */ | ||
| 162 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index d0c613476620..aece1346ceb7 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h | |||
| @@ -267,14 +267,12 @@ DEFINE_EVENT_PRINT(mm_page, mm_page_pcpu_drain, | |||
| 267 | TRACE_EVENT(mm_page_alloc_extfrag, | 267 | TRACE_EVENT(mm_page_alloc_extfrag, |
| 268 | 268 | ||
| 269 | TP_PROTO(struct page *page, | 269 | TP_PROTO(struct page *page, |
| 270 | int alloc_order, int fallback_order, | 270 | int alloc_order, int fallback_order, |
| 271 | int alloc_migratetype, int fallback_migratetype, | 271 | int alloc_migratetype, int fallback_migratetype, int new_migratetype), |
| 272 | int change_ownership), | ||
| 273 | 272 | ||
| 274 | TP_ARGS(page, | 273 | TP_ARGS(page, |
| 275 | alloc_order, fallback_order, | 274 | alloc_order, fallback_order, |
| 276 | alloc_migratetype, fallback_migratetype, | 275 | alloc_migratetype, fallback_migratetype, new_migratetype), |
| 277 | change_ownership), | ||
| 278 | 276 | ||
| 279 | TP_STRUCT__entry( | 277 | TP_STRUCT__entry( |
| 280 | __field( struct page *, page ) | 278 | __field( struct page *, page ) |
| @@ -291,7 +289,7 @@ TRACE_EVENT(mm_page_alloc_extfrag, | |||
| 291 | __entry->fallback_order = fallback_order; | 289 | __entry->fallback_order = fallback_order; |
| 292 | __entry->alloc_migratetype = alloc_migratetype; | 290 | __entry->alloc_migratetype = alloc_migratetype; |
| 293 | __entry->fallback_migratetype = fallback_migratetype; | 291 | __entry->fallback_migratetype = fallback_migratetype; |
| 294 | __entry->change_ownership = change_ownership; | 292 | __entry->change_ownership = (new_migratetype == alloc_migratetype); |
| 295 | ), | 293 | ), |
| 296 | 294 | ||
| 297 | 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", | 295 | 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", |
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h index 7005d1109ec9..131a0bda7aec 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h | |||
| @@ -296,23 +296,21 @@ DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_ready, | |||
| 296 | 296 | ||
| 297 | TRACE_EVENT( | 297 | TRACE_EVENT( |
| 298 | kvm_async_pf_completed, | 298 | kvm_async_pf_completed, |
| 299 | TP_PROTO(unsigned long address, struct page *page, u64 gva), | 299 | TP_PROTO(unsigned long address, u64 gva), |
| 300 | TP_ARGS(address, page, gva), | 300 | TP_ARGS(address, gva), |
| 301 | 301 | ||
| 302 | TP_STRUCT__entry( | 302 | TP_STRUCT__entry( |
| 303 | __field(unsigned long, address) | 303 | __field(unsigned long, address) |
| 304 | __field(pfn_t, pfn) | ||
| 305 | __field(u64, gva) | 304 | __field(u64, gva) |
| 306 | ), | 305 | ), |
| 307 | 306 | ||
| 308 | TP_fast_assign( | 307 | TP_fast_assign( |
| 309 | __entry->address = address; | 308 | __entry->address = address; |
| 310 | __entry->pfn = page ? page_to_pfn(page) : 0; | ||
| 311 | __entry->gva = gva; | 309 | __entry->gva = gva; |
| 312 | ), | 310 | ), |
| 313 | 311 | ||
| 314 | TP_printk("gva %#llx address %#lx pfn %#llx", __entry->gva, | 312 | TP_printk("gva %#llx address %#lx", __entry->gva, |
| 315 | __entry->address, __entry->pfn) | 313 | __entry->address) |
| 316 | ); | 314 | ); |
| 317 | 315 | ||
| 318 | #endif | 316 | #endif |
diff --git a/include/trace/events/power_cpu_migrate.h b/include/trace/events/power_cpu_migrate.h new file mode 100644 index 000000000000..f76dd4de625e --- /dev/null +++ b/include/trace/events/power_cpu_migrate.h | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM power | ||
| 3 | |||
| 4 | #if !defined(_TRACE_POWER_CPU_MIGRATE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_POWER_CPU_MIGRATE_H | ||
| 6 | |||
| 7 | #include <linux/tracepoint.h> | ||
| 8 | |||
| 9 | #define __cpu_migrate_proto \ | ||
| 10 | TP_PROTO(u64 timestamp, \ | ||
| 11 | u32 cpu_hwid) | ||
| 12 | #define __cpu_migrate_args \ | ||
| 13 | TP_ARGS(timestamp, \ | ||
| 14 | cpu_hwid) | ||
| 15 | |||
| 16 | DECLARE_EVENT_CLASS(cpu_migrate, | ||
| 17 | |||
| 18 | __cpu_migrate_proto, | ||
| 19 | __cpu_migrate_args, | ||
| 20 | |||
| 21 | TP_STRUCT__entry( | ||
| 22 | __field(u64, timestamp ) | ||
| 23 | __field(u32, cpu_hwid ) | ||
| 24 | ), | ||
| 25 | |||
| 26 | TP_fast_assign( | ||
| 27 | __entry->timestamp = timestamp; | ||
| 28 | __entry->cpu_hwid = cpu_hwid; | ||
| 29 | ), | ||
| 30 | |||
| 31 | TP_printk("timestamp=%llu cpu_hwid=0x%08lX", | ||
| 32 | (unsigned long long)__entry->timestamp, | ||
| 33 | (unsigned long)__entry->cpu_hwid | ||
| 34 | ) | ||
| 35 | ); | ||
| 36 | |||
| 37 | #define __define_cpu_migrate_event(name) \ | ||
| 38 | DEFINE_EVENT(cpu_migrate, cpu_migrate_##name, \ | ||
| 39 | __cpu_migrate_proto, \ | ||
| 40 | __cpu_migrate_args \ | ||
| 41 | ) | ||
| 42 | |||
| 43 | __define_cpu_migrate_event(begin); | ||
| 44 | __define_cpu_migrate_event(finish); | ||
| 45 | __define_cpu_migrate_event(current); | ||
| 46 | |||
| 47 | #undef __define_cpu_migrate | ||
| 48 | #undef __cpu_migrate_proto | ||
| 49 | #undef __cpu_migrate_args | ||
| 50 | |||
| 51 | /* This file can get included multiple times, TRACE_HEADER_MULTI_READ at top */ | ||
| 52 | #ifndef _PWR_CPU_MIGRATE_EVENT_AVOID_DOUBLE_DEFINING | ||
| 53 | #define _PWR_CPU_MIGRATE_EVENT_AVOID_DOUBLE_DEFINING | ||
| 54 | |||
| 55 | /* | ||
| 56 | * Set from_phys_cpu and to_phys_cpu to CPU_MIGRATE_ALL_CPUS to indicate | ||
| 57 | * a whole-cluster migration: | ||
| 58 | */ | ||
| 59 | #define CPU_MIGRATE_ALL_CPUS 0x80000000U | ||
| 60 | #endif | ||
| 61 | |||
| 62 | #endif /* _TRACE_POWER_CPU_MIGRATE_H */ | ||
| 63 | |||
| 64 | /* This part must be outside protection */ | ||
| 65 | #undef TRACE_INCLUDE_FILE | ||
| 66 | #define TRACE_INCLUDE_FILE power_cpu_migrate | ||
| 67 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/random.h b/include/trace/events/random.h index 422df19de732..805af6db41cc 100644 --- a/include/trace/events/random.h +++ b/include/trace/events/random.h | |||
| @@ -7,6 +7,25 @@ | |||
| 7 | #include <linux/writeback.h> | 7 | #include <linux/writeback.h> |
| 8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
| 9 | 9 | ||
| 10 | TRACE_EVENT(add_device_randomness, | ||
| 11 | TP_PROTO(int bytes, unsigned long IP), | ||
| 12 | |||
| 13 | TP_ARGS(bytes, IP), | ||
| 14 | |||
| 15 | TP_STRUCT__entry( | ||
| 16 | __field( int, bytes ) | ||
| 17 | __field(unsigned long, IP ) | ||
| 18 | ), | ||
| 19 | |||
| 20 | TP_fast_assign( | ||
| 21 | __entry->bytes = bytes; | ||
| 22 | __entry->IP = IP; | ||
| 23 | ), | ||
| 24 | |||
| 25 | TP_printk("bytes %d caller %pF", | ||
| 26 | __entry->bytes, (void *)__entry->IP) | ||
| 27 | ); | ||
| 28 | |||
| 10 | DECLARE_EVENT_CLASS(random__mix_pool_bytes, | 29 | DECLARE_EVENT_CLASS(random__mix_pool_bytes, |
| 11 | TP_PROTO(const char *pool_name, int bytes, unsigned long IP), | 30 | TP_PROTO(const char *pool_name, int bytes, unsigned long IP), |
| 12 | 31 | ||
| @@ -68,7 +87,112 @@ TRACE_EVENT(credit_entropy_bits, | |||
| 68 | (void *)__entry->IP) | 87 | (void *)__entry->IP) |
| 69 | ); | 88 | ); |
| 70 | 89 | ||
| 71 | TRACE_EVENT(get_random_bytes, | 90 | TRACE_EVENT(push_to_pool, |
| 91 | TP_PROTO(const char *pool_name, int pool_bits, int input_bits), | ||
| 92 | |||
| 93 | TP_ARGS(pool_name, pool_bits, input_bits), | ||
| 94 | |||
| 95 | TP_STRUCT__entry( | ||
| 96 | __field( const char *, pool_name ) | ||
| 97 | __field( int, pool_bits ) | ||
| 98 | __field( int, input_bits ) | ||
| 99 | ), | ||
| 100 | |||
| 101 | TP_fast_assign( | ||
| 102 | __entry->pool_name = pool_name; | ||
| 103 | __entry->pool_bits = pool_bits; | ||
| 104 | __entry->input_bits = input_bits; | ||
| 105 | ), | ||
| 106 | |||
| 107 | TP_printk("%s: pool_bits %d input_pool_bits %d", | ||
| 108 | __entry->pool_name, __entry->pool_bits, | ||
| 109 | __entry->input_bits) | ||
| 110 | ); | ||
| 111 | |||
| 112 | TRACE_EVENT(debit_entropy, | ||
| 113 | TP_PROTO(const char *pool_name, int debit_bits), | ||
| 114 | |||
| 115 | TP_ARGS(pool_name, debit_bits), | ||
| 116 | |||
| 117 | TP_STRUCT__entry( | ||
| 118 | __field( const char *, pool_name ) | ||
| 119 | __field( int, debit_bits ) | ||
| 120 | ), | ||
| 121 | |||
| 122 | TP_fast_assign( | ||
| 123 | __entry->pool_name = pool_name; | ||
| 124 | __entry->debit_bits = debit_bits; | ||
| 125 | ), | ||
| 126 | |||
| 127 | TP_printk("%s: debit_bits %d", __entry->pool_name, | ||
| 128 | __entry->debit_bits) | ||
| 129 | ); | ||
| 130 | |||
| 131 | TRACE_EVENT(add_input_randomness, | ||
| 132 | TP_PROTO(int input_bits), | ||
| 133 | |||
| 134 | TP_ARGS(input_bits), | ||
| 135 | |||
| 136 | TP_STRUCT__entry( | ||
| 137 | __field( int, input_bits ) | ||
| 138 | ), | ||
| 139 | |||
| 140 | TP_fast_assign( | ||
| 141 | __entry->input_bits = input_bits; | ||
| 142 | ), | ||
| 143 | |||
| 144 | TP_printk("input_pool_bits %d", __entry->input_bits) | ||
| 145 | ); | ||
| 146 | |||
| 147 | TRACE_EVENT(add_disk_randomness, | ||
| 148 | TP_PROTO(dev_t dev, int input_bits), | ||
| 149 | |||
| 150 | TP_ARGS(dev, input_bits), | ||
| 151 | |||
| 152 | TP_STRUCT__entry( | ||
| 153 | __field( dev_t, dev ) | ||
| 154 | __field( int, input_bits ) | ||
| 155 | ), | ||
| 156 | |||
| 157 | TP_fast_assign( | ||
| 158 | __entry->dev = dev; | ||
| 159 | __entry->input_bits = input_bits; | ||
| 160 | ), | ||
| 161 | |||
| 162 | TP_printk("dev %d,%d input_pool_bits %d", MAJOR(__entry->dev), | ||
| 163 | MINOR(__entry->dev), __entry->input_bits) | ||
| 164 | ); | ||
| 165 | |||
| 166 | TRACE_EVENT(xfer_secondary_pool, | ||
| 167 | TP_PROTO(const char *pool_name, int xfer_bits, int request_bits, | ||
| 168 | int pool_entropy, int input_entropy), | ||
| 169 | |||
| 170 | TP_ARGS(pool_name, xfer_bits, request_bits, pool_entropy, | ||
| 171 | input_entropy), | ||
| 172 | |||
| 173 | TP_STRUCT__entry( | ||
| 174 | __field( const char *, pool_name ) | ||
| 175 | __field( int, xfer_bits ) | ||
| 176 | __field( int, request_bits ) | ||
| 177 | __field( int, pool_entropy ) | ||
| 178 | __field( int, input_entropy ) | ||
| 179 | ), | ||
| 180 | |||
| 181 | TP_fast_assign( | ||
| 182 | __entry->pool_name = pool_name; | ||
| 183 | __entry->xfer_bits = xfer_bits; | ||
| 184 | __entry->request_bits = request_bits; | ||
| 185 | __entry->pool_entropy = pool_entropy; | ||
| 186 | __entry->input_entropy = input_entropy; | ||
| 187 | ), | ||
| 188 | |||
| 189 | TP_printk("pool %s xfer_bits %d request_bits %d pool_entropy %d " | ||
| 190 | "input_entropy %d", __entry->pool_name, __entry->xfer_bits, | ||
| 191 | __entry->request_bits, __entry->pool_entropy, | ||
| 192 | __entry->input_entropy) | ||
| 193 | ); | ||
| 194 | |||
| 195 | DECLARE_EVENT_CLASS(random__get_random_bytes, | ||
| 72 | TP_PROTO(int nbytes, unsigned long IP), | 196 | TP_PROTO(int nbytes, unsigned long IP), |
| 73 | 197 | ||
| 74 | TP_ARGS(nbytes, IP), | 198 | TP_ARGS(nbytes, IP), |
| @@ -86,6 +210,18 @@ TRACE_EVENT(get_random_bytes, | |||
| 86 | TP_printk("nbytes %d caller %pF", __entry->nbytes, (void *)__entry->IP) | 210 | TP_printk("nbytes %d caller %pF", __entry->nbytes, (void *)__entry->IP) |
| 87 | ); | 211 | ); |
| 88 | 212 | ||
| 213 | DEFINE_EVENT(random__get_random_bytes, get_random_bytes, | ||
| 214 | TP_PROTO(int nbytes, unsigned long IP), | ||
| 215 | |||
| 216 | TP_ARGS(nbytes, IP) | ||
| 217 | ); | ||
| 218 | |||
| 219 | DEFINE_EVENT(random__get_random_bytes, get_random_bytes_arch, | ||
| 220 | TP_PROTO(int nbytes, unsigned long IP), | ||
| 221 | |||
| 222 | TP_ARGS(nbytes, IP) | ||
| 223 | ); | ||
| 224 | |||
| 89 | DECLARE_EVENT_CLASS(random__extract_entropy, | 225 | DECLARE_EVENT_CLASS(random__extract_entropy, |
| 90 | TP_PROTO(const char *pool_name, int nbytes, int entropy_count, | 226 | TP_PROTO(const char *pool_name, int nbytes, int entropy_count, |
| 91 | unsigned long IP), | 227 | unsigned long IP), |
| @@ -126,7 +262,52 @@ DEFINE_EVENT(random__extract_entropy, extract_entropy_user, | |||
| 126 | TP_ARGS(pool_name, nbytes, entropy_count, IP) | 262 | TP_ARGS(pool_name, nbytes, entropy_count, IP) |
| 127 | ); | 263 | ); |
| 128 | 264 | ||
| 265 | TRACE_EVENT(random_read, | ||
| 266 | TP_PROTO(int got_bits, int need_bits, int pool_left, int input_left), | ||
| 267 | |||
| 268 | TP_ARGS(got_bits, need_bits, pool_left, input_left), | ||
| 269 | |||
| 270 | TP_STRUCT__entry( | ||
| 271 | __field( int, got_bits ) | ||
| 272 | __field( int, need_bits ) | ||
| 273 | __field( int, pool_left ) | ||
| 274 | __field( int, input_left ) | ||
| 275 | ), | ||
| 276 | |||
| 277 | TP_fast_assign( | ||
| 278 | __entry->got_bits = got_bits; | ||
| 279 | __entry->need_bits = need_bits; | ||
| 280 | __entry->pool_left = pool_left; | ||
| 281 | __entry->input_left = input_left; | ||
| 282 | ), | ||
| 283 | |||
| 284 | TP_printk("got_bits %d still_needed_bits %d " | ||
| 285 | "blocking_pool_entropy_left %d input_entropy_left %d", | ||
| 286 | __entry->got_bits, __entry->got_bits, __entry->pool_left, | ||
| 287 | __entry->input_left) | ||
| 288 | ); | ||
| 289 | |||
| 290 | TRACE_EVENT(urandom_read, | ||
| 291 | TP_PROTO(int got_bits, int pool_left, int input_left), | ||
| 292 | |||
| 293 | TP_ARGS(got_bits, pool_left, input_left), | ||
| 294 | |||
| 295 | TP_STRUCT__entry( | ||
| 296 | __field( int, got_bits ) | ||
| 297 | __field( int, pool_left ) | ||
| 298 | __field( int, input_left ) | ||
| 299 | ), | ||
| 300 | |||
| 301 | TP_fast_assign( | ||
| 302 | __entry->got_bits = got_bits; | ||
| 303 | __entry->pool_left = pool_left; | ||
| 304 | __entry->input_left = input_left; | ||
| 305 | ), | ||
| 129 | 306 | ||
| 307 | TP_printk("got_bits %d nonblocking_pool_entropy_left %d " | ||
| 308 | "input_entropy_left %d", __entry->got_bits, | ||
| 309 | __entry->pool_left, __entry->input_left) | ||
| 310 | ); | ||
| 130 | 311 | ||
| 131 | #endif /* _TRACE_RANDOM_H */ | 312 | #endif /* _TRACE_RANDOM_H */ |
| 132 | 313 | ||
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index ee2376cfaab3..aca382266411 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h | |||
| @@ -39,15 +39,26 @@ TRACE_EVENT(rcu_utilization, | |||
| 39 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | 39 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) |
| 40 | 40 | ||
| 41 | /* | 41 | /* |
| 42 | * Tracepoint for grace-period events: starting and ending a grace | 42 | * Tracepoint for grace-period events. Takes a string identifying the |
| 43 | * period ("start" and "end", respectively), a CPU noting the start | 43 | * RCU flavor, the grace-period number, and a string identifying the |
| 44 | * of a new grace period or the end of an old grace period ("cpustart" | 44 | * grace-period-related event as follows: |
| 45 | * and "cpuend", respectively), a CPU passing through a quiescent | 45 | * |
| 46 | * state ("cpuqs"), a CPU coming online or going offline ("cpuonl" | 46 | * "AccReadyCB": CPU acclerates new callbacks to RCU_NEXT_READY_TAIL. |
| 47 | * and "cpuofl", respectively), a CPU being kicked for being too | 47 | * "AccWaitCB": CPU accelerates new callbacks to RCU_WAIT_TAIL. |
| 48 | * long in dyntick-idle mode ("kick"), a CPU accelerating its new | 48 | * "newreq": Request a new grace period. |
| 49 | * callbacks to RCU_NEXT_READY_TAIL ("AccReadyCB"), and a CPU | 49 | * "start": Start a grace period. |
| 50 | * accelerating its new callbacks to RCU_WAIT_TAIL ("AccWaitCB"). | 50 | * "cpustart": CPU first notices a grace-period start. |
| 51 | * "cpuqs": CPU passes through a quiescent state. | ||
| 52 | * "cpuonl": CPU comes online. | ||
| 53 | * "cpuofl": CPU goes offline. | ||
| 54 | * "reqwait": GP kthread sleeps waiting for grace-period request. | ||
| 55 | * "reqwaitsig": GP kthread awakened by signal from reqwait state. | ||
| 56 | * "fqswait": GP kthread waiting until time to force quiescent states. | ||
| 57 | * "fqsstart": GP kthread starts forcing quiescent states. | ||
| 58 | * "fqsend": GP kthread done forcing quiescent states. | ||
| 59 | * "fqswaitsig": GP kthread awakened by signal from fqswait state. | ||
| 60 | * "end": End a grace period. | ||
| 61 | * "cpuend": CPU first notices a grace-period end. | ||
| 51 | */ | 62 | */ |
| 52 | TRACE_EVENT(rcu_grace_period, | 63 | TRACE_EVENT(rcu_grace_period, |
| 53 | 64 | ||
| @@ -161,6 +172,46 @@ TRACE_EVENT(rcu_grace_period_init, | |||
| 161 | ); | 172 | ); |
| 162 | 173 | ||
| 163 | /* | 174 | /* |
| 175 | * Tracepoint for RCU no-CBs CPU callback handoffs. This event is intended | ||
| 176 | * to assist debugging of these handoffs. | ||
| 177 | * | ||
| 178 | * The first argument is the name of the RCU flavor, and the second is | ||
| 179 | * the number of the offloaded CPU are extracted. The third and final | ||
| 180 | * argument is a string as follows: | ||
| 181 | * | ||
| 182 | * "WakeEmpty": Wake rcuo kthread, first CB to empty list. | ||
| 183 | * "WakeOvf": Wake rcuo kthread, CB list is huge. | ||
| 184 | * "WakeNot": Don't wake rcuo kthread. | ||
| 185 | * "WakeNotPoll": Don't wake rcuo kthread because it is polling. | ||
| 186 | * "Poll": Start of new polling cycle for rcu_nocb_poll. | ||
| 187 | * "Sleep": Sleep waiting for CBs for !rcu_nocb_poll. | ||
| 188 | * "WokeEmpty": rcuo kthread woke to find empty list. | ||
| 189 | * "WokeNonEmpty": rcuo kthread woke to find non-empty list. | ||
| 190 | * "WaitQueue": Enqueue partially done, timed wait for it to complete. | ||
| 191 | * "WokeQueue": Partial enqueue now complete. | ||
| 192 | */ | ||
| 193 | TRACE_EVENT(rcu_nocb_wake, | ||
| 194 | |||
| 195 | TP_PROTO(const char *rcuname, int cpu, const char *reason), | ||
| 196 | |||
| 197 | TP_ARGS(rcuname, cpu, reason), | ||
| 198 | |||
| 199 | TP_STRUCT__entry( | ||
| 200 | __field(const char *, rcuname) | ||
| 201 | __field(int, cpu) | ||
| 202 | __field(const char *, reason) | ||
| 203 | ), | ||
| 204 | |||
| 205 | TP_fast_assign( | ||
| 206 | __entry->rcuname = rcuname; | ||
| 207 | __entry->cpu = cpu; | ||
| 208 | __entry->reason = reason; | ||
| 209 | ), | ||
| 210 | |||
| 211 | TP_printk("%s %d %s", __entry->rcuname, __entry->cpu, __entry->reason) | ||
| 212 | ); | ||
| 213 | |||
| 214 | /* | ||
| 164 | * Tracepoint for tasks blocking within preemptible-RCU read-side | 215 | * Tracepoint for tasks blocking within preemptible-RCU read-side |
| 165 | * critical sections. Track the type of RCU (which one day might | 216 | * critical sections. Track the type of RCU (which one day might |
| 166 | * include SRCU), the grace-period number that the task is blocking | 217 | * include SRCU), the grace-period number that the task is blocking |
| @@ -540,17 +591,17 @@ TRACE_EVENT(rcu_invoke_kfree_callback, | |||
| 540 | TRACE_EVENT(rcu_batch_end, | 591 | TRACE_EVENT(rcu_batch_end, |
| 541 | 592 | ||
| 542 | TP_PROTO(const char *rcuname, int callbacks_invoked, | 593 | TP_PROTO(const char *rcuname, int callbacks_invoked, |
| 543 | bool cb, bool nr, bool iit, bool risk), | 594 | char cb, char nr, char iit, char risk), |
| 544 | 595 | ||
| 545 | TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), | 596 | TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), |
| 546 | 597 | ||
| 547 | TP_STRUCT__entry( | 598 | TP_STRUCT__entry( |
| 548 | __field(const char *, rcuname) | 599 | __field(const char *, rcuname) |
| 549 | __field(int, callbacks_invoked) | 600 | __field(int, callbacks_invoked) |
| 550 | __field(bool, cb) | 601 | __field(char, cb) |
| 551 | __field(bool, nr) | 602 | __field(char, nr) |
| 552 | __field(bool, iit) | 603 | __field(char, iit) |
| 553 | __field(bool, risk) | 604 | __field(char, risk) |
| 554 | ), | 605 | ), |
| 555 | 606 | ||
| 556 | TP_fast_assign( | 607 | TP_fast_assign( |
| @@ -656,6 +707,7 @@ TRACE_EVENT(rcu_barrier, | |||
| 656 | #define trace_rcu_future_grace_period(rcuname, gpnum, completed, c, \ | 707 | #define trace_rcu_future_grace_period(rcuname, gpnum, completed, c, \ |
| 657 | level, grplo, grphi, event) \ | 708 | level, grplo, grphi, event) \ |
| 658 | do { } while (0) | 709 | do { } while (0) |
| 710 | #define trace_rcu_nocb_wake(rcuname, cpu, reason) do { } while (0) | ||
| 659 | #define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) | 711 | #define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) |
| 660 | #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) | 712 | #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) |
| 661 | #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \ | 713 | #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \ |
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 2e7d9947a10d..04c308413a5d 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
| @@ -100,7 +100,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p) | |||
| 100 | /* | 100 | /* |
| 101 | * For all intents and purposes a preempted task is a running task. | 101 | * For all intents and purposes a preempted task is a running task. |
| 102 | */ | 102 | */ |
| 103 | if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE) | 103 | if (task_preempt_count(p) & PREEMPT_ACTIVE) |
| 104 | state = TASK_RUNNING | TASK_STATE_MAX; | 104 | state = TASK_RUNNING | TASK_STATE_MAX; |
| 105 | #endif | 105 | #endif |
| 106 | 106 | ||
| @@ -424,6 +424,25 @@ TRACE_EVENT(sched_pi_setprio, | |||
| 424 | __entry->oldprio, __entry->newprio) | 424 | __entry->oldprio, __entry->newprio) |
| 425 | ); | 425 | ); |
| 426 | 426 | ||
| 427 | #ifdef CONFIG_DETECT_HUNG_TASK | ||
| 428 | TRACE_EVENT(sched_process_hang, | ||
| 429 | TP_PROTO(struct task_struct *tsk), | ||
| 430 | TP_ARGS(tsk), | ||
| 431 | |||
| 432 | TP_STRUCT__entry( | ||
| 433 | __array( char, comm, TASK_COMM_LEN ) | ||
| 434 | __field( pid_t, pid ) | ||
| 435 | ), | ||
| 436 | |||
| 437 | TP_fast_assign( | ||
| 438 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); | ||
| 439 | __entry->pid = tsk->pid; | ||
| 440 | ), | ||
| 441 | |||
| 442 | TP_printk("comm=%s pid=%d", __entry->comm, __entry->pid) | ||
| 443 | ); | ||
| 444 | #endif /* CONFIG_DETECT_HUNG_TASK */ | ||
| 445 | |||
| 427 | #endif /* _TRACE_SCHED_H */ | 446 | #endif /* _TRACE_SCHED_H */ |
| 428 | 447 | ||
| 429 | /* This part must be outside protection */ | 448 | /* This part must be outside protection */ |
diff --git a/include/trace/events/spi.h b/include/trace/events/spi.h new file mode 100644 index 000000000000..7e02c983bbe2 --- /dev/null +++ b/include/trace/events/spi.h | |||
| @@ -0,0 +1,156 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM spi | ||
| 3 | |||
| 4 | #if !defined(_TRACE_SPI_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_SPI_H | ||
| 6 | |||
| 7 | #include <linux/ktime.h> | ||
| 8 | #include <linux/tracepoint.h> | ||
| 9 | |||
| 10 | DECLARE_EVENT_CLASS(spi_master, | ||
| 11 | |||
| 12 | TP_PROTO(struct spi_master *master), | ||
| 13 | |||
| 14 | TP_ARGS(master), | ||
| 15 | |||
| 16 | TP_STRUCT__entry( | ||
| 17 | __field( int, bus_num ) | ||
| 18 | ), | ||
| 19 | |||
| 20 | TP_fast_assign( | ||
| 21 | __entry->bus_num = master->bus_num; | ||
| 22 | ), | ||
| 23 | |||
| 24 | TP_printk("spi%d", (int)__entry->bus_num) | ||
| 25 | |||
| 26 | ); | ||
| 27 | |||
| 28 | DEFINE_EVENT(spi_master, spi_master_idle, | ||
| 29 | |||
| 30 | TP_PROTO(struct spi_master *master), | ||
| 31 | |||
| 32 | TP_ARGS(master) | ||
| 33 | |||
| 34 | ); | ||
| 35 | |||
| 36 | DEFINE_EVENT(spi_master, spi_master_busy, | ||
| 37 | |||
| 38 | TP_PROTO(struct spi_master *master), | ||
| 39 | |||
| 40 | TP_ARGS(master) | ||
| 41 | |||
| 42 | ); | ||
| 43 | |||
| 44 | DECLARE_EVENT_CLASS(spi_message, | ||
| 45 | |||
| 46 | TP_PROTO(struct spi_message *msg), | ||
| 47 | |||
| 48 | TP_ARGS(msg), | ||
| 49 | |||
| 50 | TP_STRUCT__entry( | ||
| 51 | __field( int, bus_num ) | ||
| 52 | __field( int, chip_select ) | ||
| 53 | __field( struct spi_message *, msg ) | ||
| 54 | ), | ||
| 55 | |||
| 56 | TP_fast_assign( | ||
| 57 | __entry->bus_num = msg->spi->master->bus_num; | ||
| 58 | __entry->chip_select = msg->spi->chip_select; | ||
| 59 | __entry->msg = msg; | ||
| 60 | ), | ||
| 61 | |||
| 62 | TP_printk("spi%d.%d %p", (int)__entry->bus_num, | ||
| 63 | (int)__entry->chip_select, | ||
| 64 | (struct spi_message *)__entry->msg) | ||
| 65 | ); | ||
| 66 | |||
| 67 | DEFINE_EVENT(spi_message, spi_message_submit, | ||
| 68 | |||
| 69 | TP_PROTO(struct spi_message *msg), | ||
| 70 | |||
| 71 | TP_ARGS(msg) | ||
| 72 | |||
| 73 | ); | ||
| 74 | |||
| 75 | DEFINE_EVENT(spi_message, spi_message_start, | ||
| 76 | |||
| 77 | TP_PROTO(struct spi_message *msg), | ||
| 78 | |||
| 79 | TP_ARGS(msg) | ||
| 80 | |||
| 81 | ); | ||
| 82 | |||
| 83 | TRACE_EVENT(spi_message_done, | ||
| 84 | |||
| 85 | TP_PROTO(struct spi_message *msg), | ||
| 86 | |||
| 87 | TP_ARGS(msg), | ||
| 88 | |||
| 89 | TP_STRUCT__entry( | ||
| 90 | __field( int, bus_num ) | ||
| 91 | __field( int, chip_select ) | ||
| 92 | __field( struct spi_message *, msg ) | ||
| 93 | __field( unsigned, frame ) | ||
| 94 | __field( unsigned, actual ) | ||
| 95 | ), | ||
| 96 | |||
| 97 | TP_fast_assign( | ||
| 98 | __entry->bus_num = msg->spi->master->bus_num; | ||
| 99 | __entry->chip_select = msg->spi->chip_select; | ||
| 100 | __entry->msg = msg; | ||
| 101 | __entry->frame = msg->frame_length; | ||
| 102 | __entry->actual = msg->actual_length; | ||
| 103 | ), | ||
| 104 | |||
| 105 | TP_printk("spi%d.%d %p len=%u/%u", (int)__entry->bus_num, | ||
| 106 | (int)__entry->chip_select, | ||
| 107 | (struct spi_message *)__entry->msg, | ||
| 108 | (unsigned)__entry->actual, (unsigned)__entry->frame) | ||
| 109 | ); | ||
| 110 | |||
| 111 | DECLARE_EVENT_CLASS(spi_transfer, | ||
| 112 | |||
| 113 | TP_PROTO(struct spi_message *msg, struct spi_transfer *xfer), | ||
| 114 | |||
| 115 | TP_ARGS(msg, xfer), | ||
| 116 | |||
| 117 | TP_STRUCT__entry( | ||
| 118 | __field( int, bus_num ) | ||
| 119 | __field( int, chip_select ) | ||
| 120 | __field( struct spi_transfer *, xfer ) | ||
| 121 | __field( int, len ) | ||
| 122 | ), | ||
| 123 | |||
| 124 | TP_fast_assign( | ||
| 125 | __entry->bus_num = msg->spi->master->bus_num; | ||
| 126 | __entry->chip_select = msg->spi->chip_select; | ||
| 127 | __entry->xfer = xfer; | ||
| 128 | __entry->len = xfer->len; | ||
| 129 | ), | ||
| 130 | |||
| 131 | TP_printk("spi%d.%d %p len=%d", (int)__entry->bus_num, | ||
| 132 | (int)__entry->chip_select, | ||
| 133 | (struct spi_message *)__entry->xfer, | ||
| 134 | (int)__entry->len) | ||
| 135 | ); | ||
| 136 | |||
| 137 | DEFINE_EVENT(spi_transfer, spi_transfer_start, | ||
| 138 | |||
| 139 | TP_PROTO(struct spi_message *msg, struct spi_transfer *xfer), | ||
| 140 | |||
| 141 | TP_ARGS(msg, xfer) | ||
| 142 | |||
| 143 | ); | ||
| 144 | |||
| 145 | DEFINE_EVENT(spi_transfer, spi_transfer_stop, | ||
| 146 | |||
| 147 | TP_PROTO(struct spi_message *msg, struct spi_transfer *xfer), | ||
| 148 | |||
| 149 | TP_ARGS(msg, xfer) | ||
| 150 | |||
| 151 | ); | ||
| 152 | |||
| 153 | #endif /* _TRACE_POWER_H */ | ||
| 154 | |||
| 155 | /* This part must be outside protection */ | ||
| 156 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/swiotlb.h b/include/trace/events/swiotlb.h new file mode 100644 index 000000000000..7ea4c5e7c448 --- /dev/null +++ b/include/trace/events/swiotlb.h | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM swiotlb | ||
| 3 | |||
| 4 | #if !defined(_TRACE_SWIOTLB_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_SWIOTLB_H | ||
| 6 | |||
| 7 | #include <linux/tracepoint.h> | ||
| 8 | |||
| 9 | TRACE_EVENT(swiotlb_bounced, | ||
| 10 | |||
| 11 | TP_PROTO(struct device *dev, | ||
| 12 | dma_addr_t dev_addr, | ||
| 13 | size_t size, | ||
| 14 | int swiotlb_force), | ||
| 15 | |||
| 16 | TP_ARGS(dev, dev_addr, size, swiotlb_force), | ||
| 17 | |||
| 18 | TP_STRUCT__entry( | ||
| 19 | __string( dev_name, dev_name(dev) ) | ||
| 20 | __field( u64, dma_mask ) | ||
| 21 | __field( dma_addr_t, dev_addr ) | ||
| 22 | __field( size_t, size ) | ||
| 23 | __field( int, swiotlb_force ) | ||
| 24 | ), | ||
| 25 | |||
| 26 | TP_fast_assign( | ||
| 27 | __assign_str(dev_name, dev_name(dev)); | ||
| 28 | __entry->dma_mask = (dev->dma_mask ? *dev->dma_mask : 0); | ||
| 29 | __entry->dev_addr = dev_addr; | ||
| 30 | __entry->size = size; | ||
| 31 | __entry->swiotlb_force = swiotlb_force; | ||
| 32 | ), | ||
| 33 | |||
| 34 | TP_printk("dev_name: %s dma_mask=%llx dev_addr=%llx " | ||
| 35 | "size=%zu %s", | ||
| 36 | __get_str(dev_name), | ||
| 37 | __entry->dma_mask, | ||
| 38 | (unsigned long long)__entry->dev_addr, | ||
| 39 | __entry->size, | ||
| 40 | __entry->swiotlb_force ? "swiotlb_force" : "" ) | ||
| 41 | ); | ||
| 42 | |||
| 43 | #endif /* _TRACE_SWIOTLB_H */ | ||
| 44 | |||
| 45 | /* This part must be outside protection */ | ||
| 46 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/target.h b/include/trace/events/target.h index aef8fc354025..da9cc0f05c93 100644 --- a/include/trace/events/target.h +++ b/include/trace/events/target.h | |||
| @@ -144,7 +144,7 @@ TRACE_EVENT(target_sequencer_start, | |||
| 144 | ), | 144 | ), |
| 145 | 145 | ||
| 146 | TP_fast_assign( | 146 | TP_fast_assign( |
| 147 | __entry->unpacked_lun = cmd->se_lun->unpacked_lun; | 147 | __entry->unpacked_lun = cmd->orig_fe_lun; |
| 148 | __entry->opcode = cmd->t_task_cdb[0]; | 148 | __entry->opcode = cmd->t_task_cdb[0]; |
| 149 | __entry->data_length = cmd->data_length; | 149 | __entry->data_length = cmd->data_length; |
| 150 | __entry->task_attribute = cmd->sam_task_attr; | 150 | __entry->task_attribute = cmd->sam_task_attr; |
| @@ -182,7 +182,7 @@ TRACE_EVENT(target_cmd_complete, | |||
| 182 | ), | 182 | ), |
| 183 | 183 | ||
| 184 | TP_fast_assign( | 184 | TP_fast_assign( |
| 185 | __entry->unpacked_lun = cmd->se_lun->unpacked_lun; | 185 | __entry->unpacked_lun = cmd->orig_fe_lun; |
| 186 | __entry->opcode = cmd->t_task_cdb[0]; | 186 | __entry->opcode = cmd->t_task_cdb[0]; |
| 187 | __entry->data_length = cmd->data_length; | 187 | __entry->data_length = cmd->data_length; |
| 188 | __entry->task_attribute = cmd->sam_task_attr; | 188 | __entry->task_attribute = cmd->sam_task_attr; |
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index 464ea82e10db..c7bbbe794e65 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h | |||
| @@ -287,11 +287,11 @@ TRACE_EVENT(writeback_queue_io, | |||
| 287 | __field(int, reason) | 287 | __field(int, reason) |
| 288 | ), | 288 | ), |
| 289 | TP_fast_assign( | 289 | TP_fast_assign( |
| 290 | unsigned long *older_than_this = work->older_than_this; | 290 | unsigned long older_than_this = work->older_than_this; |
| 291 | strncpy(__entry->name, dev_name(wb->bdi->dev), 32); | 291 | strncpy(__entry->name, dev_name(wb->bdi->dev), 32); |
| 292 | __entry->older = older_than_this ? *older_than_this : 0; | 292 | __entry->older = older_than_this; |
| 293 | __entry->age = older_than_this ? | 293 | __entry->age = older_than_this ? |
| 294 | (jiffies - *older_than_this) * 1000 / HZ : -1; | 294 | (jiffies - older_than_this) * 1000 / HZ : -1; |
| 295 | __entry->moved = moved; | 295 | __entry->moved = moved; |
| 296 | __entry->reason = work->reason; | 296 | __entry->reason = work->reason; |
| 297 | ), | 297 | ), |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 5c7ab17cbb02..52594b20179e 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
| @@ -437,9 +437,8 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
| 437 | * { <assign>; } <-- Here we assign the entries by the __field and | 437 | * { <assign>; } <-- Here we assign the entries by the __field and |
| 438 | * __array macros. | 438 | * __array macros. |
| 439 | * | 439 | * |
| 440 | * if (!filter_current_check_discard(buffer, event_call, entry, event)) | 440 | * if (!filter_check_discard(ftrace_file, entry, buffer, event)) |
| 441 | * trace_nowake_buffer_unlock_commit(buffer, | 441 | * trace_buffer_unlock_commit(buffer, event, irq_flags, pc); |
| 442 | * event, irq_flags, pc); | ||
| 443 | * } | 442 | * } |
| 444 | * | 443 | * |
| 445 | * static struct trace_event ftrace_event_type_<call> = { | 444 | * static struct trace_event ftrace_event_type_<call> = { |
| @@ -553,7 +552,7 @@ ftrace_raw_event_##call(void *__data, proto) \ | |||
| 553 | \ | 552 | \ |
| 554 | { assign; } \ | 553 | { assign; } \ |
| 555 | \ | 554 | \ |
| 556 | if (!filter_current_check_discard(buffer, event_call, entry, event)) \ | 555 | if (!filter_check_discard(ftrace_file, entry, buffer, event)) \ |
| 557 | trace_buffer_unlock_commit(buffer, event, irq_flags, pc); \ | 556 | trace_buffer_unlock_commit(buffer, event, irq_flags, pc); \ |
| 558 | } | 557 | } |
| 559 | /* | 558 | /* |
