[media] xc4000: fixed frequency error
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / trace / events / workqueue.h
blob7d497291c85d8489ff3b11e59ebfefc0b3417a0d
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM workqueue
4 #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_WORKQUEUE_H
7 #include <linux/tracepoint.h>
8 #include <linux/workqueue.h>
10 DECLARE_EVENT_CLASS(workqueue_work,
12 TP_PROTO(struct work_struct *work),
14 TP_ARGS(work),
16 TP_STRUCT__entry(
17 __field( void *, work )
20 TP_fast_assign(
21 __entry->work = work;
24 TP_printk("work struct %p", __entry->work)
27 /**
28 * workqueue_queue_work - called when a work gets queued
29 * @req_cpu: the requested cpu
30 * @cwq: pointer to struct cpu_workqueue_struct
31 * @work: pointer to struct work_struct
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).
37 TRACE_EVENT(workqueue_queue_work,
39 TP_PROTO(unsigned int req_cpu, struct cpu_workqueue_struct *cwq,
40 struct work_struct *work),
42 TP_ARGS(req_cpu, cwq, work),
44 TP_STRUCT__entry(
45 __field( void *, work )
46 __field( void *, function)
47 __field( void *, workqueue)
48 __field( unsigned int, req_cpu )
49 __field( unsigned int, cpu )
52 TP_fast_assign(
53 __entry->work = work;
54 __entry->function = work->func;
55 __entry->workqueue = cwq->wq;
56 __entry->req_cpu = req_cpu;
57 __entry->cpu = cwq->gcwq->cpu;
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)
65 /**
66 * workqueue_activate_work - called when a work gets activated
67 * @work: pointer to struct work_struct
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.
73 DEFINE_EVENT(workqueue_work, workqueue_activate_work,
75 TP_PROTO(struct work_struct *work),
77 TP_ARGS(work)
80 /**
81 * workqueue_execute_start - called immediately before the workqueue callback
82 * @work: pointer to struct work_struct
84 * Allows to track workqueue execution.
86 TRACE_EVENT(workqueue_execute_start,
88 TP_PROTO(struct work_struct *work),
90 TP_ARGS(work),
92 TP_STRUCT__entry(
93 __field( void *, work )
94 __field( void *, function)
97 TP_fast_assign(
98 __entry->work = work;
99 __entry->function = work->func;
102 TP_printk("work struct %p: function %pf", __entry->work, __entry->function)
106 * workqueue_execute_end - called immediately before the workqueue callback
107 * @work: pointer to struct work_struct
109 * Allows to track workqueue execution.
111 DEFINE_EVENT(workqueue_work, workqueue_execute_end,
113 TP_PROTO(struct work_struct *work),
115 TP_ARGS(work)
118 #endif /* _TRACE_WORKQUEUE_H */
120 /* This part must be outside protection */
121 #include <trace/define_trace.h>