Skip to content

Commit d6a7bbd

Browse files
Kassey Lihtejun
authored andcommitted
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 <[email protected]> Reviewed-by: Steven Rostedt (Google) <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 7920259 commit d6a7bbd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/trace/events/workqueue.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,15 @@ TRACE_EVENT(workqueue_activate_work,
6464

6565
TP_STRUCT__entry(
6666
__field( void *, work )
67+
__field( void *, function)
6768
),
6869

6970
TP_fast_assign(
7071
__entry->work = work;
72+
__entry->function = work->func;
7173
),
7274

73-
TP_printk("work struct %p", __entry->work)
75+
TP_printk("work struct %p function=%ps ", __entry->work, __entry->function)
7476
);
7577

7678
/**

0 commit comments

Comments
 (0)