Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

workqueue: add function in event of workqueue_activate_work

The trace event "workqueue_activate_work" only print work struct.
However, function is the region of interest in a full sequence of work.
Current workqueue_activate_work trace event output:

workqueue_activate_work: work struct ffffff88b4a0f450

With this change, workqueue_activate_work will print the function name,
align with workqueue_queue_work/execute_start/execute_end event.

workqueue_activate_work: work struct ffffff80413a78b8 function=vmstat_update

Signed-off-by: Kassey Li <quic_yingangl@quicinc.com>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Kassey Li and committed by
Tejun Heo
d6a7bbdd 79202591

+3 -1
+3 -1
include/trace/events/workqueue.h
··· 64 64 65 65 TP_STRUCT__entry( 66 66 __field( void *, work ) 67 + __field( void *, function) 67 68 ), 68 69 69 70 TP_fast_assign( 70 71 __entry->work = work; 72 + __entry->function = work->func; 71 73 ), 72 74 73 - TP_printk("work struct %p", __entry->work) 75 + TP_printk("work struct %p function=%ps ", __entry->work, __entry->function) 74 76 ); 75 77 76 78 /**