diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/btrfs.h | 61 | ||||
-rw-r--r-- | include/trace/events/context_tracking.h | 58 | ||||
-rw-r--r-- | include/trace/events/ext4.h | 29 | ||||
-rw-r--r-- | include/trace/events/kmem.h | 10 | ||||
-rw-r--r-- | include/trace/events/power.h | 37 | ||||
-rw-r--r-- | include/trace/events/rcu.h | 82 | ||||
-rw-r--r-- | include/trace/events/sched.h | 22 | ||||
-rw-r--r-- | include/trace/events/sunrpc.h | 181 | ||||
-rw-r--r-- | include/trace/events/vmscan.h | 4 | ||||
-rw-r--r-- | include/trace/ftrace.h | 33 |
10 files changed, 408 insertions, 109 deletions
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index 2902657ba766..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) \ |
@@ -439,7 +440,7 @@ TRACE_EVENT(btrfs_sync_fs, | |||
439 | { BTRFS_UPDATE_DELAYED_HEAD, "UPDATE_DELAYED_HEAD" }) | 440 | { BTRFS_UPDATE_DELAYED_HEAD, "UPDATE_DELAYED_HEAD" }) |
440 | 441 | ||
441 | 442 | ||
442 | TRACE_EVENT(btrfs_delayed_tree_ref, | 443 | DECLARE_EVENT_CLASS(btrfs_delayed_tree_ref, |
443 | 444 | ||
444 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | 445 | TP_PROTO(struct btrfs_delayed_ref_node *ref, |
445 | struct btrfs_delayed_tree_ref *full_ref, | 446 | struct btrfs_delayed_tree_ref *full_ref, |
@@ -481,7 +482,25 @@ TRACE_EVENT(btrfs_delayed_tree_ref, | |||
481 | (unsigned long long)__entry->seq) | 482 | (unsigned long long)__entry->seq) |
482 | ); | 483 | ); |
483 | 484 | ||
484 | TRACE_EVENT(btrfs_delayed_data_ref, | 485 | DEFINE_EVENT(btrfs_delayed_tree_ref, add_delayed_tree_ref, |
486 | |||
487 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
488 | struct btrfs_delayed_tree_ref *full_ref, | ||
489 | int action), | ||
490 | |||
491 | TP_ARGS(ref, full_ref, action) | ||
492 | ); | ||
493 | |||
494 | DEFINE_EVENT(btrfs_delayed_tree_ref, run_delayed_tree_ref, | ||
495 | |||
496 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
497 | struct btrfs_delayed_tree_ref *full_ref, | ||
498 | int action), | ||
499 | |||
500 | TP_ARGS(ref, full_ref, action) | ||
501 | ); | ||
502 | |||
503 | DECLARE_EVENT_CLASS(btrfs_delayed_data_ref, | ||
485 | 504 | ||
486 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | 505 | TP_PROTO(struct btrfs_delayed_ref_node *ref, |
487 | struct btrfs_delayed_data_ref *full_ref, | 506 | struct btrfs_delayed_data_ref *full_ref, |
@@ -527,7 +546,25 @@ TRACE_EVENT(btrfs_delayed_data_ref, | |||
527 | (unsigned long long)__entry->seq) | 546 | (unsigned long long)__entry->seq) |
528 | ); | 547 | ); |
529 | 548 | ||
530 | TRACE_EVENT(btrfs_delayed_ref_head, | 549 | DEFINE_EVENT(btrfs_delayed_data_ref, add_delayed_data_ref, |
550 | |||
551 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
552 | struct btrfs_delayed_data_ref *full_ref, | ||
553 | int action), | ||
554 | |||
555 | TP_ARGS(ref, full_ref, action) | ||
556 | ); | ||
557 | |||
558 | DEFINE_EVENT(btrfs_delayed_data_ref, run_delayed_data_ref, | ||
559 | |||
560 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
561 | struct btrfs_delayed_data_ref *full_ref, | ||
562 | int action), | ||
563 | |||
564 | TP_ARGS(ref, full_ref, action) | ||
565 | ); | ||
566 | |||
567 | DECLARE_EVENT_CLASS(btrfs_delayed_ref_head, | ||
531 | 568 | ||
532 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | 569 | TP_PROTO(struct btrfs_delayed_ref_node *ref, |
533 | struct btrfs_delayed_ref_head *head_ref, | 570 | struct btrfs_delayed_ref_head *head_ref, |
@@ -556,6 +593,24 @@ TRACE_EVENT(btrfs_delayed_ref_head, | |||
556 | __entry->is_data) | 593 | __entry->is_data) |
557 | ); | 594 | ); |
558 | 595 | ||
596 | DEFINE_EVENT(btrfs_delayed_ref_head, add_delayed_ref_head, | ||
597 | |||
598 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
599 | struct btrfs_delayed_ref_head *head_ref, | ||
600 | int action), | ||
601 | |||
602 | TP_ARGS(ref, head_ref, action) | ||
603 | ); | ||
604 | |||
605 | DEFINE_EVENT(btrfs_delayed_ref_head, run_delayed_ref_head, | ||
606 | |||
607 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
608 | struct btrfs_delayed_ref_head *head_ref, | ||
609 | int action), | ||
610 | |||
611 | TP_ARGS(ref, head_ref, action) | ||
612 | ); | ||
613 | |||
559 | #define show_chunk_type(type) \ | 614 | #define show_chunk_type(type) \ |
560 | __print_flags(type, "|", \ | 615 | __print_flags(type, "|", \ |
561 | { BTRFS_BLOCK_GROUP_DATA, "DATA" }, \ | 616 | { BTRFS_BLOCK_GROUP_DATA, "DATA" }, \ |
diff --git a/include/trace/events/context_tracking.h b/include/trace/events/context_tracking.h new file mode 100644 index 000000000000..ce8007cf29cf --- /dev/null +++ b/include/trace/events/context_tracking.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM context_tracking | ||
3 | |||
4 | #if !defined(_TRACE_CONTEXT_TRACKING_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_CONTEXT_TRACKING_H | ||
6 | |||
7 | #include <linux/tracepoint.h> | ||
8 | |||
9 | DECLARE_EVENT_CLASS(context_tracking_user, | ||
10 | |||
11 | TP_PROTO(int dummy), | ||
12 | |||
13 | TP_ARGS(dummy), | ||
14 | |||
15 | TP_STRUCT__entry( | ||
16 | __field( int, dummy ) | ||
17 | ), | ||
18 | |||
19 | TP_fast_assign( | ||
20 | __entry->dummy = dummy; | ||
21 | ), | ||
22 | |||
23 | TP_printk("%s", "") | ||
24 | ); | ||
25 | |||
26 | /** | ||
27 | * user_enter - called when the kernel resumes to userspace | ||
28 | * @dummy: dummy arg to make trace event macro happy | ||
29 | * | ||
30 | * This event occurs when the kernel resumes to userspace after | ||
31 | * an exception or a syscall. | ||
32 | */ | ||
33 | DEFINE_EVENT(context_tracking_user, user_enter, | ||
34 | |||
35 | TP_PROTO(int dummy), | ||
36 | |||
37 | TP_ARGS(dummy) | ||
38 | ); | ||
39 | |||
40 | /** | ||
41 | * user_exit - called when userspace enters the kernel | ||
42 | * @dummy: dummy arg to make trace event macro happy | ||
43 | * | ||
44 | * This event occurs when userspace enters the kernel through | ||
45 | * an exception or a syscall. | ||
46 | */ | ||
47 | DEFINE_EVENT(context_tracking_user, user_exit, | ||
48 | |||
49 | TP_PROTO(int dummy), | ||
50 | |||
51 | TP_ARGS(dummy) | ||
52 | ); | ||
53 | |||
54 | |||
55 | #endif /* _TRACE_CONTEXT_TRACKING_H */ | ||
56 | |||
57 | /* This part must be outside protection */ | ||
58 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 2068db241f22..197d3125df2a 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -14,7 +14,6 @@ struct ext4_prealloc_space; | |||
14 | struct ext4_inode_info; | 14 | struct ext4_inode_info; |
15 | struct mpage_da_data; | 15 | struct mpage_da_data; |
16 | struct ext4_map_blocks; | 16 | struct ext4_map_blocks; |
17 | struct ext4_extent; | ||
18 | struct extent_status; | 17 | struct extent_status; |
19 | 18 | ||
20 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) | 19 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) |
@@ -64,10 +63,10 @@ struct extent_status; | |||
64 | { EXT4_FREE_BLOCKS_NOFREE_LAST_CLUSTER, "LAST_CLUSTER" }) | 63 | { EXT4_FREE_BLOCKS_NOFREE_LAST_CLUSTER, "LAST_CLUSTER" }) |
65 | 64 | ||
66 | #define show_extent_status(status) __print_flags(status, "", \ | 65 | #define show_extent_status(status) __print_flags(status, "", \ |
67 | { (1 << 3), "W" }, \ | 66 | { EXTENT_STATUS_WRITTEN, "W" }, \ |
68 | { (1 << 2), "U" }, \ | 67 | { EXTENT_STATUS_UNWRITTEN, "U" }, \ |
69 | { (1 << 1), "D" }, \ | 68 | { EXTENT_STATUS_DELAYED, "D" }, \ |
70 | { (1 << 0), "H" }) | 69 | { EXTENT_STATUS_HOLE, "H" }) |
71 | 70 | ||
72 | 71 | ||
73 | TRACE_EVENT(ext4_free_inode, | 72 | TRACE_EVENT(ext4_free_inode, |
@@ -2192,7 +2191,7 @@ TRACE_EVENT(ext4_ext_remove_space_done, | |||
2192 | (unsigned short) __entry->eh_entries) | 2191 | (unsigned short) __entry->eh_entries) |
2193 | ); | 2192 | ); |
2194 | 2193 | ||
2195 | TRACE_EVENT(ext4_es_insert_extent, | 2194 | DECLARE_EVENT_CLASS(ext4__es_extent, |
2196 | TP_PROTO(struct inode *inode, struct extent_status *es), | 2195 | TP_PROTO(struct inode *inode, struct extent_status *es), |
2197 | 2196 | ||
2198 | TP_ARGS(inode, es), | 2197 | TP_ARGS(inode, es), |
@@ -2212,7 +2211,7 @@ TRACE_EVENT(ext4_es_insert_extent, | |||
2212 | __entry->lblk = es->es_lblk; | 2211 | __entry->lblk = es->es_lblk; |
2213 | __entry->len = es->es_len; | 2212 | __entry->len = es->es_len; |
2214 | __entry->pblk = ext4_es_pblock(es); | 2213 | __entry->pblk = ext4_es_pblock(es); |
2215 | __entry->status = ext4_es_status(es) >> 60; | 2214 | __entry->status = ext4_es_status(es); |
2216 | ), | 2215 | ), |
2217 | 2216 | ||
2218 | TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s", | 2217 | TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s", |
@@ -2222,6 +2221,18 @@ TRACE_EVENT(ext4_es_insert_extent, | |||
2222 | __entry->pblk, show_extent_status(__entry->status)) | 2221 | __entry->pblk, show_extent_status(__entry->status)) |
2223 | ); | 2222 | ); |
2224 | 2223 | ||
2224 | DEFINE_EVENT(ext4__es_extent, ext4_es_insert_extent, | ||
2225 | TP_PROTO(struct inode *inode, struct extent_status *es), | ||
2226 | |||
2227 | TP_ARGS(inode, es) | ||
2228 | ); | ||
2229 | |||
2230 | DEFINE_EVENT(ext4__es_extent, ext4_es_cache_extent, | ||
2231 | TP_PROTO(struct inode *inode, struct extent_status *es), | ||
2232 | |||
2233 | TP_ARGS(inode, es) | ||
2234 | ); | ||
2235 | |||
2225 | TRACE_EVENT(ext4_es_remove_extent, | 2236 | TRACE_EVENT(ext4_es_remove_extent, |
2226 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len), | 2237 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len), |
2227 | 2238 | ||
@@ -2289,7 +2300,7 @@ TRACE_EVENT(ext4_es_find_delayed_extent_range_exit, | |||
2289 | __entry->lblk = es->es_lblk; | 2300 | __entry->lblk = es->es_lblk; |
2290 | __entry->len = es->es_len; | 2301 | __entry->len = es->es_len; |
2291 | __entry->pblk = ext4_es_pblock(es); | 2302 | __entry->pblk = ext4_es_pblock(es); |
2292 | __entry->status = ext4_es_status(es) >> 60; | 2303 | __entry->status = ext4_es_status(es); |
2293 | ), | 2304 | ), |
2294 | 2305 | ||
2295 | TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s", | 2306 | TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s", |
@@ -2343,7 +2354,7 @@ TRACE_EVENT(ext4_es_lookup_extent_exit, | |||
2343 | __entry->lblk = es->es_lblk; | 2354 | __entry->lblk = es->es_lblk; |
2344 | __entry->len = es->es_len; | 2355 | __entry->len = es->es_len; |
2345 | __entry->pblk = ext4_es_pblock(es); | 2356 | __entry->pblk = ext4_es_pblock(es); |
2346 | __entry->status = ext4_es_status(es) >> 60; | 2357 | __entry->status = ext4_es_status(es); |
2347 | __entry->found = found; | 2358 | __entry->found = found; |
2348 | ), | 2359 | ), |
2349 | 2360 | ||
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index 6bc943ecb841..d0c613476620 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h | |||
@@ -268,11 +268,13 @@ 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, |
272 | int change_ownership), | ||
272 | 273 | ||
273 | TP_ARGS(page, | 274 | TP_ARGS(page, |
274 | alloc_order, fallback_order, | 275 | alloc_order, fallback_order, |
275 | alloc_migratetype, fallback_migratetype), | 276 | alloc_migratetype, fallback_migratetype, |
277 | change_ownership), | ||
276 | 278 | ||
277 | TP_STRUCT__entry( | 279 | TP_STRUCT__entry( |
278 | __field( struct page *, page ) | 280 | __field( struct page *, page ) |
@@ -280,6 +282,7 @@ TRACE_EVENT(mm_page_alloc_extfrag, | |||
280 | __field( int, fallback_order ) | 282 | __field( int, fallback_order ) |
281 | __field( int, alloc_migratetype ) | 283 | __field( int, alloc_migratetype ) |
282 | __field( int, fallback_migratetype ) | 284 | __field( int, fallback_migratetype ) |
285 | __field( int, change_ownership ) | ||
283 | ), | 286 | ), |
284 | 287 | ||
285 | TP_fast_assign( | 288 | TP_fast_assign( |
@@ -288,6 +291,7 @@ TRACE_EVENT(mm_page_alloc_extfrag, | |||
288 | __entry->fallback_order = fallback_order; | 291 | __entry->fallback_order = fallback_order; |
289 | __entry->alloc_migratetype = alloc_migratetype; | 292 | __entry->alloc_migratetype = alloc_migratetype; |
290 | __entry->fallback_migratetype = fallback_migratetype; | 293 | __entry->fallback_migratetype = fallback_migratetype; |
294 | __entry->change_ownership = change_ownership; | ||
291 | ), | 295 | ), |
292 | 296 | ||
293 | 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", | 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", |
@@ -299,7 +303,7 @@ TRACE_EVENT(mm_page_alloc_extfrag, | |||
299 | __entry->alloc_migratetype, | 303 | __entry->alloc_migratetype, |
300 | __entry->fallback_migratetype, | 304 | __entry->fallback_migratetype, |
301 | __entry->fallback_order < pageblock_order, | 305 | __entry->fallback_order < pageblock_order, |
302 | __entry->alloc_migratetype == __entry->fallback_migratetype) | 306 | __entry->change_ownership) |
303 | ); | 307 | ); |
304 | 308 | ||
305 | #endif /* _TRACE_KMEM_H */ | 309 | #endif /* _TRACE_KMEM_H */ |
diff --git a/include/trace/events/power.h b/include/trace/events/power.h index 8e42410bd159..cda100d6762d 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h | |||
@@ -66,6 +66,43 @@ TRACE_EVENT(machine_suspend, | |||
66 | TP_printk("state=%lu", (unsigned long)__entry->state) | 66 | TP_printk("state=%lu", (unsigned long)__entry->state) |
67 | ); | 67 | ); |
68 | 68 | ||
69 | TRACE_EVENT(device_pm_report_time, | ||
70 | |||
71 | TP_PROTO(struct device *dev, const char *pm_ops, s64 ops_time, | ||
72 | char *pm_event_str, int error), | ||
73 | |||
74 | TP_ARGS(dev, pm_ops, ops_time, pm_event_str, error), | ||
75 | |||
76 | TP_STRUCT__entry( | ||
77 | __string(device, dev_name(dev)) | ||
78 | __string(driver, dev_driver_string(dev)) | ||
79 | __string(parent, dev->parent ? dev_name(dev->parent) : "none") | ||
80 | __string(pm_ops, pm_ops ? pm_ops : "none ") | ||
81 | __string(pm_event_str, pm_event_str) | ||
82 | __field(s64, ops_time) | ||
83 | __field(int, error) | ||
84 | ), | ||
85 | |||
86 | TP_fast_assign( | ||
87 | const char *tmp = dev->parent ? dev_name(dev->parent) : "none"; | ||
88 | const char *tmp_i = pm_ops ? pm_ops : "none "; | ||
89 | |||
90 | __assign_str(device, dev_name(dev)); | ||
91 | __assign_str(driver, dev_driver_string(dev)); | ||
92 | __assign_str(parent, tmp); | ||
93 | __assign_str(pm_ops, tmp_i); | ||
94 | __assign_str(pm_event_str, pm_event_str); | ||
95 | __entry->ops_time = ops_time; | ||
96 | __entry->error = error; | ||
97 | ), | ||
98 | |||
99 | /* ops_str has an extra space at the end */ | ||
100 | TP_printk("%s %s parent=%s state=%s ops=%snsecs=%lld err=%d", | ||
101 | __get_str(driver), __get_str(device), __get_str(parent), | ||
102 | __get_str(pm_event_str), __get_str(pm_ops), | ||
103 | __entry->ops_time, __entry->error) | ||
104 | ); | ||
105 | |||
69 | DECLARE_EVENT_CLASS(wakeup_source, | 106 | DECLARE_EVENT_CLASS(wakeup_source, |
70 | 107 | ||
71 | TP_PROTO(const char *name, unsigned int state), | 108 | TP_PROTO(const char *name, unsigned int state), |
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index 59ebcc89f148..ee2376cfaab3 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h | |||
@@ -19,12 +19,12 @@ | |||
19 | */ | 19 | */ |
20 | TRACE_EVENT(rcu_utilization, | 20 | TRACE_EVENT(rcu_utilization, |
21 | 21 | ||
22 | TP_PROTO(char *s), | 22 | TP_PROTO(const char *s), |
23 | 23 | ||
24 | TP_ARGS(s), | 24 | TP_ARGS(s), |
25 | 25 | ||
26 | TP_STRUCT__entry( | 26 | TP_STRUCT__entry( |
27 | __field(char *, s) | 27 | __field(const char *, s) |
28 | ), | 28 | ), |
29 | 29 | ||
30 | TP_fast_assign( | 30 | TP_fast_assign( |
@@ -51,14 +51,14 @@ TRACE_EVENT(rcu_utilization, | |||
51 | */ | 51 | */ |
52 | TRACE_EVENT(rcu_grace_period, | 52 | TRACE_EVENT(rcu_grace_period, |
53 | 53 | ||
54 | TP_PROTO(char *rcuname, unsigned long gpnum, char *gpevent), | 54 | TP_PROTO(const char *rcuname, unsigned long gpnum, const char *gpevent), |
55 | 55 | ||
56 | TP_ARGS(rcuname, gpnum, gpevent), | 56 | TP_ARGS(rcuname, gpnum, gpevent), |
57 | 57 | ||
58 | TP_STRUCT__entry( | 58 | TP_STRUCT__entry( |
59 | __field(char *, rcuname) | 59 | __field(const char *, rcuname) |
60 | __field(unsigned long, gpnum) | 60 | __field(unsigned long, gpnum) |
61 | __field(char *, gpevent) | 61 | __field(const char *, gpevent) |
62 | ), | 62 | ), |
63 | 63 | ||
64 | TP_fast_assign( | 64 | TP_fast_assign( |
@@ -89,21 +89,21 @@ TRACE_EVENT(rcu_grace_period, | |||
89 | */ | 89 | */ |
90 | TRACE_EVENT(rcu_future_grace_period, | 90 | TRACE_EVENT(rcu_future_grace_period, |
91 | 91 | ||
92 | TP_PROTO(char *rcuname, unsigned long gpnum, unsigned long completed, | 92 | TP_PROTO(const char *rcuname, unsigned long gpnum, unsigned long completed, |
93 | unsigned long c, u8 level, int grplo, int grphi, | 93 | unsigned long c, u8 level, int grplo, int grphi, |
94 | char *gpevent), | 94 | const char *gpevent), |
95 | 95 | ||
96 | TP_ARGS(rcuname, gpnum, completed, c, level, grplo, grphi, gpevent), | 96 | TP_ARGS(rcuname, gpnum, completed, c, level, grplo, grphi, gpevent), |
97 | 97 | ||
98 | TP_STRUCT__entry( | 98 | TP_STRUCT__entry( |
99 | __field(char *, rcuname) | 99 | __field(const char *, rcuname) |
100 | __field(unsigned long, gpnum) | 100 | __field(unsigned long, gpnum) |
101 | __field(unsigned long, completed) | 101 | __field(unsigned long, completed) |
102 | __field(unsigned long, c) | 102 | __field(unsigned long, c) |
103 | __field(u8, level) | 103 | __field(u8, level) |
104 | __field(int, grplo) | 104 | __field(int, grplo) |
105 | __field(int, grphi) | 105 | __field(int, grphi) |
106 | __field(char *, gpevent) | 106 | __field(const char *, gpevent) |
107 | ), | 107 | ), |
108 | 108 | ||
109 | TP_fast_assign( | 109 | TP_fast_assign( |
@@ -132,13 +132,13 @@ TRACE_EVENT(rcu_future_grace_period, | |||
132 | */ | 132 | */ |
133 | TRACE_EVENT(rcu_grace_period_init, | 133 | TRACE_EVENT(rcu_grace_period_init, |
134 | 134 | ||
135 | TP_PROTO(char *rcuname, unsigned long gpnum, u8 level, | 135 | TP_PROTO(const char *rcuname, unsigned long gpnum, u8 level, |
136 | int grplo, int grphi, unsigned long qsmask), | 136 | int grplo, int grphi, unsigned long qsmask), |
137 | 137 | ||
138 | TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask), | 138 | TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask), |
139 | 139 | ||
140 | TP_STRUCT__entry( | 140 | TP_STRUCT__entry( |
141 | __field(char *, rcuname) | 141 | __field(const char *, rcuname) |
142 | __field(unsigned long, gpnum) | 142 | __field(unsigned long, gpnum) |
143 | __field(u8, level) | 143 | __field(u8, level) |
144 | __field(int, grplo) | 144 | __field(int, grplo) |
@@ -168,12 +168,12 @@ TRACE_EVENT(rcu_grace_period_init, | |||
168 | */ | 168 | */ |
169 | TRACE_EVENT(rcu_preempt_task, | 169 | TRACE_EVENT(rcu_preempt_task, |
170 | 170 | ||
171 | TP_PROTO(char *rcuname, int pid, unsigned long gpnum), | 171 | TP_PROTO(const char *rcuname, int pid, unsigned long gpnum), |
172 | 172 | ||
173 | TP_ARGS(rcuname, pid, gpnum), | 173 | TP_ARGS(rcuname, pid, gpnum), |
174 | 174 | ||
175 | TP_STRUCT__entry( | 175 | TP_STRUCT__entry( |
176 | __field(char *, rcuname) | 176 | __field(const char *, rcuname) |
177 | __field(unsigned long, gpnum) | 177 | __field(unsigned long, gpnum) |
178 | __field(int, pid) | 178 | __field(int, pid) |
179 | ), | 179 | ), |
@@ -195,12 +195,12 @@ TRACE_EVENT(rcu_preempt_task, | |||
195 | */ | 195 | */ |
196 | TRACE_EVENT(rcu_unlock_preempted_task, | 196 | TRACE_EVENT(rcu_unlock_preempted_task, |
197 | 197 | ||
198 | TP_PROTO(char *rcuname, unsigned long gpnum, int pid), | 198 | TP_PROTO(const char *rcuname, unsigned long gpnum, int pid), |
199 | 199 | ||
200 | TP_ARGS(rcuname, gpnum, pid), | 200 | TP_ARGS(rcuname, gpnum, pid), |
201 | 201 | ||
202 | TP_STRUCT__entry( | 202 | TP_STRUCT__entry( |
203 | __field(char *, rcuname) | 203 | __field(const char *, rcuname) |
204 | __field(unsigned long, gpnum) | 204 | __field(unsigned long, gpnum) |
205 | __field(int, pid) | 205 | __field(int, pid) |
206 | ), | 206 | ), |
@@ -224,14 +224,14 @@ TRACE_EVENT(rcu_unlock_preempted_task, | |||
224 | */ | 224 | */ |
225 | TRACE_EVENT(rcu_quiescent_state_report, | 225 | TRACE_EVENT(rcu_quiescent_state_report, |
226 | 226 | ||
227 | TP_PROTO(char *rcuname, unsigned long gpnum, | 227 | TP_PROTO(const char *rcuname, unsigned long gpnum, |
228 | unsigned long mask, unsigned long qsmask, | 228 | unsigned long mask, unsigned long qsmask, |
229 | u8 level, int grplo, int grphi, int gp_tasks), | 229 | u8 level, int grplo, int grphi, int gp_tasks), |
230 | 230 | ||
231 | TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks), | 231 | TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks), |
232 | 232 | ||
233 | TP_STRUCT__entry( | 233 | TP_STRUCT__entry( |
234 | __field(char *, rcuname) | 234 | __field(const char *, rcuname) |
235 | __field(unsigned long, gpnum) | 235 | __field(unsigned long, gpnum) |
236 | __field(unsigned long, mask) | 236 | __field(unsigned long, mask) |
237 | __field(unsigned long, qsmask) | 237 | __field(unsigned long, qsmask) |
@@ -268,15 +268,15 @@ TRACE_EVENT(rcu_quiescent_state_report, | |||
268 | */ | 268 | */ |
269 | TRACE_EVENT(rcu_fqs, | 269 | TRACE_EVENT(rcu_fqs, |
270 | 270 | ||
271 | TP_PROTO(char *rcuname, unsigned long gpnum, int cpu, char *qsevent), | 271 | TP_PROTO(const char *rcuname, unsigned long gpnum, int cpu, const char *qsevent), |
272 | 272 | ||
273 | TP_ARGS(rcuname, gpnum, cpu, qsevent), | 273 | TP_ARGS(rcuname, gpnum, cpu, qsevent), |
274 | 274 | ||
275 | TP_STRUCT__entry( | 275 | TP_STRUCT__entry( |
276 | __field(char *, rcuname) | 276 | __field(const char *, rcuname) |
277 | __field(unsigned long, gpnum) | 277 | __field(unsigned long, gpnum) |
278 | __field(int, cpu) | 278 | __field(int, cpu) |
279 | __field(char *, qsevent) | 279 | __field(const char *, qsevent) |
280 | ), | 280 | ), |
281 | 281 | ||
282 | TP_fast_assign( | 282 | TP_fast_assign( |
@@ -308,12 +308,12 @@ TRACE_EVENT(rcu_fqs, | |||
308 | */ | 308 | */ |
309 | TRACE_EVENT(rcu_dyntick, | 309 | TRACE_EVENT(rcu_dyntick, |
310 | 310 | ||
311 | TP_PROTO(char *polarity, long long oldnesting, long long newnesting), | 311 | TP_PROTO(const char *polarity, long long oldnesting, long long newnesting), |
312 | 312 | ||
313 | TP_ARGS(polarity, oldnesting, newnesting), | 313 | TP_ARGS(polarity, oldnesting, newnesting), |
314 | 314 | ||
315 | TP_STRUCT__entry( | 315 | TP_STRUCT__entry( |
316 | __field(char *, polarity) | 316 | __field(const char *, polarity) |
317 | __field(long long, oldnesting) | 317 | __field(long long, oldnesting) |
318 | __field(long long, newnesting) | 318 | __field(long long, newnesting) |
319 | ), | 319 | ), |
@@ -352,12 +352,12 @@ TRACE_EVENT(rcu_dyntick, | |||
352 | */ | 352 | */ |
353 | TRACE_EVENT(rcu_prep_idle, | 353 | TRACE_EVENT(rcu_prep_idle, |
354 | 354 | ||
355 | TP_PROTO(char *reason), | 355 | TP_PROTO(const char *reason), |
356 | 356 | ||
357 | TP_ARGS(reason), | 357 | TP_ARGS(reason), |
358 | 358 | ||
359 | TP_STRUCT__entry( | 359 | TP_STRUCT__entry( |
360 | __field(char *, reason) | 360 | __field(const char *, reason) |
361 | ), | 361 | ), |
362 | 362 | ||
363 | TP_fast_assign( | 363 | TP_fast_assign( |
@@ -376,13 +376,13 @@ TRACE_EVENT(rcu_prep_idle, | |||
376 | */ | 376 | */ |
377 | TRACE_EVENT(rcu_callback, | 377 | TRACE_EVENT(rcu_callback, |
378 | 378 | ||
379 | TP_PROTO(char *rcuname, struct rcu_head *rhp, long qlen_lazy, | 379 | TP_PROTO(const char *rcuname, struct rcu_head *rhp, long qlen_lazy, |
380 | long qlen), | 380 | long qlen), |
381 | 381 | ||
382 | TP_ARGS(rcuname, rhp, qlen_lazy, qlen), | 382 | TP_ARGS(rcuname, rhp, qlen_lazy, qlen), |
383 | 383 | ||
384 | TP_STRUCT__entry( | 384 | TP_STRUCT__entry( |
385 | __field(char *, rcuname) | 385 | __field(const char *, rcuname) |
386 | __field(void *, rhp) | 386 | __field(void *, rhp) |
387 | __field(void *, func) | 387 | __field(void *, func) |
388 | __field(long, qlen_lazy) | 388 | __field(long, qlen_lazy) |
@@ -412,13 +412,13 @@ TRACE_EVENT(rcu_callback, | |||
412 | */ | 412 | */ |
413 | TRACE_EVENT(rcu_kfree_callback, | 413 | TRACE_EVENT(rcu_kfree_callback, |
414 | 414 | ||
415 | TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset, | 415 | TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset, |
416 | long qlen_lazy, long qlen), | 416 | long qlen_lazy, long qlen), |
417 | 417 | ||
418 | TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen), | 418 | TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen), |
419 | 419 | ||
420 | TP_STRUCT__entry( | 420 | TP_STRUCT__entry( |
421 | __field(char *, rcuname) | 421 | __field(const char *, rcuname) |
422 | __field(void *, rhp) | 422 | __field(void *, rhp) |
423 | __field(unsigned long, offset) | 423 | __field(unsigned long, offset) |
424 | __field(long, qlen_lazy) | 424 | __field(long, qlen_lazy) |
@@ -447,12 +447,12 @@ TRACE_EVENT(rcu_kfree_callback, | |||
447 | */ | 447 | */ |
448 | TRACE_EVENT(rcu_batch_start, | 448 | TRACE_EVENT(rcu_batch_start, |
449 | 449 | ||
450 | TP_PROTO(char *rcuname, long qlen_lazy, long qlen, long blimit), | 450 | TP_PROTO(const char *rcuname, long qlen_lazy, long qlen, long blimit), |
451 | 451 | ||
452 | TP_ARGS(rcuname, qlen_lazy, qlen, blimit), | 452 | TP_ARGS(rcuname, qlen_lazy, qlen, blimit), |
453 | 453 | ||
454 | TP_STRUCT__entry( | 454 | TP_STRUCT__entry( |
455 | __field(char *, rcuname) | 455 | __field(const char *, rcuname) |
456 | __field(long, qlen_lazy) | 456 | __field(long, qlen_lazy) |
457 | __field(long, qlen) | 457 | __field(long, qlen) |
458 | __field(long, blimit) | 458 | __field(long, blimit) |
@@ -477,12 +477,12 @@ TRACE_EVENT(rcu_batch_start, | |||
477 | */ | 477 | */ |
478 | TRACE_EVENT(rcu_invoke_callback, | 478 | TRACE_EVENT(rcu_invoke_callback, |
479 | 479 | ||
480 | TP_PROTO(char *rcuname, struct rcu_head *rhp), | 480 | TP_PROTO(const char *rcuname, struct rcu_head *rhp), |
481 | 481 | ||
482 | TP_ARGS(rcuname, rhp), | 482 | TP_ARGS(rcuname, rhp), |
483 | 483 | ||
484 | TP_STRUCT__entry( | 484 | TP_STRUCT__entry( |
485 | __field(char *, rcuname) | 485 | __field(const char *, rcuname) |
486 | __field(void *, rhp) | 486 | __field(void *, rhp) |
487 | __field(void *, func) | 487 | __field(void *, func) |
488 | ), | 488 | ), |
@@ -506,12 +506,12 @@ TRACE_EVENT(rcu_invoke_callback, | |||
506 | */ | 506 | */ |
507 | TRACE_EVENT(rcu_invoke_kfree_callback, | 507 | TRACE_EVENT(rcu_invoke_kfree_callback, |
508 | 508 | ||
509 | TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset), | 509 | TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset), |
510 | 510 | ||
511 | TP_ARGS(rcuname, rhp, offset), | 511 | TP_ARGS(rcuname, rhp, offset), |
512 | 512 | ||
513 | TP_STRUCT__entry( | 513 | TP_STRUCT__entry( |
514 | __field(char *, rcuname) | 514 | __field(const char *, rcuname) |
515 | __field(void *, rhp) | 515 | __field(void *, rhp) |
516 | __field(unsigned long, offset) | 516 | __field(unsigned long, offset) |
517 | ), | 517 | ), |
@@ -539,13 +539,13 @@ TRACE_EVENT(rcu_invoke_kfree_callback, | |||
539 | */ | 539 | */ |
540 | TRACE_EVENT(rcu_batch_end, | 540 | TRACE_EVENT(rcu_batch_end, |
541 | 541 | ||
542 | TP_PROTO(char *rcuname, int callbacks_invoked, | 542 | TP_PROTO(const char *rcuname, int callbacks_invoked, |
543 | bool cb, bool nr, bool iit, bool risk), | 543 | bool cb, bool nr, bool iit, bool risk), |
544 | 544 | ||
545 | TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), | 545 | TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), |
546 | 546 | ||
547 | TP_STRUCT__entry( | 547 | TP_STRUCT__entry( |
548 | __field(char *, rcuname) | 548 | __field(const char *, rcuname) |
549 | __field(int, callbacks_invoked) | 549 | __field(int, callbacks_invoked) |
550 | __field(bool, cb) | 550 | __field(bool, cb) |
551 | __field(bool, nr) | 551 | __field(bool, nr) |
@@ -577,13 +577,13 @@ TRACE_EVENT(rcu_batch_end, | |||
577 | */ | 577 | */ |
578 | TRACE_EVENT(rcu_torture_read, | 578 | TRACE_EVENT(rcu_torture_read, |
579 | 579 | ||
580 | TP_PROTO(char *rcutorturename, struct rcu_head *rhp, | 580 | TP_PROTO(const char *rcutorturename, struct rcu_head *rhp, |
581 | unsigned long secs, unsigned long c_old, unsigned long c), | 581 | unsigned long secs, unsigned long c_old, unsigned long c), |
582 | 582 | ||
583 | TP_ARGS(rcutorturename, rhp, secs, c_old, c), | 583 | TP_ARGS(rcutorturename, rhp, secs, c_old, c), |
584 | 584 | ||
585 | TP_STRUCT__entry( | 585 | TP_STRUCT__entry( |
586 | __field(char *, rcutorturename) | 586 | __field(const char *, rcutorturename) |
587 | __field(struct rcu_head *, rhp) | 587 | __field(struct rcu_head *, rhp) |
588 | __field(unsigned long, secs) | 588 | __field(unsigned long, secs) |
589 | __field(unsigned long, c_old) | 589 | __field(unsigned long, c_old) |
@@ -623,13 +623,13 @@ TRACE_EVENT(rcu_torture_read, | |||
623 | */ | 623 | */ |
624 | TRACE_EVENT(rcu_barrier, | 624 | TRACE_EVENT(rcu_barrier, |
625 | 625 | ||
626 | TP_PROTO(char *rcuname, char *s, int cpu, int cnt, unsigned long done), | 626 | TP_PROTO(const char *rcuname, const char *s, int cpu, int cnt, unsigned long done), |
627 | 627 | ||
628 | TP_ARGS(rcuname, s, cpu, cnt, done), | 628 | TP_ARGS(rcuname, s, cpu, cnt, done), |
629 | 629 | ||
630 | TP_STRUCT__entry( | 630 | TP_STRUCT__entry( |
631 | __field(char *, rcuname) | 631 | __field(const char *, rcuname) |
632 | __field(char *, s) | 632 | __field(const char *, s) |
633 | __field(int, cpu) | 633 | __field(int, cpu) |
634 | __field(int, cnt) | 634 | __field(int, cnt) |
635 | __field(unsigned long, done) | 635 | __field(unsigned long, done) |
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index e5586caff67a..2e7d9947a10d 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -57,7 +57,7 @@ DECLARE_EVENT_CLASS(sched_wakeup_template, | |||
57 | 57 | ||
58 | TP_PROTO(struct task_struct *p, int success), | 58 | TP_PROTO(struct task_struct *p, int success), |
59 | 59 | ||
60 | TP_ARGS(p, success), | 60 | TP_ARGS(__perf_task(p), success), |
61 | 61 | ||
62 | TP_STRUCT__entry( | 62 | TP_STRUCT__entry( |
63 | __array( char, comm, TASK_COMM_LEN ) | 63 | __array( char, comm, TASK_COMM_LEN ) |
@@ -73,9 +73,6 @@ DECLARE_EVENT_CLASS(sched_wakeup_template, | |||
73 | __entry->prio = p->prio; | 73 | __entry->prio = p->prio; |
74 | __entry->success = success; | 74 | __entry->success = success; |
75 | __entry->target_cpu = task_cpu(p); | 75 | __entry->target_cpu = task_cpu(p); |
76 | ) | ||
77 | TP_perf_assign( | ||
78 | __perf_task(p); | ||
79 | ), | 76 | ), |
80 | 77 | ||
81 | TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d", | 78 | TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d", |
@@ -313,7 +310,7 @@ DECLARE_EVENT_CLASS(sched_stat_template, | |||
313 | 310 | ||
314 | TP_PROTO(struct task_struct *tsk, u64 delay), | 311 | TP_PROTO(struct task_struct *tsk, u64 delay), |
315 | 312 | ||
316 | TP_ARGS(tsk, delay), | 313 | TP_ARGS(__perf_task(tsk), __perf_count(delay)), |
317 | 314 | ||
318 | TP_STRUCT__entry( | 315 | TP_STRUCT__entry( |
319 | __array( char, comm, TASK_COMM_LEN ) | 316 | __array( char, comm, TASK_COMM_LEN ) |
@@ -325,10 +322,6 @@ DECLARE_EVENT_CLASS(sched_stat_template, | |||
325 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); | 322 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); |
326 | __entry->pid = tsk->pid; | 323 | __entry->pid = tsk->pid; |
327 | __entry->delay = delay; | 324 | __entry->delay = delay; |
328 | ) | ||
329 | TP_perf_assign( | ||
330 | __perf_count(delay); | ||
331 | __perf_task(tsk); | ||
332 | ), | 325 | ), |
333 | 326 | ||
334 | TP_printk("comm=%s pid=%d delay=%Lu [ns]", | 327 | TP_printk("comm=%s pid=%d delay=%Lu [ns]", |
@@ -372,11 +365,11 @@ DEFINE_EVENT(sched_stat_template, sched_stat_blocked, | |||
372 | * Tracepoint for accounting runtime (time the task is executing | 365 | * Tracepoint for accounting runtime (time the task is executing |
373 | * on a CPU). | 366 | * on a CPU). |
374 | */ | 367 | */ |
375 | TRACE_EVENT(sched_stat_runtime, | 368 | DECLARE_EVENT_CLASS(sched_stat_runtime, |
376 | 369 | ||
377 | TP_PROTO(struct task_struct *tsk, u64 runtime, u64 vruntime), | 370 | TP_PROTO(struct task_struct *tsk, u64 runtime, u64 vruntime), |
378 | 371 | ||
379 | TP_ARGS(tsk, runtime, vruntime), | 372 | TP_ARGS(tsk, __perf_count(runtime), vruntime), |
380 | 373 | ||
381 | TP_STRUCT__entry( | 374 | TP_STRUCT__entry( |
382 | __array( char, comm, TASK_COMM_LEN ) | 375 | __array( char, comm, TASK_COMM_LEN ) |
@@ -390,9 +383,6 @@ TRACE_EVENT(sched_stat_runtime, | |||
390 | __entry->pid = tsk->pid; | 383 | __entry->pid = tsk->pid; |
391 | __entry->runtime = runtime; | 384 | __entry->runtime = runtime; |
392 | __entry->vruntime = vruntime; | 385 | __entry->vruntime = vruntime; |
393 | ) | ||
394 | TP_perf_assign( | ||
395 | __perf_count(runtime); | ||
396 | ), | 386 | ), |
397 | 387 | ||
398 | TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [ns]", | 388 | TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [ns]", |
@@ -401,6 +391,10 @@ TRACE_EVENT(sched_stat_runtime, | |||
401 | (unsigned long long)__entry->vruntime) | 391 | (unsigned long long)__entry->vruntime) |
402 | ); | 392 | ); |
403 | 393 | ||
394 | DEFINE_EVENT(sched_stat_runtime, sched_stat_runtime, | ||
395 | TP_PROTO(struct task_struct *tsk, u64 runtime, u64 vruntime), | ||
396 | TP_ARGS(tsk, runtime, vruntime)); | ||
397 | |||
404 | /* | 398 | /* |
405 | * Tracepoint for showing priority inheritance modifying a tasks | 399 | * Tracepoint for showing priority inheritance modifying a tasks |
406 | * priority. | 400 | * priority. |
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index 43be87d5dd58..d51d16c7afd8 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h | |||
@@ -6,6 +6,8 @@ | |||
6 | 6 | ||
7 | #include <linux/sunrpc/sched.h> | 7 | #include <linux/sunrpc/sched.h> |
8 | #include <linux/sunrpc/clnt.h> | 8 | #include <linux/sunrpc/clnt.h> |
9 | #include <net/tcp_states.h> | ||
10 | #include <linux/net.h> | ||
9 | #include <linux/tracepoint.h> | 11 | #include <linux/tracepoint.h> |
10 | 12 | ||
11 | DECLARE_EVENT_CLASS(rpc_task_status, | 13 | DECLARE_EVENT_CLASS(rpc_task_status, |
@@ -15,18 +17,20 @@ DECLARE_EVENT_CLASS(rpc_task_status, | |||
15 | TP_ARGS(task), | 17 | TP_ARGS(task), |
16 | 18 | ||
17 | TP_STRUCT__entry( | 19 | TP_STRUCT__entry( |
18 | __field(const struct rpc_task *, task) | 20 | __field(unsigned int, task_id) |
19 | __field(const struct rpc_clnt *, clnt) | 21 | __field(unsigned int, client_id) |
20 | __field(int, status) | 22 | __field(int, status) |
21 | ), | 23 | ), |
22 | 24 | ||
23 | TP_fast_assign( | 25 | TP_fast_assign( |
24 | __entry->task = task; | 26 | __entry->task_id = task->tk_pid; |
25 | __entry->clnt = task->tk_client; | 27 | __entry->client_id = task->tk_client->cl_clid; |
26 | __entry->status = task->tk_status; | 28 | __entry->status = task->tk_status; |
27 | ), | 29 | ), |
28 | 30 | ||
29 | TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status) | 31 | TP_printk("task:%u@%u, status %d", |
32 | __entry->task_id, __entry->client_id, | ||
33 | __entry->status) | ||
30 | ); | 34 | ); |
31 | 35 | ||
32 | DEFINE_EVENT(rpc_task_status, rpc_call_status, | 36 | DEFINE_EVENT(rpc_task_status, rpc_call_status, |
@@ -47,18 +51,20 @@ TRACE_EVENT(rpc_connect_status, | |||
47 | TP_ARGS(task, status), | 51 | TP_ARGS(task, status), |
48 | 52 | ||
49 | TP_STRUCT__entry( | 53 | TP_STRUCT__entry( |
50 | __field(const struct rpc_task *, task) | 54 | __field(unsigned int, task_id) |
51 | __field(const struct rpc_clnt *, clnt) | 55 | __field(unsigned int, client_id) |
52 | __field(int, status) | 56 | __field(int, status) |
53 | ), | 57 | ), |
54 | 58 | ||
55 | TP_fast_assign( | 59 | TP_fast_assign( |
56 | __entry->task = task; | 60 | __entry->task_id = task->tk_pid; |
57 | __entry->clnt = task->tk_client; | 61 | __entry->client_id = task->tk_client->cl_clid; |
58 | __entry->status = status; | 62 | __entry->status = status; |
59 | ), | 63 | ), |
60 | 64 | ||
61 | TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status) | 65 | TP_printk("task:%u@%u, status %d", |
66 | __entry->task_id, __entry->client_id, | ||
67 | __entry->status) | ||
62 | ); | 68 | ); |
63 | 69 | ||
64 | DECLARE_EVENT_CLASS(rpc_task_running, | 70 | DECLARE_EVENT_CLASS(rpc_task_running, |
@@ -68,8 +74,8 @@ DECLARE_EVENT_CLASS(rpc_task_running, | |||
68 | TP_ARGS(clnt, task, action), | 74 | TP_ARGS(clnt, task, action), |
69 | 75 | ||
70 | TP_STRUCT__entry( | 76 | TP_STRUCT__entry( |
71 | __field(const struct rpc_clnt *, clnt) | 77 | __field(unsigned int, task_id) |
72 | __field(const struct rpc_task *, task) | 78 | __field(unsigned int, client_id) |
73 | __field(const void *, action) | 79 | __field(const void *, action) |
74 | __field(unsigned long, runstate) | 80 | __field(unsigned long, runstate) |
75 | __field(int, status) | 81 | __field(int, status) |
@@ -77,17 +83,16 @@ DECLARE_EVENT_CLASS(rpc_task_running, | |||
77 | ), | 83 | ), |
78 | 84 | ||
79 | TP_fast_assign( | 85 | TP_fast_assign( |
80 | __entry->clnt = clnt; | 86 | __entry->client_id = clnt->cl_clid; |
81 | __entry->task = task; | 87 | __entry->task_id = task->tk_pid; |
82 | __entry->action = action; | 88 | __entry->action = action; |
83 | __entry->runstate = task->tk_runstate; | 89 | __entry->runstate = task->tk_runstate; |
84 | __entry->status = task->tk_status; | 90 | __entry->status = task->tk_status; |
85 | __entry->flags = task->tk_flags; | 91 | __entry->flags = task->tk_flags; |
86 | ), | 92 | ), |
87 | 93 | ||
88 | TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d action=%pf", | 94 | TP_printk("task:%u@%u flags=%4.4x state=%4.4lx status=%d action=%pf", |
89 | __entry->task, | 95 | __entry->task_id, __entry->client_id, |
90 | __entry->clnt, | ||
91 | __entry->flags, | 96 | __entry->flags, |
92 | __entry->runstate, | 97 | __entry->runstate, |
93 | __entry->status, | 98 | __entry->status, |
@@ -126,8 +131,8 @@ DECLARE_EVENT_CLASS(rpc_task_queued, | |||
126 | TP_ARGS(clnt, task, q), | 131 | TP_ARGS(clnt, task, q), |
127 | 132 | ||
128 | TP_STRUCT__entry( | 133 | TP_STRUCT__entry( |
129 | __field(const struct rpc_clnt *, clnt) | 134 | __field(unsigned int, task_id) |
130 | __field(const struct rpc_task *, task) | 135 | __field(unsigned int, client_id) |
131 | __field(unsigned long, timeout) | 136 | __field(unsigned long, timeout) |
132 | __field(unsigned long, runstate) | 137 | __field(unsigned long, runstate) |
133 | __field(int, status) | 138 | __field(int, status) |
@@ -136,8 +141,8 @@ DECLARE_EVENT_CLASS(rpc_task_queued, | |||
136 | ), | 141 | ), |
137 | 142 | ||
138 | TP_fast_assign( | 143 | TP_fast_assign( |
139 | __entry->clnt = clnt; | 144 | __entry->client_id = clnt->cl_clid; |
140 | __entry->task = task; | 145 | __entry->task_id = task->tk_pid; |
141 | __entry->timeout = task->tk_timeout; | 146 | __entry->timeout = task->tk_timeout; |
142 | __entry->runstate = task->tk_runstate; | 147 | __entry->runstate = task->tk_runstate; |
143 | __entry->status = task->tk_status; | 148 | __entry->status = task->tk_status; |
@@ -145,9 +150,8 @@ DECLARE_EVENT_CLASS(rpc_task_queued, | |||
145 | __assign_str(q_name, rpc_qname(q)); | 150 | __assign_str(q_name, rpc_qname(q)); |
146 | ), | 151 | ), |
147 | 152 | ||
148 | TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d timeout=%lu queue=%s", | 153 | TP_printk("task:%u@%u flags=%4.4x state=%4.4lx status=%d timeout=%lu queue=%s", |
149 | __entry->task, | 154 | __entry->task_id, __entry->client_id, |
150 | __entry->clnt, | ||
151 | __entry->flags, | 155 | __entry->flags, |
152 | __entry->runstate, | 156 | __entry->runstate, |
153 | __entry->status, | 157 | __entry->status, |
@@ -172,6 +176,135 @@ DEFINE_EVENT(rpc_task_queued, rpc_task_wakeup, | |||
172 | 176 | ||
173 | ); | 177 | ); |
174 | 178 | ||
179 | #define rpc_show_socket_state(state) \ | ||
180 | __print_symbolic(state, \ | ||
181 | { SS_FREE, "FREE" }, \ | ||
182 | { SS_UNCONNECTED, "UNCONNECTED" }, \ | ||
183 | { SS_CONNECTING, "CONNECTING," }, \ | ||
184 | { SS_CONNECTED, "CONNECTED," }, \ | ||
185 | { SS_DISCONNECTING, "DISCONNECTING" }) | ||
186 | |||
187 | #define rpc_show_sock_state(state) \ | ||
188 | __print_symbolic(state, \ | ||
189 | { TCP_ESTABLISHED, "ESTABLISHED" }, \ | ||
190 | { TCP_SYN_SENT, "SYN_SENT" }, \ | ||
191 | { TCP_SYN_RECV, "SYN_RECV" }, \ | ||
192 | { TCP_FIN_WAIT1, "FIN_WAIT1" }, \ | ||
193 | { TCP_FIN_WAIT2, "FIN_WAIT2" }, \ | ||
194 | { TCP_TIME_WAIT, "TIME_WAIT" }, \ | ||
195 | { TCP_CLOSE, "CLOSE" }, \ | ||
196 | { TCP_CLOSE_WAIT, "CLOSE_WAIT" }, \ | ||
197 | { TCP_LAST_ACK, "LAST_ACK" }, \ | ||
198 | { TCP_LISTEN, "LISTEN" }, \ | ||
199 | { TCP_CLOSING, "CLOSING" }) | ||
200 | |||
201 | DECLARE_EVENT_CLASS(xs_socket_event, | ||
202 | |||
203 | TP_PROTO( | ||
204 | struct rpc_xprt *xprt, | ||
205 | struct socket *socket | ||
206 | ), | ||
207 | |||
208 | TP_ARGS(xprt, socket), | ||
209 | |||
210 | TP_STRUCT__entry( | ||
211 | __field(unsigned int, socket_state) | ||
212 | __field(unsigned int, sock_state) | ||
213 | __field(unsigned long long, ino) | ||
214 | __string(dstaddr, | ||
215 | xprt->address_strings[RPC_DISPLAY_ADDR]) | ||
216 | __string(dstport, | ||
217 | xprt->address_strings[RPC_DISPLAY_PORT]) | ||
218 | ), | ||
219 | |||
220 | TP_fast_assign( | ||
221 | struct inode *inode = SOCK_INODE(socket); | ||
222 | __entry->socket_state = socket->state; | ||
223 | __entry->sock_state = socket->sk->sk_state; | ||
224 | __entry->ino = (unsigned long long)inode->i_ino; | ||
225 | __assign_str(dstaddr, | ||
226 | xprt->address_strings[RPC_DISPLAY_ADDR]); | ||
227 | __assign_str(dstport, | ||
228 | xprt->address_strings[RPC_DISPLAY_PORT]); | ||
229 | ), | ||
230 | |||
231 | TP_printk( | ||
232 | "socket:[%llu] dstaddr=%s/%s " | ||
233 | "state=%u (%s) sk_state=%u (%s)", | ||
234 | __entry->ino, __get_str(dstaddr), __get_str(dstport), | ||
235 | __entry->socket_state, | ||
236 | rpc_show_socket_state(__entry->socket_state), | ||
237 | __entry->sock_state, | ||
238 | rpc_show_sock_state(__entry->sock_state) | ||
239 | ) | ||
240 | ); | ||
241 | #define DEFINE_RPC_SOCKET_EVENT(name) \ | ||
242 | DEFINE_EVENT(xs_socket_event, name, \ | ||
243 | TP_PROTO( \ | ||
244 | struct rpc_xprt *xprt, \ | ||
245 | struct socket *socket \ | ||
246 | ), \ | ||
247 | TP_ARGS(xprt, socket)) | ||
248 | |||
249 | DECLARE_EVENT_CLASS(xs_socket_event_done, | ||
250 | |||
251 | TP_PROTO( | ||
252 | struct rpc_xprt *xprt, | ||
253 | struct socket *socket, | ||
254 | int error | ||
255 | ), | ||
256 | |||
257 | TP_ARGS(xprt, socket, error), | ||
258 | |||
259 | TP_STRUCT__entry( | ||
260 | __field(int, error) | ||
261 | __field(unsigned int, socket_state) | ||
262 | __field(unsigned int, sock_state) | ||
263 | __field(unsigned long long, ino) | ||
264 | __string(dstaddr, | ||
265 | xprt->address_strings[RPC_DISPLAY_ADDR]) | ||
266 | __string(dstport, | ||
267 | xprt->address_strings[RPC_DISPLAY_PORT]) | ||
268 | ), | ||
269 | |||
270 | TP_fast_assign( | ||
271 | struct inode *inode = SOCK_INODE(socket); | ||
272 | __entry->socket_state = socket->state; | ||
273 | __entry->sock_state = socket->sk->sk_state; | ||
274 | __entry->ino = (unsigned long long)inode->i_ino; | ||
275 | __entry->error = error; | ||
276 | __assign_str(dstaddr, | ||
277 | xprt->address_strings[RPC_DISPLAY_ADDR]); | ||
278 | __assign_str(dstport, | ||
279 | xprt->address_strings[RPC_DISPLAY_PORT]); | ||
280 | ), | ||
281 | |||
282 | TP_printk( | ||
283 | "error=%d socket:[%llu] dstaddr=%s/%s " | ||
284 | "state=%u (%s) sk_state=%u (%s)", | ||
285 | __entry->error, | ||
286 | __entry->ino, __get_str(dstaddr), __get_str(dstport), | ||
287 | __entry->socket_state, | ||
288 | rpc_show_socket_state(__entry->socket_state), | ||
289 | __entry->sock_state, | ||
290 | rpc_show_sock_state(__entry->sock_state) | ||
291 | ) | ||
292 | ); | ||
293 | #define DEFINE_RPC_SOCKET_EVENT_DONE(name) \ | ||
294 | DEFINE_EVENT(xs_socket_event_done, name, \ | ||
295 | TP_PROTO( \ | ||
296 | struct rpc_xprt *xprt, \ | ||
297 | struct socket *socket, \ | ||
298 | int error \ | ||
299 | ), \ | ||
300 | TP_ARGS(xprt, socket, error)) | ||
301 | |||
302 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_state_change); | ||
303 | DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_connect); | ||
304 | DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_reset_connection); | ||
305 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_close); | ||
306 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_shutdown); | ||
307 | |||
175 | #endif /* _TRACE_SUNRPC_H */ | 308 | #endif /* _TRACE_SUNRPC_H */ |
176 | 309 | ||
177 | #include <trace/define_trace.h> | 310 | #include <trace/define_trace.h> |
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h index 63cfcccaebb3..132a985aba8b 100644 --- a/include/trace/events/vmscan.h +++ b/include/trace/events/vmscan.h | |||
@@ -202,7 +202,7 @@ TRACE_EVENT(mm_shrink_slab_start, | |||
202 | 202 | ||
203 | TP_fast_assign( | 203 | TP_fast_assign( |
204 | __entry->shr = shr; | 204 | __entry->shr = shr; |
205 | __entry->shrink = shr->shrink; | 205 | __entry->shrink = shr->scan_objects; |
206 | __entry->nr_objects_to_shrink = nr_objects_to_shrink; | 206 | __entry->nr_objects_to_shrink = nr_objects_to_shrink; |
207 | __entry->gfp_flags = sc->gfp_mask; | 207 | __entry->gfp_flags = sc->gfp_mask; |
208 | __entry->pgs_scanned = pgs_scanned; | 208 | __entry->pgs_scanned = pgs_scanned; |
@@ -241,7 +241,7 @@ TRACE_EVENT(mm_shrink_slab_end, | |||
241 | 241 | ||
242 | TP_fast_assign( | 242 | TP_fast_assign( |
243 | __entry->shr = shr; | 243 | __entry->shr = shr; |
244 | __entry->shrink = shr->shrink; | 244 | __entry->shrink = shr->scan_objects; |
245 | __entry->unused_scan = unused_scan_cnt; | 245 | __entry->unused_scan = unused_scan_cnt; |
246 | __entry->new_scan = new_scan_cnt; | 246 | __entry->new_scan = new_scan_cnt; |
247 | __entry->retval = shrinker_retval; | 247 | __entry->retval = shrinker_retval; |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 41a6643e2136..5c7ab17cbb02 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -507,8 +507,14 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
507 | #undef TP_fast_assign | 507 | #undef TP_fast_assign |
508 | #define TP_fast_assign(args...) args | 508 | #define TP_fast_assign(args...) args |
509 | 509 | ||
510 | #undef TP_perf_assign | 510 | #undef __perf_addr |
511 | #define TP_perf_assign(args...) | 511 | #define __perf_addr(a) (a) |
512 | |||
513 | #undef __perf_count | ||
514 | #define __perf_count(c) (c) | ||
515 | |||
516 | #undef __perf_task | ||
517 | #define __perf_task(t) (t) | ||
512 | 518 | ||
513 | #undef DECLARE_EVENT_CLASS | 519 | #undef DECLARE_EVENT_CLASS |
514 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 520 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
@@ -636,16 +642,13 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call | |||
636 | #define __get_str(field) (char *)__get_dynamic_array(field) | 642 | #define __get_str(field) (char *)__get_dynamic_array(field) |
637 | 643 | ||
638 | #undef __perf_addr | 644 | #undef __perf_addr |
639 | #define __perf_addr(a) __addr = (a) | 645 | #define __perf_addr(a) (__addr = (a)) |
640 | 646 | ||
641 | #undef __perf_count | 647 | #undef __perf_count |
642 | #define __perf_count(c) __count = (c) | 648 | #define __perf_count(c) (__count = (c)) |
643 | 649 | ||
644 | #undef __perf_task | 650 | #undef __perf_task |
645 | #define __perf_task(t) __task = (t) | 651 | #define __perf_task(t) (__task = (t)) |
646 | |||
647 | #undef TP_perf_assign | ||
648 | #define TP_perf_assign(args...) args | ||
649 | 652 | ||
650 | #undef DECLARE_EVENT_CLASS | 653 | #undef DECLARE_EVENT_CLASS |
651 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 654 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
@@ -663,15 +666,20 @@ perf_trace_##call(void *__data, proto) \ | |||
663 | int __data_size; \ | 666 | int __data_size; \ |
664 | int rctx; \ | 667 | int rctx; \ |
665 | \ | 668 | \ |
666 | perf_fetch_caller_regs(&__regs); \ | ||
667 | \ | ||
668 | __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ | 669 | __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ |
670 | \ | ||
671 | head = this_cpu_ptr(event_call->perf_events); \ | ||
672 | if (__builtin_constant_p(!__task) && !__task && \ | ||
673 | hlist_empty(head)) \ | ||
674 | return; \ | ||
675 | \ | ||
669 | __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32),\ | 676 | __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32),\ |
670 | sizeof(u64)); \ | 677 | sizeof(u64)); \ |
671 | __entry_size -= sizeof(u32); \ | 678 | __entry_size -= sizeof(u32); \ |
672 | \ | 679 | \ |
673 | entry = (struct ftrace_raw_##call *)perf_trace_buf_prepare( \ | 680 | perf_fetch_caller_regs(&__regs); \ |
674 | __entry_size, event_call->event.type, &__regs, &rctx); \ | 681 | entry = perf_trace_buf_prepare(__entry_size, \ |
682 | event_call->event.type, &__regs, &rctx); \ | ||
675 | if (!entry) \ | 683 | if (!entry) \ |
676 | return; \ | 684 | return; \ |
677 | \ | 685 | \ |
@@ -679,7 +687,6 @@ perf_trace_##call(void *__data, proto) \ | |||
679 | \ | 687 | \ |
680 | { assign; } \ | 688 | { assign; } \ |
681 | \ | 689 | \ |
682 | head = this_cpu_ptr(event_call->perf_events); \ | ||
683 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ | 690 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ |
684 | __count, &__regs, head, __task); \ | 691 | __count, &__regs, head, __task); \ |
685 | } | 692 | } |