#include <lttng/tracepoint-event.h>
#include <linux/workqueue.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
#ifndef _TRACE_WORKQUEUE_DEF_
#define _TRACE_WORKQUEUE_DEF_
)
)
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,19,0))
/**
* workqueue_queue_work - called when a work gets queued
* @req_cpu: the requested cpu
- * @cwq: pointer to struct cpu_workqueue_struct
+ * @pwq: pointer to struct pool_workqueue
* @work: pointer to struct work_struct
*
* This event occurs when a work is queued immediately or once a
*/
LTTNG_TRACEPOINT_EVENT(workqueue_queue_work,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
- TP_PROTO(unsigned int req_cpu, struct pool_workqueue *pwq,
+ TP_PROTO(int req_cpu, struct pool_workqueue *pwq,
struct work_struct *work),
TP_ARGS(req_cpu, pwq, work),
+
+ TP_FIELDS(
+ ctf_integer_hex(void *, work, work)
+ ctf_integer_hex(void *, function, work->func)
+ ctf_integer(int, req_cpu, req_cpu)
+ )
+)
#else
- TP_PROTO(unsigned int req_cpu, struct cpu_workqueue_struct *cwq,
+/**
+ * workqueue_queue_work - called when a work gets queued
+ * @req_cpu: the requested cpu
+ * @pwq: pointer to struct pool_workqueue
+ * @work: pointer to struct work_struct
+ *
+ * This event occurs when a work is queued immediately or once a
+ * delayed work is actually queued on a workqueue (ie: once the delay
+ * has been reached).
+ */
+LTTNG_TRACEPOINT_EVENT(workqueue_queue_work,
+
+ TP_PROTO(unsigned int req_cpu, struct pool_workqueue *pwq,
struct work_struct *work),
- TP_ARGS(req_cpu, cwq, work),
-#endif
+ TP_ARGS(req_cpu, pwq, work),
TP_FIELDS(
ctf_integer_hex(void *, work, work)
ctf_integer(unsigned int, req_cpu, req_cpu)
)
)
+#endif
/**
* workqueue_activate_work - called when a work gets activated
)
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
/**
* workqueue_execute_end - called immediately after the workqueue callback
* @work: pointer to struct work_struct