mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] workqueue: add function in event of workqueue_activate_work
@ 2024-03-08  1:09 Kassey Li
  2024-03-08  1:50 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Kassey Li @ 2024-03-08  1:09 UTC (permalink / raw)
  To: rostedt, mhiramat, mathieu.desnoyers, linux-kernel, linux-trace-kernel
  Cc: quic_yingangl

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.

checkpatch.pl will report below error for the space:

	ERROR: space prohibited after that open parenthesis '('
	#28: FILE: include/trace/events/workqueue.h:67:
	+               __field( void *,        function)

	total: 1 errors, 0 warnings, 16 lines checked

fix this error.

Signed-off-by: Kassey Li <quic_yingangl@quicinc.com>
---
 include/trace/events/workqueue.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h
index 262d52021c23..a42c1a293459 100644
--- a/include/trace/events/workqueue.h
+++ b/include/trace/events/workqueue.h
@@ -63,14 +63,16 @@ TRACE_EVENT(workqueue_activate_work,
 	TP_ARGS(work),
 
 	TP_STRUCT__entry(
-		__field( void *,	work	)
+		__field(void *,	work)
+		__field(void *,	function)
 	),
 
 	TP_fast_assign(
 		__entry->work		= work;
+		__entry->function	= work->func;
 	),
 
-	TP_printk("work struct %p", __entry->work)
+	TP_printk("work struct %p function=%ps ", __entry->work, __entry->function)
 );
 
 /**
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-08  2:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08  1:09 [PATCH] workqueue: add function in event of workqueue_activate_work Kassey Li
2024-03-08  1:50 ` Steven Rostedt
2024-03-08  2:20   ` Kassey Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®