~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/trace/events/workqueue.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #undef TRACE_SYSTEM
  3 #define TRACE_SYSTEM workqueue
  4 
  5 #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ)
  6 #define _TRACE_WORKQUEUE_H
  7 
  8 #include <linux/tracepoint.h>
  9 #include <linux/workqueue.h>
 10 
 11 struct pool_workqueue;
 12 
 13 /**
 14  * workqueue_queue_work - called when a work gets queued
 15  * @req_cpu:    the requested cpu
 16  * @pwq:        pointer to struct pool_workqueue
 17  * @work:       pointer to struct work_struct
 18  *
 19  * This event occurs when a work is queued immediately or once a
 20  * delayed work is actually queued on a workqueue (ie: once the delay
 21  * has been reached).
 22  */
 23 TRACE_EVENT(workqueue_queue_work,
 24 
 25         TP_PROTO(int req_cpu, struct pool_workqueue *pwq,
 26                  struct work_struct *work),
 27 
 28         TP_ARGS(req_cpu, pwq, work),
 29 
 30         TP_STRUCT__entry(
 31                 __field( void *,        work    )
 32                 __field( void *,        function)
 33                 __string( workqueue,    pwq->wq->name)
 34                 __field( int,   req_cpu )
 35                 __field( int,   cpu     )
 36         ),
 37 
 38         TP_fast_assign(
 39                 __entry->work           = work;
 40                 __entry->function       = work->func;
 41                 __assign_str(workqueue);
 42                 __entry->req_cpu        = req_cpu;
 43                 __entry->cpu            = pwq->pool->cpu;
 44         ),
 45 
 46         TP_printk("work struct=%p function=%ps workqueue=%s req_cpu=%d cpu=%d",
 47                   __entry->work, __entry->function, __get_str(workqueue),
 48                   __entry->req_cpu, __entry->cpu)
 49 );
 50 
 51 /**
 52  * workqueue_activate_work - called when a work gets activated
 53  * @work:       pointer to struct work_struct
 54  *
 55  * This event occurs when a queued work is put on the active queue,
 56  * which happens immediately after queueing unless @max_active limit
 57  * is reached.
 58  */
 59 TRACE_EVENT(workqueue_activate_work,
 60 
 61         TP_PROTO(struct work_struct *work),
 62 
 63         TP_ARGS(work),
 64 
 65         TP_STRUCT__entry(
 66                 __field( void *,        work    )
 67                 __field( void *,        function)
 68         ),
 69 
 70         TP_fast_assign(
 71                 __entry->work           = work;
 72                 __entry->function       = work->func;
 73         ),
 74 
 75         TP_printk("work struct %p function=%ps ", __entry->work, __entry->function)
 76 );
 77 
 78 /**
 79  * workqueue_execute_start - called immediately before the workqueue callback
 80  * @work:       pointer to struct work_struct
 81  *
 82  * Allows to track workqueue execution.
 83  */
 84 TRACE_EVENT(workqueue_execute_start,
 85 
 86         TP_PROTO(struct work_struct *work),
 87 
 88         TP_ARGS(work),
 89 
 90         TP_STRUCT__entry(
 91                 __field( void *,        work    )
 92                 __field( void *,        function)
 93         ),
 94 
 95         TP_fast_assign(
 96                 __entry->work           = work;
 97                 __entry->function       = work->func;
 98         ),
 99 
100         TP_printk("work struct %p: function %ps", __entry->work, __entry->function)
101 );
102 
103 /**
104  * workqueue_execute_end - called immediately after the workqueue callback
105  * @work:       pointer to struct work_struct
106  * @function:   pointer to worker function
107  *
108  * Allows to track workqueue execution.
109  */
110 TRACE_EVENT(workqueue_execute_end,
111 
112         TP_PROTO(struct work_struct *work, work_func_t function),
113 
114         TP_ARGS(work, function),
115 
116         TP_STRUCT__entry(
117                 __field( void *,        work    )
118                 __field( void *,        function)
119         ),
120 
121         TP_fast_assign(
122                 __entry->work           = work;
123                 __entry->function       = function;
124         ),
125 
126         TP_printk("work struct %p: function %ps", __entry->work, __entry->function)
127 );
128 
129 #endif /*  _TRACE_WORKQUEUE_H */
130 
131 /* This part must be outside protection */
132 #include <trace/define_trace.h>
133 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php