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 <probes/lttng-tracepoint-event.h>
9 #include <linux/workqueue.h>
11 #ifndef _TRACE_WORKQUEUE_DEF_
12 #define _TRACE_WORKQUEUE_DEF_
19 LTTNG_TRACEPOINT_EVENT_CLASS(workqueue_work
,
21 TP_PROTO(struct work_struct
*work
),
26 ctf_integer_hex(void *, work
, work
)
31 * workqueue_queue_work - called when a work gets queued
32 * @req_cpu: the requested cpu
33 * @cwq: pointer to struct cpu_workqueue_struct
34 * @work: pointer to struct work_struct
36 * This event occurs when a work is queued immediately or once a
37 * delayed work is actually queued on a workqueue (ie: once the delay
40 LTTNG_TRACEPOINT_EVENT(workqueue_queue_work
,
42 TP_PROTO(unsigned int req_cpu
, struct pool_workqueue
*pwq
,
43 struct work_struct
*work
),
45 TP_ARGS(req_cpu
, pwq
, work
),
48 ctf_integer_hex(void *, work
, work
)
49 ctf_integer_hex(void *, function
, work
->func
)
50 ctf_integer(unsigned int, req_cpu
, req_cpu
)
55 * workqueue_activate_work - called when a work gets activated
56 * @work: pointer to struct work_struct
58 * This event occurs when a queued work is put on the active queue,
59 * which happens immediately after queueing unless @max_active limit
62 LTTNG_TRACEPOINT_EVENT_INSTANCE(workqueue_work
, workqueue_activate_work
,
64 TP_PROTO(struct work_struct
*work
),
70 * workqueue_execute_start - called immediately before the workqueue callback
71 * @work: pointer to struct work_struct
73 * Allows to track workqueue execution.
75 LTTNG_TRACEPOINT_EVENT(workqueue_execute_start
,
77 TP_PROTO(struct work_struct
*work
),
82 ctf_integer_hex(void *, work
, work
)
83 ctf_integer_hex(void *, function
, work
->func
)
88 * workqueue_execute_end - called immediately after the workqueue callback
89 * @work: pointer to struct work_struct
90 * @function: pointer to worker function
92 * Allows to track workqueue execution.
94 LTTNG_TRACEPOINT_EVENT(workqueue_execute_end
,
96 TP_PROTO(struct work_struct
*work
, work_func_t function
),
98 TP_ARGS(work
, function
),
101 ctf_integer_hex(void *, work
, work
)
102 ctf_integer_hex(void *, function
, function
)
106 #endif /* LTTNG_TRACE_WORKQUEUE_H */
108 /* This part must be outside protection */
109 #include <probes/define_trace.h>
This page took 0.032428 seconds and 4 git commands to generate.