1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #define TRACE_SYSTEM sched
5 #if !defined(LTTNG_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_SCHED_H
8 #include <lttng/tracepoint-event.h>
9 #include <linux/sched.h>
10 #include <linux/pid_namespace.h>
11 #include <linux/binfmts.h>
12 #include <lttng/kernel-version.h>
13 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
14 #include <linux/sched/rt.h>
17 #define LTTNG_MAX_PID_NS_LEVEL 32
19 #ifndef _TRACE_SCHED_DEF_
20 #define _TRACE_SCHED_DEF_
22 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
24 static inline long __trace_sched_switch_state(bool preempt
,
25 unsigned int prev_state
,
26 struct task_struct
*p
)
30 #ifdef CONFIG_SCHED_DEBUG
32 #endif /* CONFIG_SCHED_DEBUG */
35 * Preemption ignores task state, therefore preempted tasks are always
36 * RUNNING (we will not have dequeued if state != RUNNING).
39 return TASK_REPORT_MAX
;
42 * task_state_index() uses fls() and returns a value from 0-8 range.
43 * Decrement it by 1 (except TASK_RUNNING state i.e 0) before using
44 * it for left shift operation to get the correct task->state
47 state
= __task_state_index(prev_state
, p
->exit_state
);
49 return state
? (1 << (state
- 1)) : state
;
52 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
54 static inline long __trace_sched_switch_state(bool preempt
, struct task_struct
*p
)
58 #ifdef CONFIG_SCHED_DEBUG
60 #endif /* CONFIG_SCHED_DEBUG */
63 * Preemption ignores task state, therefore preempted tasks are always
64 * RUNNING (we will not have dequeued if state != RUNNING).
67 return TASK_REPORT_MAX
;
70 * task_state_index() uses fls() and returns a value from 0-8 range.
71 * Decrement it by 1 (except TASK_RUNNING state i.e 0) before using
72 * it for left shift operation to get the correct task->state
75 state
= task_state_index(p
);
77 return state
? (1 << (state
- 1)) : state
;
80 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
82 static inline long __trace_sched_switch_state(bool preempt
, struct task_struct
*p
)
86 #ifdef CONFIG_SCHED_DEBUG
88 #endif /* CONFIG_SCHED_DEBUG */
91 * Preemption ignores task state, therefore preempted tasks are always
92 * RUNNING (we will not have dequeued if state != RUNNING).
95 return TASK_REPORT_MAX
;
98 * __get_task_state() uses fls() and returns a value from 0-8 range.
99 * Decrement it by 1 (except TASK_RUNNING state i.e 0) before using
100 * it for left shift operation to get the correct task->state
103 state
= __get_task_state(p
);
105 return state
? (1 << (state
- 1)) : state
;
108 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,4,0))
110 static inline long __trace_sched_switch_state(bool preempt
, struct task_struct
*p
)
112 #ifdef CONFIG_SCHED_DEBUG
113 BUG_ON(p
!= current
);
114 #endif /* CONFIG_SCHED_DEBUG */
116 * Preemption ignores task state, therefore preempted tasks are always RUNNING
117 * (we will not have dequeued if state != RUNNING).
119 return preempt
? TASK_RUNNING
| TASK_STATE_MAX
: p
->state
;
122 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0))
124 static inline long __trace_sched_switch_state(struct task_struct
*p
)
126 long state
= p
->state
;
128 #ifdef CONFIG_PREEMPT
129 #ifdef CONFIG_SCHED_DEBUG
130 BUG_ON(p
!= current
);
131 #endif /* CONFIG_SCHED_DEBUG */
133 * For all intents and purposes a preempted task is a running task.
135 if (preempt_count() & PREEMPT_ACTIVE
)
136 state
= TASK_RUNNING
| TASK_STATE_MAX
;
137 #endif /* CONFIG_PREEMPT */
142 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,13,0))
144 static inline long __trace_sched_switch_state(struct task_struct
*p
)
146 long state
= p
->state
;
148 #ifdef CONFIG_PREEMPT
150 * For all intents and purposes a preempted task is a running task.
152 if (task_preempt_count(p
) & PREEMPT_ACTIVE
)
153 state
= TASK_RUNNING
| TASK_STATE_MAX
;
159 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,2,0))
161 static inline long __trace_sched_switch_state(struct task_struct
*p
)
163 long state
= p
->state
;
165 #ifdef CONFIG_PREEMPT
167 * For all intents and purposes a preempted task is a running task.
169 if (task_thread_info(p
)->preempt_count
& PREEMPT_ACTIVE
)
170 state
= TASK_RUNNING
| TASK_STATE_MAX
;
178 static inline long __trace_sched_switch_state(struct task_struct
*p
)
180 long state
= p
->state
;
182 #ifdef CONFIG_PREEMPT
184 * For all intents and purposes a preempted task is a running task.
186 if (task_thread_info(p
)->preempt_count
& PREEMPT_ACTIVE
)
187 state
= TASK_RUNNING
;
195 #endif /* _TRACE_SCHED_DEF_ */
197 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
199 * Enumeration of the task state bitmask.
200 * Only bit flags are enumerated here, not composition of states.
202 LTTNG_TRACEPOINT_ENUM(task_state
,
204 ctf_enum_value("TASK_RUNNING", TASK_RUNNING
)
205 ctf_enum_value("TASK_INTERRUPTIBLE", TASK_INTERRUPTIBLE
)
206 ctf_enum_value("TASK_UNINTERRUPTIBLE", TASK_UNINTERRUPTIBLE
)
207 ctf_enum_value("TASK_STOPPED", __TASK_STOPPED
)
208 ctf_enum_value("TASK_TRACED", __TASK_TRACED
)
209 ctf_enum_value("EXIT_DEAD", EXIT_DEAD
)
210 ctf_enum_value("EXIT_ZOMBIE", EXIT_ZOMBIE
)
212 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
213 ctf_enum_value("TASK_PARKED", TASK_PARKED
)
214 #endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0)) */
216 ctf_enum_value("TASK_DEAD", TASK_DEAD
)
217 ctf_enum_value("TASK_WAKEKILL", TASK_WAKEKILL
)
218 ctf_enum_value("TASK_WAKING", TASK_WAKING
)
220 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0))
221 ctf_enum_value("TASK_NOLOAD", TASK_NOLOAD
)
222 #endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
224 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
225 ctf_enum_value("TASK_NEW", TASK_NEW
)
226 #endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0)) */
228 ctf_enum_value("TASK_STATE_MAX", TASK_STATE_MAX
)
231 #endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */
234 * Tracepoint for calling kthread_stop, performed to end a kthread:
236 LTTNG_TRACEPOINT_EVENT(sched_kthread_stop
,
238 TP_PROTO(struct task_struct
*t
),
243 ctf_array_text(char, comm
, t
->comm
, TASK_COMM_LEN
)
244 ctf_integer(pid_t
, tid
, t
->pid
)
249 * Tracepoint for the return value of the kthread stopping:
251 LTTNG_TRACEPOINT_EVENT(sched_kthread_stop_ret
,
258 ctf_integer(int, ret
, ret
)
263 * Tracepoint for waking up a task:
265 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0) || \
266 LTTNG_RT_KERNEL_RANGE(4,1,10,11, 4,2,0,0) || \
267 LTTNG_RT_KERNEL_RANGE(3,18,27,26, 3,19,0,0) || \
268 LTTNG_RT_KERNEL_RANGE(3,14,61,63, 3,15,0,0) || \
269 LTTNG_RT_KERNEL_RANGE(3,12,54,73, 3,13,0,0) || \
270 LTTNG_RT_KERNEL_RANGE(3,10,97,106, 3,11,0,0) || \
271 LTTNG_RT_KERNEL_RANGE(3,4,110,139, 3,5,0,0) || \
272 LTTNG_RT_KERNEL_RANGE(3,2,77,111, 3,3,0,0))
273 LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template
,
275 TP_PROTO(struct task_struct
*p
),
280 ctf_array_text(char, comm
, p
->comm
, TASK_COMM_LEN
)
281 ctf_integer(pid_t
, tid
, p
->pid
)
282 ctf_integer(int, prio
, p
->prio
- MAX_RT_PRIO
)
283 ctf_integer(int, target_cpu
, task_cpu(p
))
286 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
287 LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template
,
289 TP_PROTO(struct task_struct
*p
, int success
),
294 ctf_array_text(char, comm
, p
->comm
, TASK_COMM_LEN
)
295 ctf_integer(pid_t
, tid
, p
->pid
)
296 ctf_integer(int, prio
, p
->prio
- MAX_RT_PRIO
)
297 ctf_integer(int, success
, success
)
298 ctf_integer(int, target_cpu
, task_cpu(p
))
301 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
303 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0) || \
304 LTTNG_RT_KERNEL_RANGE(4,1,10,11, 4,2,0,0) || \
305 LTTNG_RT_KERNEL_RANGE(3,18,27,26, 3,19,0,0) || \
306 LTTNG_RT_KERNEL_RANGE(3,14,61,63, 3,15,0,0) || \
307 LTTNG_RT_KERNEL_RANGE(3,12,54,73, 3,13,0,0) || \
308 LTTNG_RT_KERNEL_RANGE(3,10,97,106, 3,11,0,0) || \
309 LTTNG_RT_KERNEL_RANGE(3,4,110,139, 3,5,0,0) || \
310 LTTNG_RT_KERNEL_RANGE(3,2,77,111, 3,3,0,0))
313 * Tracepoint called when waking a task; this tracepoint is guaranteed to be
314 * called from the waking context.
316 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template
, sched_waking
,
317 TP_PROTO(struct task_struct
*p
),
321 * Tracepoint called when the task is actually woken; p->state == TASK_RUNNNG.
322 * It it not always called from the waking context.
324 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template
, sched_wakeup
,
325 TP_PROTO(struct task_struct
*p
),
329 * Tracepoint for waking up a new task:
331 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template
, sched_wakeup_new
,
332 TP_PROTO(struct task_struct
*p
),
337 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template
, sched_wakeup
,
338 TP_PROTO(struct task_struct
*p
, int success
),
342 * Tracepoint for waking up a new task:
344 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template
, sched_wakeup_new
,
345 TP_PROTO(struct task_struct
*p
, int success
),
348 #endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
351 * Tracepoint for task switches, performed by the scheduler:
354 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
355 LTTNG_TRACEPOINT_EVENT(sched_switch
,
357 TP_PROTO(bool preempt
,
358 struct task_struct
*prev
,
359 struct task_struct
*next
,
360 unsigned int prev_state
),
362 TP_ARGS(preempt
, prev
, next
, prev_state
),
365 ctf_array_text(char, prev_comm
, prev
->comm
, TASK_COMM_LEN
)
366 ctf_integer(pid_t
, prev_tid
, prev
->pid
)
367 ctf_integer(int, prev_prio
, prev
->prio
- MAX_RT_PRIO
)
368 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
369 ctf_enum(task_state
, long, prev_state
, __trace_sched_switch_state(preempt
, prev_state
, prev
))
371 ctf_integer(long, prev_state
, __trace_sched_switch_state(preempt
, prev_state
, prev
))
373 ctf_array_text(char, next_comm
, next
->comm
, TASK_COMM_LEN
)
374 ctf_integer(pid_t
, next_tid
, next
->pid
)
375 ctf_integer(int, next_prio
, next
->prio
- MAX_RT_PRIO
)
379 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,4,0))
381 LTTNG_TRACEPOINT_EVENT(sched_switch
,
383 TP_PROTO(bool preempt
,
384 struct task_struct
*prev
,
385 struct task_struct
*next
),
387 TP_ARGS(preempt
, prev
, next
),
390 ctf_array_text(char, prev_comm
, prev
->comm
, TASK_COMM_LEN
)
391 ctf_integer(pid_t
, prev_tid
, prev
->pid
)
392 ctf_integer(int, prev_prio
, prev
->prio
- MAX_RT_PRIO
)
393 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
394 ctf_enum(task_state
, long, prev_state
, __trace_sched_switch_state(preempt
, prev
))
396 ctf_integer(long, prev_state
, __trace_sched_switch_state(preempt
, prev
))
398 ctf_array_text(char, next_comm
, next
->comm
, TASK_COMM_LEN
)
399 ctf_integer(pid_t
, next_tid
, next
->pid
)
400 ctf_integer(int, next_prio
, next
->prio
- MAX_RT_PRIO
)
406 LTTNG_TRACEPOINT_EVENT(sched_switch
,
408 TP_PROTO(struct task_struct
*prev
,
409 struct task_struct
*next
),
414 ctf_array_text(char, prev_comm
, prev
->comm
, TASK_COMM_LEN
)
415 ctf_integer(pid_t
, prev_tid
, prev
->pid
)
416 ctf_integer(int, prev_prio
, prev
->prio
- MAX_RT_PRIO
)
417 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
418 ctf_enum(task_state
, long, prev_state
, __trace_sched_switch_state(prev
))
420 ctf_integer(long, prev_state
, __trace_sched_switch_state(prev
))
422 ctf_array_text(char, next_comm
, next
->comm
, TASK_COMM_LEN
)
423 ctf_integer(pid_t
, next_tid
, next
->pid
)
424 ctf_integer(int, next_prio
, next
->prio
- MAX_RT_PRIO
)
430 * Tracepoint for a task being migrated:
432 LTTNG_TRACEPOINT_EVENT(sched_migrate_task
,
434 TP_PROTO(struct task_struct
*p
, int dest_cpu
),
436 TP_ARGS(p
, dest_cpu
),
439 ctf_array_text(char, comm
, p
->comm
, TASK_COMM_LEN
)
440 ctf_integer(pid_t
, tid
, p
->pid
)
441 ctf_integer(int, prio
, p
->prio
- MAX_RT_PRIO
)
442 ctf_integer(int, orig_cpu
, task_cpu(p
))
443 ctf_integer(int, dest_cpu
, dest_cpu
)
447 LTTNG_TRACEPOINT_EVENT_CLASS(sched_process_template
,
449 TP_PROTO(struct task_struct
*p
),
454 ctf_array_text(char, comm
, p
->comm
, TASK_COMM_LEN
)
455 ctf_integer(pid_t
, tid
, p
->pid
)
456 ctf_integer(int, prio
, p
->prio
- MAX_RT_PRIO
)
461 * Tracepoint for freeing a task:
463 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_process_template
, sched_process_free
,
464 TP_PROTO(struct task_struct
*p
),
469 * Tracepoint for a task exiting:
471 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_process_template
, sched_process_exit
,
472 TP_PROTO(struct task_struct
*p
),
476 * Tracepoint for waiting on task to unschedule:
478 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_process_template
, sched_wait_task
,
479 TP_PROTO(struct task_struct
*p
),
483 * Tracepoint for a waiting task:
485 LTTNG_TRACEPOINT_EVENT(sched_process_wait
,
487 TP_PROTO(struct pid
*pid
),
492 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
493 ctf_integer(pid_t
, tid
, pid_nr(pid
))
494 ctf_integer(int, prio
, current
->prio
- MAX_RT_PRIO
)
499 * Tracepoint for do_fork.
500 * Saving both TID and PID information, especially for the child, allows
501 * trace analyzers to distinguish between creation of a new process and
502 * creation of a new thread. Newly created processes will have child_tid
503 * == child_pid, while creation of a thread yields to child_tid !=
506 LTTNG_TRACEPOINT_EVENT_CODE(sched_process_fork
,
508 TP_PROTO(struct task_struct
*parent
, struct task_struct
*child
),
510 TP_ARGS(parent
, child
),
513 pid_t vtids
[LTTNG_MAX_PID_NS_LEVEL
];
514 unsigned int ns_level
;
519 struct pid
*child_pid
;
522 child_pid
= task_pid(child
);
523 tp_locvar
->ns_level
=
524 min_t(unsigned int, child_pid
->level
+ 1,
525 LTTNG_MAX_PID_NS_LEVEL
);
526 for (i
= 0; i
< tp_locvar
->ns_level
; i
++)
527 tp_locvar
->vtids
[i
] = child_pid
->numbers
[i
].nr
;
532 ctf_array_text(char, parent_comm
, parent
->comm
, TASK_COMM_LEN
)
533 ctf_integer(pid_t
, parent_tid
, parent
->pid
)
534 ctf_integer(pid_t
, parent_pid
, parent
->tgid
)
535 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
536 ctf_integer(unsigned int, parent_ns_inum
,
538 unsigned int parent_ns_inum
= 0;
541 struct pid_namespace
*pid_ns
;
543 pid_ns
= task_active_pid_ns(parent
);
551 ctf_array_text(char, child_comm
, child
->comm
, TASK_COMM_LEN
)
552 ctf_integer(pid_t
, child_tid
, child
->pid
)
553 ctf_sequence(pid_t
, vtids
, tp_locvar
->vtids
, u8
, tp_locvar
->ns_level
)
554 ctf_integer(pid_t
, child_pid
, child
->tgid
)
555 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
556 ctf_integer(unsigned int, child_ns_inum
,
558 unsigned int child_ns_inum
= 0;
561 struct pid_namespace
*pid_ns
;
563 pid_ns
= task_active_pid_ns(child
);
576 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
578 * Tracepoint for exec:
580 LTTNG_TRACEPOINT_EVENT(sched_process_exec
,
582 TP_PROTO(struct task_struct
*p
, pid_t old_pid
,
583 struct linux_binprm
*bprm
),
585 TP_ARGS(p
, old_pid
, bprm
),
588 ctf_string(filename
, bprm
->filename
)
589 ctf_integer(pid_t
, tid
, p
->pid
)
590 ctf_integer(pid_t
, old_tid
, old_pid
)
596 * XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE
597 * adding sched_stat support to SCHED_FIFO/RR would be welcome.
599 LTTNG_TRACEPOINT_EVENT_CLASS(sched_stat_template
,
601 TP_PROTO(struct task_struct
*tsk
, u64 delay
),
606 ctf_array_text(char, comm
, tsk
->comm
, TASK_COMM_LEN
)
607 ctf_integer(pid_t
, tid
, tsk
->pid
)
608 ctf_integer(u64
, delay
, delay
)
614 * Tracepoint for accounting wait time (time the task is runnable
615 * but not actually running due to scheduler contention).
617 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template
, sched_stat_wait
,
618 TP_PROTO(struct task_struct
*tsk
, u64 delay
),
622 * Tracepoint for accounting sleep time (time the task is not runnable,
623 * including iowait, see below).
625 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template
, sched_stat_sleep
,
626 TP_PROTO(struct task_struct
*tsk
, u64 delay
),
630 * Tracepoint for accounting iowait time (time the task is not runnable
631 * due to waiting on IO to complete).
633 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template
, sched_stat_iowait
,
634 TP_PROTO(struct task_struct
*tsk
, u64 delay
),
637 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
639 * Tracepoint for accounting blocked time (time the task is in uninterruptible).
641 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template
, sched_stat_blocked
,
642 TP_PROTO(struct task_struct
*tsk
, u64 delay
),
647 * Tracepoint for accounting runtime (time the task is executing
650 LTTNG_TRACEPOINT_EVENT(sched_stat_runtime
,
652 TP_PROTO(struct task_struct
*tsk
, u64 runtime
, u64 vruntime
),
654 TP_ARGS(tsk
, runtime
, vruntime
),
657 ctf_array_text(char, comm
, tsk
->comm
, TASK_COMM_LEN
)
658 ctf_integer(pid_t
, tid
, tsk
->pid
)
659 ctf_integer(u64
, runtime
, runtime
)
660 ctf_integer(u64
, vruntime
, vruntime
)
664 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0) || \
665 LTTNG_RT_KERNEL_RANGE(4,9,27,18, 4,10,0,0) || \
666 LTTNG_RT_KERNEL_RANGE(4,11,5,1, 4,12,0,0))
668 * Tracepoint for showing priority inheritance modifying a tasks
671 LTTNG_TRACEPOINT_EVENT(sched_pi_setprio
,
673 TP_PROTO(struct task_struct
*tsk
, struct task_struct
*pi_task
),
675 TP_ARGS(tsk
, pi_task
),
678 ctf_array_text(char, comm
, tsk
->comm
, TASK_COMM_LEN
)
679 ctf_integer(pid_t
, tid
, tsk
->pid
)
680 ctf_integer(int, oldprio
, tsk
->prio
- MAX_RT_PRIO
)
681 ctf_integer(int, newprio
, pi_task
? pi_task
->prio
- MAX_RT_PRIO
: tsk
->prio
- MAX_RT_PRIO
)
686 * Tracepoint for showing priority inheritance modifying a tasks
689 LTTNG_TRACEPOINT_EVENT(sched_pi_setprio
,
691 TP_PROTO(struct task_struct
*tsk
, int newprio
),
693 TP_ARGS(tsk
, newprio
),
696 ctf_array_text(char, comm
, tsk
->comm
, TASK_COMM_LEN
)
697 ctf_integer(pid_t
, tid
, tsk
->pid
)
698 ctf_integer(int, oldprio
, tsk
->prio
- MAX_RT_PRIO
)
699 ctf_integer(int, newprio
, newprio
- MAX_RT_PRIO
)
704 #endif /* LTTNG_TRACE_SCHED_H */
706 /* This part must be outside protection */
707 #include <lttng/define_trace.h>
This page took 0.059444 seconds and 4 git commands to generate.