Merge branch 'for-upstream/pvhvm' of git://xenbits.xensource.com/people/ianc/linux-2.6
[pandora-kernel.git] / include / trace / events / workqueue.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM workqueue
3
4 #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_WORKQUEUE_H
6
7 #include <linux/tracepoint.h>
8 #include <linux/workqueue.h>
9
10 /**
11  * workqueue_execute_start - called immediately before the workqueue callback
12  * @work:       pointer to struct work_struct
13  *
14  * Allows to track workqueue execution.
15  */
16 TRACE_EVENT(workqueue_execute_start,
17
18         TP_PROTO(struct work_struct *work),
19
20         TP_ARGS(work),
21
22         TP_STRUCT__entry(
23                 __field( void *,        work    )
24                 __field( void *,        function)
25         ),
26
27         TP_fast_assign(
28                 __entry->work           = work;
29                 __entry->function       = work->func;
30         ),
31
32         TP_printk("work struct %p: function %pf", __entry->work, __entry->function)
33 );
34
35 /**
36  * workqueue_execute_end - called immediately before the workqueue callback
37  * @work:       pointer to struct work_struct
38  *
39  * Allows to track workqueue execution.
40  */
41 TRACE_EVENT(workqueue_execute_end,
42
43         TP_PROTO(struct work_struct *work),
44
45         TP_ARGS(work),
46
47         TP_STRUCT__entry(
48                 __field( void *,        work    )
49         ),
50
51         TP_fast_assign(
52                 __entry->work           = work;
53         ),
54
55         TP_printk("work struct %p", __entry->work)
56 );
57
58
59 #endif /*  _TRACE_WORKQUEUE_H */
60
61 /* This part must be outside protection */
62 #include <trace/define_trace.h>