diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-10-30 04:43:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-10-30 04:43:08 -0400 |
commit | 169ed55bd30305b933f52bfab32a58671d44ab68 (patch) | |
tree | 32e280957474f458901abfce16fa2a1687ef7497 /include/trace | |
parent | 3d7851b3cdd43a734e5cc4c643fd886ab28ad4d5 (diff) | |
parent | 45f81b1c96d9793e47ce925d257ea693ce0b193e (diff) |
Merge branch 'tip/perf/jump-label-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/ext4.h | 8 | ||||
-rw-r--r-- | include/trace/events/vmscan.h | 44 | ||||
-rw-r--r-- | include/trace/events/workqueue.h | 77 | ||||
-rw-r--r-- | include/trace/events/writeback.h | 37 |
4 files changed, 151 insertions, 15 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 01e9e0076a92..6bcb00645de4 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -242,18 +242,20 @@ TRACE_EVENT(ext4_da_writepages, | |||
242 | __entry->pages_skipped = wbc->pages_skipped; | 242 | __entry->pages_skipped = wbc->pages_skipped; |
243 | __entry->range_start = wbc->range_start; | 243 | __entry->range_start = wbc->range_start; |
244 | __entry->range_end = wbc->range_end; | 244 | __entry->range_end = wbc->range_end; |
245 | __entry->nonblocking = wbc->nonblocking; | ||
246 | __entry->for_kupdate = wbc->for_kupdate; | 245 | __entry->for_kupdate = wbc->for_kupdate; |
247 | __entry->for_reclaim = wbc->for_reclaim; | 246 | __entry->for_reclaim = wbc->for_reclaim; |
248 | __entry->range_cyclic = wbc->range_cyclic; | 247 | __entry->range_cyclic = wbc->range_cyclic; |
249 | __entry->writeback_index = inode->i_mapping->writeback_index; | 248 | __entry->writeback_index = inode->i_mapping->writeback_index; |
250 | ), | 249 | ), |
251 | 250 | ||
252 | TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d writeback_index %lu", | 251 | TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld " |
252 | "range_start %llu range_end %llu " | ||
253 | "for_kupdate %d for_reclaim %d " | ||
254 | "range_cyclic %d writeback_index %lu", | ||
253 | jbd2_dev_to_name(__entry->dev), | 255 | jbd2_dev_to_name(__entry->dev), |
254 | (unsigned long) __entry->ino, __entry->nr_to_write, | 256 | (unsigned long) __entry->ino, __entry->nr_to_write, |
255 | __entry->pages_skipped, __entry->range_start, | 257 | __entry->pages_skipped, __entry->range_start, |
256 | __entry->range_end, __entry->nonblocking, | 258 | __entry->range_end, |
257 | __entry->for_kupdate, __entry->for_reclaim, | 259 | __entry->for_kupdate, __entry->for_reclaim, |
258 | __entry->range_cyclic, | 260 | __entry->range_cyclic, |
259 | (unsigned long) __entry->writeback_index) | 261 | (unsigned long) __entry->writeback_index) |
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h index 370aa5a87322..c255fcc587bf 100644 --- a/include/trace/events/vmscan.h +++ b/include/trace/events/vmscan.h | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #define RECLAIM_WB_ANON 0x0001u | 11 | #define RECLAIM_WB_ANON 0x0001u |
12 | #define RECLAIM_WB_FILE 0x0002u | 12 | #define RECLAIM_WB_FILE 0x0002u |
13 | #define RECLAIM_WB_MIXED 0x0010u | ||
13 | #define RECLAIM_WB_SYNC 0x0004u | 14 | #define RECLAIM_WB_SYNC 0x0004u |
14 | #define RECLAIM_WB_ASYNC 0x0008u | 15 | #define RECLAIM_WB_ASYNC 0x0008u |
15 | 16 | ||
@@ -17,13 +18,20 @@ | |||
17 | (flags) ? __print_flags(flags, "|", \ | 18 | (flags) ? __print_flags(flags, "|", \ |
18 | {RECLAIM_WB_ANON, "RECLAIM_WB_ANON"}, \ | 19 | {RECLAIM_WB_ANON, "RECLAIM_WB_ANON"}, \ |
19 | {RECLAIM_WB_FILE, "RECLAIM_WB_FILE"}, \ | 20 | {RECLAIM_WB_FILE, "RECLAIM_WB_FILE"}, \ |
21 | {RECLAIM_WB_MIXED, "RECLAIM_WB_MIXED"}, \ | ||
20 | {RECLAIM_WB_SYNC, "RECLAIM_WB_SYNC"}, \ | 22 | {RECLAIM_WB_SYNC, "RECLAIM_WB_SYNC"}, \ |
21 | {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \ | 23 | {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \ |
22 | ) : "RECLAIM_WB_NONE" | 24 | ) : "RECLAIM_WB_NONE" |
23 | 25 | ||
24 | #define trace_reclaim_flags(page, sync) ( \ | 26 | #define trace_reclaim_flags(page, sync) ( \ |
25 | (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ | 27 | (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ |
26 | (sync == PAGEOUT_IO_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \ | 28 | (sync == LUMPY_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \ |
29 | ) | ||
30 | |||
31 | #define trace_shrink_flags(file, sync) ( \ | ||
32 | (sync == LUMPY_MODE_SYNC ? RECLAIM_WB_MIXED : \ | ||
33 | (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON)) | \ | ||
34 | (sync == LUMPY_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \ | ||
27 | ) | 35 | ) |
28 | 36 | ||
29 | TRACE_EVENT(mm_vmscan_kswapd_sleep, | 37 | TRACE_EVENT(mm_vmscan_kswapd_sleep, |
@@ -269,6 +277,40 @@ TRACE_EVENT(mm_vmscan_writepage, | |||
269 | show_reclaim_flags(__entry->reclaim_flags)) | 277 | show_reclaim_flags(__entry->reclaim_flags)) |
270 | ); | 278 | ); |
271 | 279 | ||
280 | TRACE_EVENT(mm_vmscan_lru_shrink_inactive, | ||
281 | |||
282 | TP_PROTO(int nid, int zid, | ||
283 | unsigned long nr_scanned, unsigned long nr_reclaimed, | ||
284 | int priority, int reclaim_flags), | ||
285 | |||
286 | TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags), | ||
287 | |||
288 | TP_STRUCT__entry( | ||
289 | __field(int, nid) | ||
290 | __field(int, zid) | ||
291 | __field(unsigned long, nr_scanned) | ||
292 | __field(unsigned long, nr_reclaimed) | ||
293 | __field(int, priority) | ||
294 | __field(int, reclaim_flags) | ||
295 | ), | ||
296 | |||
297 | TP_fast_assign( | ||
298 | __entry->nid = nid; | ||
299 | __entry->zid = zid; | ||
300 | __entry->nr_scanned = nr_scanned; | ||
301 | __entry->nr_reclaimed = nr_reclaimed; | ||
302 | __entry->priority = priority; | ||
303 | __entry->reclaim_flags = reclaim_flags; | ||
304 | ), | ||
305 | |||
306 | TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s", | ||
307 | __entry->nid, __entry->zid, | ||
308 | __entry->nr_scanned, __entry->nr_reclaimed, | ||
309 | __entry->priority, | ||
310 | show_reclaim_flags(__entry->reclaim_flags)) | ||
311 | ); | ||
312 | |||
313 | |||
272 | #endif /* _TRACE_VMSCAN_H */ | 314 | #endif /* _TRACE_VMSCAN_H */ |
273 | 315 | ||
274 | /* This part must be outside protection */ | 316 | /* This part must be outside protection */ |
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h index 49682d7e9d60..7d497291c85d 100644 --- a/include/trace/events/workqueue.h +++ b/include/trace/events/workqueue.h | |||
@@ -7,38 +7,83 @@ | |||
7 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
8 | #include <linux/workqueue.h> | 8 | #include <linux/workqueue.h> |
9 | 9 | ||
10 | DECLARE_EVENT_CLASS(workqueue_work, | ||
11 | |||
12 | TP_PROTO(struct work_struct *work), | ||
13 | |||
14 | TP_ARGS(work), | ||
15 | |||
16 | TP_STRUCT__entry( | ||
17 | __field( void *, work ) | ||
18 | ), | ||
19 | |||
20 | TP_fast_assign( | ||
21 | __entry->work = work; | ||
22 | ), | ||
23 | |||
24 | TP_printk("work struct %p", __entry->work) | ||
25 | ); | ||
26 | |||
10 | /** | 27 | /** |
11 | * workqueue_execute_start - called immediately before the workqueue callback | 28 | * workqueue_queue_work - called when a work gets queued |
29 | * @req_cpu: the requested cpu | ||
30 | * @cwq: pointer to struct cpu_workqueue_struct | ||
12 | * @work: pointer to struct work_struct | 31 | * @work: pointer to struct work_struct |
13 | * | 32 | * |
14 | * Allows to track workqueue execution. | 33 | * This event occurs when a work is queued immediately or once a |
34 | * delayed work is actually queued on a workqueue (ie: once the delay | ||
35 | * has been reached). | ||
15 | */ | 36 | */ |
16 | TRACE_EVENT(workqueue_execute_start, | 37 | TRACE_EVENT(workqueue_queue_work, |
17 | 38 | ||
18 | TP_PROTO(struct work_struct *work), | 39 | TP_PROTO(unsigned int req_cpu, struct cpu_workqueue_struct *cwq, |
40 | struct work_struct *work), | ||
19 | 41 | ||
20 | TP_ARGS(work), | 42 | TP_ARGS(req_cpu, cwq, work), |
21 | 43 | ||
22 | TP_STRUCT__entry( | 44 | TP_STRUCT__entry( |
23 | __field( void *, work ) | 45 | __field( void *, work ) |
24 | __field( void *, function) | 46 | __field( void *, function) |
47 | __field( void *, workqueue) | ||
48 | __field( unsigned int, req_cpu ) | ||
49 | __field( unsigned int, cpu ) | ||
25 | ), | 50 | ), |
26 | 51 | ||
27 | TP_fast_assign( | 52 | TP_fast_assign( |
28 | __entry->work = work; | 53 | __entry->work = work; |
29 | __entry->function = work->func; | 54 | __entry->function = work->func; |
55 | __entry->workqueue = cwq->wq; | ||
56 | __entry->req_cpu = req_cpu; | ||
57 | __entry->cpu = cwq->gcwq->cpu; | ||
30 | ), | 58 | ), |
31 | 59 | ||
32 | TP_printk("work struct %p: function %pf", __entry->work, __entry->function) | 60 | TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u", |
61 | __entry->work, __entry->function, __entry->workqueue, | ||
62 | __entry->req_cpu, __entry->cpu) | ||
33 | ); | 63 | ); |
34 | 64 | ||
35 | /** | 65 | /** |
36 | * workqueue_execute_end - called immediately before the workqueue callback | 66 | * workqueue_activate_work - called when a work gets activated |
67 | * @work: pointer to struct work_struct | ||
68 | * | ||
69 | * This event occurs when a queued work is put on the active queue, | ||
70 | * which happens immediately after queueing unless @max_active limit | ||
71 | * is reached. | ||
72 | */ | ||
73 | DEFINE_EVENT(workqueue_work, workqueue_activate_work, | ||
74 | |||
75 | TP_PROTO(struct work_struct *work), | ||
76 | |||
77 | TP_ARGS(work) | ||
78 | ); | ||
79 | |||
80 | /** | ||
81 | * workqueue_execute_start - called immediately before the workqueue callback | ||
37 | * @work: pointer to struct work_struct | 82 | * @work: pointer to struct work_struct |
38 | * | 83 | * |
39 | * Allows to track workqueue execution. | 84 | * Allows to track workqueue execution. |
40 | */ | 85 | */ |
41 | TRACE_EVENT(workqueue_execute_end, | 86 | TRACE_EVENT(workqueue_execute_start, |
42 | 87 | ||
43 | TP_PROTO(struct work_struct *work), | 88 | TP_PROTO(struct work_struct *work), |
44 | 89 | ||
@@ -46,15 +91,29 @@ TRACE_EVENT(workqueue_execute_end, | |||
46 | 91 | ||
47 | TP_STRUCT__entry( | 92 | TP_STRUCT__entry( |
48 | __field( void *, work ) | 93 | __field( void *, work ) |
94 | __field( void *, function) | ||
49 | ), | 95 | ), |
50 | 96 | ||
51 | TP_fast_assign( | 97 | TP_fast_assign( |
52 | __entry->work = work; | 98 | __entry->work = work; |
99 | __entry->function = work->func; | ||
53 | ), | 100 | ), |
54 | 101 | ||
55 | TP_printk("work struct %p", __entry->work) | 102 | TP_printk("work struct %p: function %pf", __entry->work, __entry->function) |
56 | ); | 103 | ); |
57 | 104 | ||
105 | /** | ||
106 | * workqueue_execute_end - called immediately before the workqueue callback | ||
107 | * @work: pointer to struct work_struct | ||
108 | * | ||
109 | * Allows to track workqueue execution. | ||
110 | */ | ||
111 | DEFINE_EVENT(workqueue_work, workqueue_execute_end, | ||
112 | |||
113 | TP_PROTO(struct work_struct *work), | ||
114 | |||
115 | TP_ARGS(work) | ||
116 | ); | ||
58 | 117 | ||
59 | #endif /* _TRACE_WORKQUEUE_H */ | 118 | #endif /* _TRACE_WORKQUEUE_H */ |
60 | 119 | ||
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index f345f66ae9d1..89a2b2db4375 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h | |||
@@ -96,8 +96,6 @@ DECLARE_EVENT_CLASS(wbc_class, | |||
96 | __field(long, nr_to_write) | 96 | __field(long, nr_to_write) |
97 | __field(long, pages_skipped) | 97 | __field(long, pages_skipped) |
98 | __field(int, sync_mode) | 98 | __field(int, sync_mode) |
99 | __field(int, nonblocking) | ||
100 | __field(int, encountered_congestion) | ||
101 | __field(int, for_kupdate) | 99 | __field(int, for_kupdate) |
102 | __field(int, for_background) | 100 | __field(int, for_background) |
103 | __field(int, for_reclaim) | 101 | __field(int, for_reclaim) |
@@ -153,6 +151,41 @@ DEFINE_WBC_EVENT(wbc_balance_dirty_written); | |||
153 | DEFINE_WBC_EVENT(wbc_balance_dirty_wait); | 151 | DEFINE_WBC_EVENT(wbc_balance_dirty_wait); |
154 | DEFINE_WBC_EVENT(wbc_writepage); | 152 | DEFINE_WBC_EVENT(wbc_writepage); |
155 | 153 | ||
154 | DECLARE_EVENT_CLASS(writeback_congest_waited_template, | ||
155 | |||
156 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), | ||
157 | |||
158 | TP_ARGS(usec_timeout, usec_delayed), | ||
159 | |||
160 | TP_STRUCT__entry( | ||
161 | __field( unsigned int, usec_timeout ) | ||
162 | __field( unsigned int, usec_delayed ) | ||
163 | ), | ||
164 | |||
165 | TP_fast_assign( | ||
166 | __entry->usec_timeout = usec_timeout; | ||
167 | __entry->usec_delayed = usec_delayed; | ||
168 | ), | ||
169 | |||
170 | TP_printk("usec_timeout=%u usec_delayed=%u", | ||
171 | __entry->usec_timeout, | ||
172 | __entry->usec_delayed) | ||
173 | ); | ||
174 | |||
175 | DEFINE_EVENT(writeback_congest_waited_template, writeback_congestion_wait, | ||
176 | |||
177 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), | ||
178 | |||
179 | TP_ARGS(usec_timeout, usec_delayed) | ||
180 | ); | ||
181 | |||
182 | DEFINE_EVENT(writeback_congest_waited_template, writeback_wait_iff_congested, | ||
183 | |||
184 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), | ||
185 | |||
186 | TP_ARGS(usec_timeout, usec_delayed) | ||
187 | ); | ||
188 | |||
156 | #endif /* _TRACE_WRITEBACK_H */ | 189 | #endif /* _TRACE_WRITEBACK_H */ |
157 | 190 | ||
158 | /* This part must be outside protection */ | 191 | /* This part must be outside protection */ |