workqueue: prepare for more tracepoints
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / trace / events / workqueue.h
blobec9d7244eb9f5ea493e4e492dd33e8278b1090fe
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_execute_start - called immediately before the workqueue callback
29 * @work: pointer to struct work_struct
31 * Allows to track workqueue execution.
33 TRACE_EVENT(workqueue_execute_start,
35 TP_PROTO(struct work_struct *work),
37 TP_ARGS(work),
39 TP_STRUCT__entry(
40 __field( void *, work )
41 __field( void *, function)
44 TP_fast_assign(
45 __entry->work = work;
46 __entry->function = work->func;
49 TP_printk("work struct %p: function %pf", __entry->work, __entry->function)
52 /**
53 * workqueue_execute_end - called immediately before the workqueue callback
54 * @work: pointer to struct work_struct
56 * Allows to track workqueue execution.
58 DEFINE_EVENT(workqueue_work, workqueue_execute_end,
60 TP_PROTO(struct work_struct *work),
62 TP_ARGS(work)
65 #endif /* _TRACE_WORKQUEUE_H */
67 /* This part must be outside protection */
68 #include <trace/define_trace.h>