1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #define TRACE_SYSTEM workqueue
5 #if !defined(LTTNG_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_WORKQUEUE_H
8 #include <lttng/tracepoint-event.h>
9 #include <linux/workqueue.h>
10 #include <lttng/kernel-version.h>
12 #ifndef _TRACE_WORKQUEUE_DEF_
13 #define _TRACE_WORKQUEUE_DEF_
20 LTTNG_TRACEPOINT_EVENT_CLASS(workqueue_work
,
22 TP_PROTO(struct work_struct
*work
),
27 ctf_integer_hex(void *, work
, work
)
31 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,19,0))
33 * workqueue_queue_work - called when a work gets queued
34 * @req_cpu: the requested cpu
35 * @pwq: pointer to struct pool_workqueue
36 * @work: pointer to struct work_struct
38 * This event occurs when a work is queued immediately or once a
39 * delayed work is actually queued on a workqueue (ie: once the delay
42 LTTNG_TRACEPOINT_EVENT(workqueue_queue_work
,
44 TP_PROTO(int req_cpu
, struct pool_workqueue
*pwq
,
45 struct work_struct
*work
),
47 TP_ARGS(req_cpu
, pwq
, work
),
50 ctf_integer_hex(void *, work
, work
)
51 ctf_integer_hex(void *, function
, work
->func
)
52 ctf_integer(int, req_cpu
, req_cpu
)
57 * workqueue_queue_work - called when a work gets queued
58 * @req_cpu: the requested cpu
59 * @pwq: pointer to struct pool_workqueue
60 * @work: pointer to struct work_struct
62 * This event occurs when a work is queued immediately or once a
63 * delayed work is actually queued on a workqueue (ie: once the delay
66 LTTNG_TRACEPOINT_EVENT(workqueue_queue_work
,
68 TP_PROTO(unsigned int req_cpu
, struct pool_workqueue
*pwq
,
69 struct work_struct
*work
),
71 TP_ARGS(req_cpu
, pwq
, work
),
74 ctf_integer_hex(void *, work
, work
)
75 ctf_integer_hex(void *, function
, work
->func
)
76 ctf_integer(unsigned int, req_cpu
, req_cpu
)
82 * workqueue_activate_work - called when a work gets activated
83 * @work: pointer to struct work_struct
85 * This event occurs when a queued work is put on the active queue,
86 * which happens immediately after queueing unless @max_active limit
89 LTTNG_TRACEPOINT_EVENT_INSTANCE(workqueue_work
, workqueue_activate_work
,
91 TP_PROTO(struct work_struct
*work
),
97 * workqueue_execute_start - called immediately before the workqueue callback
98 * @work: pointer to struct work_struct
100 * Allows to track workqueue execution.
102 LTTNG_TRACEPOINT_EVENT(workqueue_execute_start
,
104 TP_PROTO(struct work_struct
*work
),
109 ctf_integer_hex(void *, work
, work
)
110 ctf_integer_hex(void *, function
, work
->func
)
114 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
116 * workqueue_execute_end - called immediately after the workqueue callback
117 * @work: pointer to struct work_struct
118 * @function: pointer to worker function
120 * Allows to track workqueue execution.
122 LTTNG_TRACEPOINT_EVENT(workqueue_execute_end
,
124 TP_PROTO(struct work_struct
*work
, work_func_t function
),
126 TP_ARGS(work
, function
),
129 ctf_integer_hex(void *, work
, work
)
130 ctf_integer_hex(void *, function
, function
)
135 * workqueue_execute_end - called immediately after the workqueue callback
136 * @work: pointer to struct work_struct
138 * Allows to track workqueue execution.
140 LTTNG_TRACEPOINT_EVENT_INSTANCE(workqueue_work
, workqueue_execute_end
,
142 TP_PROTO(struct work_struct
*work
),
148 #endif /* LTTNG_TRACE_WORKQUEUE_H */
150 /* This part must be outside protection */
151 #include <lttng/define_trace.h>
This page took 0.032207 seconds and 4 git commands to generate.