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

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

Version: ~ [ linux-4.17-rc1 ] ~ [ linux-4.16.2 ] ~ [ linux-4.15.17 ] ~ [ linux-4.14.34 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.94 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.128 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.51 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.105 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.56 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.101 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.27.62 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ 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 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 
 28 /**
 29  * workqueue_queue_work - called when a work gets queued
 30  * @req_cpu:    the requested cpu
 31  * @pwq:        pointer to struct pool_workqueue
 32  * @work:       pointer to struct work_struct
 33  *
 34  * This event occurs when a work is queued immediately or once a
 35  * delayed work is actually queued on a workqueue (ie: once the delay
 36  * has been reached).
 37  */
 38 TRACE_EVENT(workqueue_queue_work,
 39 
 40         TP_PROTO(unsigned int req_cpu, struct pool_workqueue *pwq,
 41                  struct work_struct *work),
 42 
 43         TP_ARGS(req_cpu, pwq, work),
 44 
 45         TP_STRUCT__entry(
 46                 __field( void *,        work    )
 47                 __field( void *,        function)
 48                 __field( void *,        workqueue)
 49                 __field( unsigned int,  req_cpu )
 50                 __field( unsigned int,  cpu     )
 51         ),
 52 
 53         TP_fast_assign(
 54                 __entry->work           = work;
 55                 __entry->function       = work->func;
 56                 __entry->workqueue      = pwq->wq;
 57                 __entry->req_cpu        = req_cpu;
 58                 __entry->cpu            = pwq->pool->cpu;
 59         ),
 60 
 61         TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u",
 62                   __entry->work, __entry->function, __entry->workqueue,
 63                   __entry->req_cpu, __entry->cpu)
 64 );
 65 
 66 /**
 67  * workqueue_activate_work - called when a work gets activated
 68  * @work:       pointer to struct work_struct
 69  *
 70  * This event occurs when a queued work is put on the active queue,
 71  * which happens immediately after queueing unless @max_active limit
 72  * is reached.
 73  */
 74 DEFINE_EVENT(workqueue_work, workqueue_activate_work,
 75 
 76         TP_PROTO(struct work_struct *work),
 77 
 78         TP_ARGS(work)
 79 );
 80 
 81 /**
 82  * workqueue_execute_start - called immediately before the workqueue callback
 83  * @work:       pointer to struct work_struct
 84  *
 85  * Allows to track workqueue execution.
 86  */
 87 TRACE_EVENT(workqueue_execute_start,
 88 
 89         TP_PROTO(struct work_struct *work),
 90 
 91         TP_ARGS(work),
 92 
 93         TP_STRUCT__entry(
 94                 __field( void *,        work    )
 95                 __field( void *,        function)
 96         ),
 97 
 98         TP_fast_assign(
 99                 __entry->work           = work;
100                 __entry->function       = work->func;
101         ),
102 
103         TP_printk("work struct %p: function %pf", __entry->work, __entry->function)
104 );
105 
106 /**
107  * workqueue_execute_end - called immediately after the workqueue callback
108  * @work:       pointer to struct work_struct
109  *
110  * Allows to track workqueue execution.
111  */
112 DEFINE_EVENT(workqueue_work, workqueue_execute_end,
113 
114         TP_PROTO(struct work_struct *work),
115 
116         TP_ARGS(work)
117 );
118 
119 #endif /*  _TRACE_WORKQUEUE_H */
120 
121 /* This part must be outside protection */
122 #include <trace/define_trace.h>
123 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp