hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/include/trace/events/workqueue.h
....@@ -8,23 +8,6 @@
88 #include <linux/tracepoint.h>
99 #include <linux/workqueue.h>
1010
11
-DECLARE_EVENT_CLASS(workqueue_work,
12
-
13
- TP_PROTO(struct work_struct *work),
14
-
15
- TP_ARGS(work),
16
-
17
- TP_STRUCT__entry(
18
- __field( void *, work )
19
- ),
20
-
21
- TP_fast_assign(
22
- __entry->work = work;
23
- ),
24
-
25
- TP_printk("work struct %p", __entry->work)
26
-);
27
-
2811 struct pool_workqueue;
2912
3013 /**
....@@ -60,7 +43,7 @@
6043 __entry->cpu = pwq->pool->cpu;
6144 ),
6245
63
- TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u",
46
+ TP_printk("work struct=%p function=%ps workqueue=%p req_cpu=%u cpu=%u",
6447 __entry->work, __entry->function, __entry->workqueue,
6548 __entry->req_cpu, __entry->cpu)
6649 );
....@@ -73,11 +56,21 @@
7356 * which happens immediately after queueing unless @max_active limit
7457 * is reached.
7558 */
76
-DEFINE_EVENT(workqueue_work, workqueue_activate_work,
59
+TRACE_EVENT(workqueue_activate_work,
7760
7861 TP_PROTO(struct work_struct *work),
7962
80
- TP_ARGS(work)
63
+ TP_ARGS(work),
64
+
65
+ TP_STRUCT__entry(
66
+ __field( void *, work )
67
+ ),
68
+
69
+ TP_fast_assign(
70
+ __entry->work = work;
71
+ ),
72
+
73
+ TP_printk("work struct %p", __entry->work)
8174 );
8275
8376 /**
....@@ -102,20 +95,33 @@
10295 __entry->function = work->func;
10396 ),
10497
105
- TP_printk("work struct %p: function %pf", __entry->work, __entry->function)
98
+ TP_printk("work struct %p: function %ps", __entry->work, __entry->function)
10699 );
107100
108101 /**
109102 * workqueue_execute_end - called immediately after the workqueue callback
110103 * @work: pointer to struct work_struct
104
+ * @function: pointer to worker function
111105 *
112106 * Allows to track workqueue execution.
113107 */
114
-DEFINE_EVENT(workqueue_work, workqueue_execute_end,
108
+TRACE_EVENT(workqueue_execute_end,
115109
116
- TP_PROTO(struct work_struct *work),
110
+ TP_PROTO(struct work_struct *work, work_func_t function),
117111
118
- TP_ARGS(work)
112
+ TP_ARGS(work, function),
113
+
114
+ TP_STRUCT__entry(
115
+ __field( void *, work )
116
+ __field( void *, function)
117
+ ),
118
+
119
+ TP_fast_assign(
120
+ __entry->work = work;
121
+ __entry->function = function;
122
+ ),
123
+
124
+ TP_printk("work struct %p: function %ps", __entry->work, __entry->function)
119125 );
120126
121127 #endif /* _TRACE_WORKQUEUE_H */