#if !defined(LTTNG_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ)
#define LTTNG_TRACE_WORKQUEUE_H
-#include "../../../probes/lttng-tracepoint-event.h"
+#include <probes/lttng-tracepoint-event.h>
#include <linux/workqueue.h>
#include <linux/version.h>
TP_ARGS(work),
TP_FIELDS(
- ctf_integer(void *, work, work)
+ ctf_integer_hex(void *, work, work)
)
)
#endif
TP_FIELDS(
- ctf_integer(void *, work, work)
- ctf_integer(void *, function, work->func)
+ ctf_integer_hex(void *, work, work)
+ ctf_integer_hex(void *, function, work->func)
ctf_integer(unsigned int, req_cpu, req_cpu)
)
)
TP_ARGS(work),
TP_FIELDS(
- ctf_integer(void *, work, work)
- ctf_integer(void *, function, work->func)
+ ctf_integer_hex(void *, work, work)
+ ctf_integer_hex(void *, function, work->func)
)
)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+/**
+ * workqueue_execute_end - called immediately after the workqueue callback
+ * @work: pointer to struct work_struct
+ * @function: pointer to worker function
+ *
+ * Allows to track workqueue execution.
+ */
+LTTNG_TRACEPOINT_EVENT(workqueue_execute_end,
+
+ TP_PROTO(struct work_struct *work, work_func_t function),
+
+ TP_ARGS(work, function),
+
+ TP_FIELDS(
+ ctf_integer_hex(void *, work, work)
+ ctf_integer_hex(void *, function, function)
+ )
+)
+#else
/**
* workqueue_execute_end - called immediately after the workqueue callback
* @work: pointer to struct work_struct
TP_ARGS(work)
)
+#endif
#else
TP_FIELDS(
ctf_array(char, thread_comm, wq_thread->comm, TASK_COMM_LEN)
ctf_integer(pid_t, thread_pid, wq_thread->pid)
- ctf_integer(work_func_t, func, work->func)
+ ctf_integer_hex(work_func_t, func, work->func)
)
)
#endif /* LTTNG_TRACE_WORKQUEUE_H */
/* This part must be outside protection */
-#include "../../../probes/define_trace.h"
+#include <probes/define_trace.h>