Skip to content

workqueue_tracepoint: Add worklet tracepoints for worklet lifecycle tracing

Zhaolei lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 25 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4workqueue_tracepoint: introduce workqueue_handler_exit tracepoint and rename workqueue_execution to workqueue_handler_entryinclude/trace/events/workqueue.h kernel/trace/trace_workqueue.c kernel/workqueue.c+37 -120 replies
2/4workqueue_tracepoint: Add workqueue_flush and worklet_cancel tracepointinclude/trace/events/workqueue.h kernel/workqueue.c+40 -00 replies
3/4workqueue_tracepoint: Change tracepoint name to fit worklet and workqueue lifecycleinclude/trace/events/workqueue.h kernel/trace/trace_workqueue.c kernel/workqueue.c+16 -170 replies
4/4workqueue_trace: Separate worklet_insertion into worklet_enqueue and worklet_enqueue_delayedinclude/trace/events/workqueue.h kernel/trace/trace_workqueue.c kernel/workqueue.c+88 -260 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] workqueue_tracepoint: Add worklet tracepoints for worklet lifecycle tracing
Quoted 19 lines · Ingo Molnar

...
Basically, i'd suggest the following complete set of events instead:

TRACE_EVENT(workqueue_create
TRACE_EVENT(workqueue_flush /* NEW */
TRACE_EVENT(workqueue_destroy

TRACE_EVENT(worklet_enqueue /* NEW */
TRACE_EVENT(worklet_enqueue_delayed /* NEW */

TRACE_EVENT(worklet_execute /* instead of workqueue_execution */
TRACE_EVENT(worklet_complete /* NEW */

TRACE_EVENT(worklet_cancel /* NEW */

This allows the understanding of the life cycle of a workqueue and of worklets that enter that workqueue. Note the distinction between workqueue and worklet (work) - that is essential.

Quoted 9 lines

The parameters of the events are obvious, with one detail: i'd suggest a 'cpu' parameter to the enqueue events, to allow the mapping of the _on(..cpu) variants too.

I would not bother with schedule_on_each_cpu() instrumentation - it's rarely used.

Ingo

Hello, Ingo

These patchs add tracepoints for per-worklet tracing.
Now we have enough tracepoints to start makeing trace_workqueue.c support worklet time mesurement.

Thanks
Zhaolei