X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fworkqueue.h;h=0f5b9386f750029dfbeb3723864717d28bf5cc69;hb=a4550c96fcf5939a607efcd1c01e93f7dcbb6610;hp=ed4ee47176aa7fff48d2f6a7655ff90eb6447bdd;hpb=fa91fcac4c680df04d6860ff365976d8ad08559b;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/workqueue.h b/instrumentation/events/lttng-module/workqueue.h index ed4ee471..0f5b9386 100644 --- a/instrumentation/events/lttng-module/workqueue.h +++ b/instrumentation/events/lttng-module/workqueue.h @@ -1,10 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #undef TRACE_SYSTEM #define TRACE_SYSTEM workqueue #if !defined(LTTNG_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_WORKQUEUE_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -95,6 +96,26 @@ LTTNG_TRACEPOINT_EVENT(workqueue_execute_start, ) ) +#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 @@ -107,6 +128,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(workqueue_work, workqueue_execute_end, TP_ARGS(work) ) +#endif #else @@ -168,4 +190,4 @@ LTTNG_TRACEPOINT_EVENT(workqueue_destruction, #endif /* LTTNG_TRACE_WORKQUEUE_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include