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
),
17 __field( void *, work
)
24 TP_printk("work struct %p", __entry
->work
)
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
),
40 __field( void *, work
)
41 __field( void *, function
)
46 __entry
->function
= work
->func
;
49 TP_printk("work struct %p: function %pf", __entry
->work
, __entry
->function
)
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
),
65 #endif /* _TRACE_WORKQUEUE_H */
67 /* This part must be outside protection */
68 #include <trace/define_trace.h>