added 2.6.29.6 aldebaran kernel
[nao-ulib.git] / kernel / 2.6.29.6-aldebaran-rt / include / trace / sched_event_types.h
blob6a81b3424b9bb61f53c12bf046b480c0f96b0f8e
2 /* use <trace/sched.h> instead */
3 #ifndef TRACE_EVENT
4 # error Do not include this file directly.
5 # error Unless you know what you are doing.
6 #endif
8 #undef TRACE_SYSTEM
9 #define TRACE_SYSTEM sched
12 * Tracepoint for calling kthread_stop, performed to end a kthread:
14 TRACE_EVENT(sched_kthread_stop,
16 TP_PROTO(struct task_struct *t),
18 TP_ARGS(t),
20 TP_STRUCT__entry(
21 __array( char, comm, TASK_COMM_LEN )
22 __field( pid_t, pid )
25 TP_fast_assign(
26 memcpy(__entry->comm, t->comm, TASK_COMM_LEN);
27 __entry->pid = t->pid;
30 TP_printk("task %s:%d", __entry->comm, __entry->pid)
34 * Tracepoint for the return value of the kthread stopping:
36 TRACE_EVENT(sched_kthread_stop_ret,
38 TP_PROTO(int ret),
40 TP_ARGS(ret),
42 TP_STRUCT__entry(
43 __field( int, ret )
46 TP_fast_assign(
47 __entry->ret = ret;
50 TP_printk("ret %d", __entry->ret)
54 * Tracepoint for waiting on task to unschedule:
56 * (NOTE: the 'rq' argument is not used by generic trace events,
57 * but used by the latency tracer plugin. )
59 TRACE_EVENT(sched_wait_task,
61 TP_PROTO(struct rq *rq, struct task_struct *p),
63 TP_ARGS(rq, p),
65 TP_STRUCT__entry(
66 __array( char, comm, TASK_COMM_LEN )
67 __field( pid_t, pid )
68 __field( int, prio )
71 TP_fast_assign(
72 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
73 __entry->pid = p->pid;
74 __entry->prio = p->prio;
77 TP_printk("task %s:%d [%d]",
78 __entry->comm, __entry->pid, __entry->prio)
82 * Tracepoint for waking up a task:
84 * (NOTE: the 'rq' argument is not used by generic trace events,
85 * but used by the latency tracer plugin. )
87 TRACE_EVENT(sched_wakeup,
89 TP_PROTO(struct rq *rq, struct task_struct *p, int success),
91 TP_ARGS(rq, p, success),
93 TP_STRUCT__entry(
94 __array( char, comm, TASK_COMM_LEN )
95 __field( pid_t, pid )
96 __field( int, prio )
97 __field( int, success )
100 TP_fast_assign(
101 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
102 __entry->pid = p->pid;
103 __entry->prio = p->prio;
104 __entry->success = success;
107 TP_printk("task %s:%d [%d] success=%d",
108 __entry->comm, __entry->pid, __entry->prio,
109 __entry->success)
113 * Tracepoint for waking up a new task:
115 * (NOTE: the 'rq' argument is not used by generic trace events,
116 * but used by the latency tracer plugin. )
118 TRACE_EVENT(sched_wakeup_new,
120 TP_PROTO(struct rq *rq, struct task_struct *p, int success),
122 TP_ARGS(rq, p, success),
124 TP_STRUCT__entry(
125 __array( char, comm, TASK_COMM_LEN )
126 __field( pid_t, pid )
127 __field( int, prio )
128 __field( int, success )
131 TP_fast_assign(
132 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
133 __entry->pid = p->pid;
134 __entry->prio = p->prio;
135 __entry->success = success;
138 TP_printk("task %s:%d [%d] success=%d",
139 __entry->comm, __entry->pid, __entry->prio,
140 __entry->success)
144 * Tracepoint for task switches, performed by the scheduler:
146 * (NOTE: the 'rq' argument is not used by generic trace events,
147 * but used by the latency tracer plugin. )
149 TRACE_EVENT(sched_switch,
151 TP_PROTO(struct rq *rq, struct task_struct *prev,
152 struct task_struct *next),
154 TP_ARGS(rq, prev, next),
156 TP_STRUCT__entry(
157 __array( char, prev_comm, TASK_COMM_LEN )
158 __field( pid_t, prev_pid )
159 __field( int, prev_prio )
160 __array( char, next_comm, TASK_COMM_LEN )
161 __field( pid_t, next_pid )
162 __field( int, next_prio )
165 TP_fast_assign(
166 memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN);
167 __entry->prev_pid = prev->pid;
168 __entry->prev_prio = prev->prio;
169 memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
170 __entry->next_pid = next->pid;
171 __entry->next_prio = next->prio;
174 TP_printk("task %s:%d [%d] ==> %s:%d [%d]",
175 __entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
176 __entry->next_comm, __entry->next_pid, __entry->next_prio)
180 * Tracepoint for a task being migrated:
182 TRACE_EVENT(sched_migrate_task,
184 TP_PROTO(struct task_struct *p, int orig_cpu, int dest_cpu),
186 TP_ARGS(p, orig_cpu, dest_cpu),
188 TP_STRUCT__entry(
189 __array( char, comm, TASK_COMM_LEN )
190 __field( pid_t, pid )
191 __field( int, prio )
192 __field( int, orig_cpu )
193 __field( int, dest_cpu )
196 TP_fast_assign(
197 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
198 __entry->pid = p->pid;
199 __entry->prio = p->prio;
200 __entry->orig_cpu = orig_cpu;
201 __entry->dest_cpu = dest_cpu;
204 TP_printk("task %s:%d [%d] from: %d to: %d",
205 __entry->comm, __entry->pid, __entry->prio,
206 __entry->orig_cpu, __entry->dest_cpu)
210 * Tracepoint for freeing a task:
212 TRACE_EVENT(sched_process_free,
214 TP_PROTO(struct task_struct *p),
216 TP_ARGS(p),
218 TP_STRUCT__entry(
219 __array( char, comm, TASK_COMM_LEN )
220 __field( pid_t, pid )
221 __field( int, prio )
224 TP_fast_assign(
225 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
226 __entry->pid = p->pid;
227 __entry->prio = p->prio;
230 TP_printk("task %s:%d [%d]",
231 __entry->comm, __entry->pid, __entry->prio)
235 * Tracepoint for a task exiting:
237 TRACE_EVENT(sched_process_exit,
239 TP_PROTO(struct task_struct *p),
241 TP_ARGS(p),
243 TP_STRUCT__entry(
244 __array( char, comm, TASK_COMM_LEN )
245 __field( pid_t, pid )
246 __field( int, prio )
249 TP_fast_assign(
250 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
251 __entry->pid = p->pid;
252 __entry->prio = p->prio;
255 TP_printk("task %s:%d [%d]",
256 __entry->comm, __entry->pid, __entry->prio)
260 * Tracepoint for priority boosting/deboosting of a task:
262 * (NOTE: the 'rq' argument is not used by generic trace events,
263 * but used by the latency tracer plugin. )
265 TRACE_EVENT(sched_task_setprio,
267 TP_PROTO(struct rq *rq, struct task_struct *p, int oldprio),
269 TP_ARGS(rq, p, oldprio),
271 TP_STRUCT__entry(
272 __array( char, comm, TASK_COMM_LEN )
273 __field( pid_t, pid )
274 __field( int, prio )
275 __field( int, oldprio )
278 TP_fast_assign(
279 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
280 __entry->pid = p->pid;
281 __entry->prio = p->prio;
282 __entry->oldprio = oldprio;
285 TP_printk("task %s:%d [%d] oldprio=%d",
286 __entry->comm, __entry->pid, __entry->prio,
287 __entry->oldprio)
291 * Tracepoint for a waiting task:
293 TRACE_EVENT(sched_process_wait,
295 TP_PROTO(struct pid *pid),
297 TP_ARGS(pid),
299 TP_STRUCT__entry(
300 __array( char, comm, TASK_COMM_LEN )
301 __field( pid_t, pid )
302 __field( int, prio )
305 TP_fast_assign(
306 memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
307 __entry->pid = pid_nr(pid);
308 __entry->prio = current->prio;
311 TP_printk("task %s:%d [%d]",
312 __entry->comm, __entry->pid, __entry->prio)
316 * Tracepoint for do_fork:
318 TRACE_EVENT(sched_process_fork,
320 TP_PROTO(struct task_struct *parent, struct task_struct *child),
322 TP_ARGS(parent, child),
324 TP_STRUCT__entry(
325 __array( char, parent_comm, TASK_COMM_LEN )
326 __field( pid_t, parent_pid )
327 __array( char, child_comm, TASK_COMM_LEN )
328 __field( pid_t, child_pid )
331 TP_fast_assign(
332 memcpy(__entry->parent_comm, parent->comm, TASK_COMM_LEN);
333 __entry->parent_pid = parent->pid;
334 memcpy(__entry->child_comm, child->comm, TASK_COMM_LEN);
335 __entry->child_pid = child->pid;
338 TP_printk("parent %s:%d child %s:%d",
339 __entry->parent_comm, __entry->parent_pid,
340 __entry->child_comm, __entry->child_pid)
344 * Tracepoint for sending a signal:
346 TRACE_EVENT(sched_signal_send,
348 TP_PROTO(int sig, struct task_struct *p),
350 TP_ARGS(sig, p),
352 TP_STRUCT__entry(
353 __field( int, sig )
354 __array( char, comm, TASK_COMM_LEN )
355 __field( pid_t, pid )
358 TP_fast_assign(
359 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
360 __entry->pid = p->pid;
361 __entry->sig = sig;
364 TP_printk("sig: %d task %s:%d",
365 __entry->sig, __entry->comm, __entry->pid)
368 #undef TRACE_SYSTEM