1 /* SPDX-License-Identifier: GPL-2.0 */
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 <probes/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>
16 #include <wrapper/namespace.h>
18 #define LTTNG_MAX_PID_NS_LEVEL 32
20 #ifndef _TRACE_SCHED_DEF_
21 #define _TRACE_SCHED_DEF_
23 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
25 static inline long __trace_sched_switch_state(bool preempt
,
26 unsigned int prev_state
,
27 struct task_struct
*p
)
31 #ifdef CONFIG_SCHED_DEBUG
33 #endif /* CONFIG_SCHED_DEBUG */
36 * Preemption ignores task state, therefore preempted tasks are always
37 * RUNNING (we will not have dequeued if state != RUNNING).
40 return TASK_REPORT_MAX
;
43 * task_state_index() uses fls() and returns a value from 0-8 range.
44 * Decrement it by 1 (except TASK_RUNNING state i.e 0) before using
45 * it for left shift operation to get the correct task->state
48 state
= __task_state_index(prev_state
, p
->exit_state
);
50 return state
? (1 << (state
- 1)) : state
;
53 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
55 static inline long __trace_sched_switch_state(bool preempt
, struct task_struct
*p
)
59 #ifdef CONFIG_SCHED_DEBUG
61 #endif /* CONFIG_SCHED_DEBUG */
64 * Preemption ignores task state, therefore preempted tasks are always
65 * RUNNING (we will not have dequeued if state != RUNNING).
68 return TASK_REPORT_MAX
;
71 * task_state_index() uses fls() and returns a value from 0-8 range.
72 * Decrement it by 1 (except TASK_RUNNING state i.e 0) before using
73 * it for left shift operation to get the correct task->state
76 state
= task_state_index(p
);
78 return state
? (1 << (state
- 1)) : state
;
81 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
83 static inline long __trace_sched_switch_state(bool preempt
, struct task_struct
*p
)
87 #ifdef CONFIG_SCHED_DEBUG
89 #endif /* CONFIG_SCHED_DEBUG */
92 * Preemption ignores task state, therefore preempted tasks are always
93 * RUNNING (we will not have dequeued if state != RUNNING).
96 return TASK_REPORT_MAX
;
99 * __get_task_state() uses fls() and returns a value from 0-8 range.
100 * Decrement it by 1 (except TASK_RUNNING state i.e 0) before using
101 * it for left shift operation to get the correct task->state
104 state
= __get_task_state(p
);
106 return state
? (1 << (state
- 1)) : state
;
109 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,4,0))
111 static inline long __trace_sched_switch_state(bool preempt
, struct task_struct
*p
)
113 #ifdef CONFIG_SCHED_DEBUG
114 BUG_ON(p
!= current
);
115 #endif /* CONFIG_SCHED_DEBUG */
117 * Preemption ignores task state, therefore preempted tasks are always RUNNING
118 * (we will not have dequeued if state != RUNNING).
120 return preempt
? TASK_RUNNING
| TASK_STATE_MAX
: p
->state
;
123 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0))
125 static inline long __trace_sched_switch_state(struct task_struct
*p
)
127 long state
= p
->state
;
129 #ifdef CONFIG_PREEMPT
130 #ifdef CONFIG_SCHED_DEBUG
131 BUG_ON(p
!= current
);
132 #endif /* CONFIG_SCHED_DEBUG */
134 * For all intents and purposes a preempted task is a running task.
136 if (preempt_count() & PREEMPT_ACTIVE
)
137 state
= TASK_RUNNING
| TASK_STATE_MAX
;
138 #endif /* CONFIG_PREEMPT */
143 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,13,0))
145 static inline long __trace_sched_switch_state(struct task_struct
*p
)
147 long state
= p
->state
;
149 #ifdef CONFIG_PREEMPT
151 * For all intents and purposes a preempted task is a running task.
153 if (task_preempt_count(p
) & PREEMPT_ACTIVE
)
154 state
= TASK_RUNNING
| TASK_STATE_MAX
;
160 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,2,0))
162 static inline long __trace_sched_switch_state(struct task_struct
*p
)
164 long state
= p
->state
;
166 #ifdef CONFIG_PREEMPT
168 * For all intents and purposes a preempted task is a running task.
170 if (task_thread_info(p
)->preempt_count
& PREEMPT_ACTIVE
)
171 state
= TASK_RUNNING
| TASK_STATE_MAX
;
179 static inline long __trace_sched_switch_state(struct task_struct
*p
)
181 long state
= p
->state
;
183 #ifdef CONFIG_PREEMPT
185 * For all intents and purposes a preempted task is a running task.
187 if (task_thread_info(p
)->preempt_count
& PREEMPT_ACTIVE
)
188 state
= TASK_RUNNING
;
196 #endif /* _TRACE_SCHED_DEF_ */
198 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
200 * Enumeration of the task state bitmask.
201 * Only bit flags are enumerated here, not composition of states.
203 LTTNG_TRACEPOINT_ENUM(task_state
,
205 ctf_enum_value("TASK_RUNNING", TASK_RUNNING
)
206 ctf_enum_value("TASK_INTERRUPTIBLE", TASK_INTERRUPTIBLE
)
207 ctf_enum_value("TASK_UNINTERRUPTIBLE", TASK_UNINTERRUPTIBLE
)
208 ctf_enum_value("TASK_STOPPED", __TASK_STOPPED
)
209 ctf_enum_value("TASK_TRACED", __TASK_TRACED
)
210 ctf_enum_value("EXIT_DEAD", EXIT_DEAD
)
211 ctf_enum_value("EXIT_ZOMBIE", EXIT_ZOMBIE
)
213 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
214 ctf_enum_value("TASK_PARKED", TASK_PARKED
)
215 #endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0)) */
217 ctf_enum_value("TASK_DEAD", TASK_DEAD
)
218 ctf_enum_value("TASK_WAKEKILL", TASK_WAKEKILL
)
219 ctf_enum_value("TASK_WAKING", TASK_WAKING
)
221 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0))
222 ctf_enum_value("TASK_NOLOAD", TASK_NOLOAD
)
223 #endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
225 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
226 ctf_enum_value("TASK_NEW", TASK_NEW
)
227 #endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0)) */
229 ctf_enum_value("TASK_STATE_MAX", TASK_STATE_MAX
)
232 #endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */
235 * Tracepoint for calling kthread_stop, performed to end a kthread:
237 LTTNG_TRACEPOINT_EVENT(sched_kthread_stop
,
239 TP_PROTO(struct task_struct
*t
),
244 ctf_array_text(char, comm
, t
->comm
, TASK_COMM_LEN
)
245 ctf_integer(pid_t
, tid
, t
->pid
)
250 * Tracepoint for the return value of the kthread stopping:
252 LTTNG_TRACEPOINT_EVENT(sched_kthread_stop_ret
,
259 ctf_integer(int, ret
, ret
)
264 * Tracepoint for waking up a task:
266 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0) || \
267 LTTNG_RT_KERNEL_RANGE(4,1,10,11, 4,2,0,0) || \
268 LTTNG_RT_KERNEL_RANGE(3,18,27,26, 3,19,0,0) || \
269 LTTNG_RT_KERNEL_RANGE(3,14,61,63, 3,15,0,0) || \
270 LTTNG_RT_KERNEL_RANGE(3,12,54,73, 3,13,0,0) || \
271 LTTNG_RT_KERNEL_RANGE(3,10,97,106, 3,11,0,0) || \
272 LTTNG_RT_KERNEL_RANGE(3,4,110,139, 3,5,0,0) || \
273 LTTNG_RT_KERNEL_RANGE(3,2,77,111, 3,3,0,0))
274 LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template
,
276 TP_PROTO(struct task_struct
*p
),
281 ctf_array_text(char, comm
, p
->comm
, TASK_COMM_LEN
)
282 ctf_integer(pid_t
, tid
, p
->pid
)
283 ctf_integer(int, prio
, p
->prio
- MAX_RT_PRIO
)
284 ctf_integer(int, target_cpu
, task_cpu(p
))
287 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
288 LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template
,
290 TP_PROTO(struct task_struct
*p
, int success
),
295 ctf_array_text(char, comm
, p
->comm
, TASK_COMM_LEN
)
296 ctf_integer(pid_t
, tid
, p
->pid
)
297 ctf_integer(int, prio
, p
->prio
- MAX_RT_PRIO
)
298 ctf_integer(int, success
, success
)
299 ctf_integer(int, target_cpu
, task_cpu(p
))
302 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
304 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0) || \
305 LTTNG_RT_KERNEL_RANGE(4,1,10,11, 4,2,0,0) || \
306 LTTNG_RT_KERNEL_RANGE(3,18,27,26, 3,19,0,0) || \
307 LTTNG_RT_KERNEL_RANGE(3,14,61,63, 3,15,0,0) || \
308 LTTNG_RT_KERNEL_RANGE(3,12,54,73, 3,13,0,0) || \
309 LTTNG_RT_KERNEL_RANGE(3,10,97,106, 3,11,0,0) || \
310 LTTNG_RT_KERNEL_RANGE(3,4,110,139, 3,5,0,0) || \
311 LTTNG_RT_KERNEL_RANGE(3,2,77,111, 3,3,0,0))
314 * Tracepoint called when waking a task; this tracepoint is guaranteed to be
315 * called from the waking context.
317 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template
, sched_waking
,
318 TP_PROTO(struct task_struct
*p
),
322 * Tracepoint called when the task is actually woken; p->state == TASK_RUNNNG.
323 * It it not always called from the waking context.
325 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template
, sched_wakeup
,
326 TP_PROTO(struct task_struct
*p
),
330 * Tracepoint for waking up a new task:
332 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template
, sched_wakeup_new
,
333 TP_PROTO(struct task_struct
*p
),
338 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template
, sched_wakeup
,
339 TP_PROTO(struct task_struct
*p
, int success
),
343 * Tracepoint for waking up a new task:
345 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template
, sched_wakeup_new
,
346 TP_PROTO(struct task_struct
*p
, int success
),
349 #endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
352 * Tracepoint for task switches, performed by the scheduler:
355 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
356 LTTNG_TRACEPOINT_EVENT(sched_switch
,
358 TP_PROTO(bool preempt
,
359 unsigned int prev_state
,
360 struct task_struct
*prev
,
361 struct task_struct
*next
),
363 TP_ARGS(preempt
, prev_state
, prev
, next
),
366 ctf_array_text(char, prev_comm
, prev
->comm
, TASK_COMM_LEN
)
367 ctf_integer(pid_t
, prev_tid
, prev
->pid
)
368 ctf_integer(int, prev_prio
, prev
->prio
- MAX_RT_PRIO
)
369 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
370 ctf_enum(task_state
, long, prev_state
, __trace_sched_switch_state(preempt
, prev_state
, prev
))
372 ctf_integer(long, prev_state
, __trace_sched_switch_state(preempt
, prev_state
, prev
))
374 ctf_array_text(char, next_comm
, next
->comm
, TASK_COMM_LEN
)
375 ctf_integer(pid_t
, next_tid
, next
->pid
)
376 ctf_integer(int, next_prio
, next
->prio
- MAX_RT_PRIO
)
380 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,4,0))
382 LTTNG_TRACEPOINT_EVENT(sched_switch
,
384 TP_PROTO(bool preempt
,
385 struct task_struct
*prev
,
386 struct task_struct
*next
),
388 TP_ARGS(preempt
, prev
, next
),
391 ctf_array_text(char, prev_comm
, prev
->comm
, TASK_COMM_LEN
)
392 ctf_integer(pid_t
, prev_tid
, prev
->pid
)
393 ctf_integer(int, prev_prio
, prev
->prio
- MAX_RT_PRIO
)
394 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
395 ctf_enum(task_state
, long, prev_state
, __trace_sched_switch_state(preempt
, prev
))
397 ctf_integer(long, prev_state
, __trace_sched_switch_state(preempt
, prev
))
399 ctf_array_text(char, next_comm
, next
->comm
, TASK_COMM_LEN
)
400 ctf_integer(pid_t
, next_tid
, next
->pid
)
401 ctf_integer(int, next_prio
, next
->prio
- MAX_RT_PRIO
)
407 LTTNG_TRACEPOINT_EVENT(sched_switch
,
409 TP_PROTO(struct task_struct
*prev
,
410 struct task_struct
*next
),
415 ctf_array_text(char, prev_comm
, prev
->comm
, TASK_COMM_LEN
)
416 ctf_integer(pid_t
, prev_tid
, prev
->pid
)
417 ctf_integer(int, prev_prio
, prev
->prio
- MAX_RT_PRIO
)
418 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
419 ctf_enum(task_state
, long, prev_state
, __trace_sched_switch_state(prev
))
421 ctf_integer(long, prev_state
, __trace_sched_switch_state(prev
))
423 ctf_array_text(char, next_comm
, next
->comm
, TASK_COMM_LEN
)
424 ctf_integer(pid_t
, next_tid
, next
->pid
)
425 ctf_integer(int, next_prio
, next
->prio
- MAX_RT_PRIO
)
431 * Tracepoint for a task being migrated:
433 LTTNG_TRACEPOINT_EVENT(sched_migrate_task
,
435 TP_PROTO(struct task_struct
*p
, int dest_cpu
),
437 TP_ARGS(p
, dest_cpu
),
440 ctf_array_text(char, comm
, p
->comm
, TASK_COMM_LEN
)
441 ctf_integer(pid_t
, tid
, p
->pid
)
442 ctf_integer(int, prio
, p
->prio
- MAX_RT_PRIO
)
443 ctf_integer(int, orig_cpu
, task_cpu(p
))
444 ctf_integer(int, dest_cpu
, dest_cpu
)
448 LTTNG_TRACEPOINT_EVENT_CLASS(sched_process_template
,
450 TP_PROTO(struct task_struct
*p
),
455 ctf_array_text(char, comm
, p
->comm
, TASK_COMM_LEN
)
456 ctf_integer(pid_t
, tid
, p
->pid
)
457 ctf_integer(int, prio
, p
->prio
- MAX_RT_PRIO
)
462 * Tracepoint for freeing a task:
464 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_process_template
, sched_process_free
,
465 TP_PROTO(struct task_struct
*p
),
470 * Tracepoint for a task exiting:
472 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_process_template
, sched_process_exit
,
473 TP_PROTO(struct task_struct
*p
),
477 * Tracepoint for waiting on task to unschedule:
479 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_process_template
, sched_wait_task
,
480 TP_PROTO(struct task_struct
*p
),
484 * Tracepoint for a waiting task:
486 LTTNG_TRACEPOINT_EVENT(sched_process_wait
,
488 TP_PROTO(struct pid
*pid
),
493 ctf_array_text(char, comm
, current
->comm
, TASK_COMM_LEN
)
494 ctf_integer(pid_t
, tid
, pid_nr(pid
))
495 ctf_integer(int, prio
, current
->prio
- MAX_RT_PRIO
)
500 * Tracepoint for do_fork.
501 * Saving both TID and PID information, especially for the child, allows
502 * trace analyzers to distinguish between creation of a new process and
503 * creation of a new thread. Newly created processes will have child_tid
504 * == child_pid, while creation of a thread yields to child_tid !=
507 LTTNG_TRACEPOINT_EVENT_CODE(sched_process_fork
,
509 TP_PROTO(struct task_struct
*parent
, struct task_struct
*child
),
511 TP_ARGS(parent
, child
),
514 pid_t vtids
[LTTNG_MAX_PID_NS_LEVEL
];
515 unsigned int ns_level
;
520 struct pid
*child_pid
;
523 child_pid
= task_pid(child
);
524 tp_locvar
->ns_level
=
525 min_t(unsigned int, child_pid
->level
+ 1,
526 LTTNG_MAX_PID_NS_LEVEL
);
527 for (i
= 0; i
< tp_locvar
->ns_level
; i
++)
528 tp_locvar
->vtids
[i
] = child_pid
->numbers
[i
].nr
;
533 ctf_array_text(char, parent_comm
, parent
->comm
, TASK_COMM_LEN
)
534 ctf_integer(pid_t
, parent_tid
, parent
->pid
)
535 ctf_integer(pid_t
, parent_pid
, parent
->tgid
)
536 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
537 ctf_integer(unsigned int, parent_ns_inum
,
539 unsigned int parent_ns_inum
= 0;
542 struct pid_namespace
*pid_ns
;
544 pid_ns
= task_active_pid_ns(parent
);
547 pid_ns
->lttng_ns_inum
;
552 ctf_array_text(char, child_comm
, child
->comm
, TASK_COMM_LEN
)
553 ctf_integer(pid_t
, child_tid
, child
->pid
)
554 ctf_sequence(pid_t
, vtids
, tp_locvar
->vtids
, u8
, tp_locvar
->ns_level
)
555 ctf_integer(pid_t
, child_pid
, child
->tgid
)
556 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
557 ctf_integer(unsigned int, child_ns_inum
,
559 unsigned int child_ns_inum
= 0;
562 struct pid_namespace
*pid_ns
;
564 pid_ns
= task_active_pid_ns(child
);
567 pid_ns
->lttng_ns_inum
;
577 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
579 * Tracepoint for exec:
581 LTTNG_TRACEPOINT_EVENT(sched_process_exec
,
583 TP_PROTO(struct task_struct
*p
, pid_t old_pid
,
584 struct linux_binprm
*bprm
),
586 TP_ARGS(p
, old_pid
, bprm
),
589 ctf_string(filename
, bprm
->filename
)
590 ctf_integer(pid_t
, tid
, p
->pid
)
591 ctf_integer(pid_t
, old_tid
, old_pid
)
597 * XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE
598 * adding sched_stat support to SCHED_FIFO/RR would be welcome.
600 LTTNG_TRACEPOINT_EVENT_CLASS(sched_stat_template
,
602 TP_PROTO(struct task_struct
*tsk
, u64 delay
),
607 ctf_array_text(char, comm
, tsk
->comm
, TASK_COMM_LEN
)
608 ctf_integer(pid_t
, tid
, tsk
->pid
)
609 ctf_integer(u64
, delay
, delay
)
615 * Tracepoint for accounting wait time (time the task is runnable
616 * but not actually running due to scheduler contention).
618 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template
, sched_stat_wait
,
619 TP_PROTO(struct task_struct
*tsk
, u64 delay
),
623 * Tracepoint for accounting sleep time (time the task is not runnable,
624 * including iowait, see below).
626 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template
, sched_stat_sleep
,
627 TP_PROTO(struct task_struct
*tsk
, u64 delay
),
631 * Tracepoint for accounting iowait time (time the task is not runnable
632 * due to waiting on IO to complete).
634 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template
, sched_stat_iowait
,
635 TP_PROTO(struct task_struct
*tsk
, u64 delay
),
638 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
640 * Tracepoint for accounting blocked time (time the task is in uninterruptible).
642 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template
, sched_stat_blocked
,
643 TP_PROTO(struct task_struct
*tsk
, u64 delay
),
648 * Tracepoint for accounting runtime (time the task is executing
651 LTTNG_TRACEPOINT_EVENT(sched_stat_runtime
,
653 TP_PROTO(struct task_struct
*tsk
, u64 runtime
, u64 vruntime
),
655 TP_ARGS(tsk
, runtime
, vruntime
),
658 ctf_array_text(char, comm
, tsk
->comm
, TASK_COMM_LEN
)
659 ctf_integer(pid_t
, tid
, tsk
->pid
)
660 ctf_integer(u64
, runtime
, runtime
)
661 ctf_integer(u64
, vruntime
, vruntime
)
665 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0) || \
666 LTTNG_RT_KERNEL_RANGE(4,9,27,18, 4,10,0,0) || \
667 LTTNG_RT_KERNEL_RANGE(4,11,5,1, 4,12,0,0))
669 * Tracepoint for showing priority inheritance modifying a tasks
672 LTTNG_TRACEPOINT_EVENT(sched_pi_setprio
,
674 TP_PROTO(struct task_struct
*tsk
, struct task_struct
*pi_task
),
676 TP_ARGS(tsk
, pi_task
),
679 ctf_array_text(char, comm
, tsk
->comm
, TASK_COMM_LEN
)
680 ctf_integer(pid_t
, tid
, tsk
->pid
)
681 ctf_integer(int, oldprio
, tsk
->prio
- MAX_RT_PRIO
)
682 ctf_integer(int, newprio
, pi_task
? pi_task
->prio
- MAX_RT_PRIO
: tsk
->prio
- MAX_RT_PRIO
)
687 * Tracepoint for showing priority inheritance modifying a tasks
690 LTTNG_TRACEPOINT_EVENT(sched_pi_setprio
,
692 TP_PROTO(struct task_struct
*tsk
, int newprio
),
694 TP_ARGS(tsk
, newprio
),
697 ctf_array_text(char, comm
, tsk
->comm
, TASK_COMM_LEN
)
698 ctf_integer(pid_t
, tid
, tsk
->pid
)
699 ctf_integer(int, oldprio
, tsk
->prio
- MAX_RT_PRIO
)
700 ctf_integer(int, newprio
, newprio
- MAX_RT_PRIO
)
705 #endif /* LTTNG_TRACE_SCHED_H */
707 /* This part must be outside protection */
708 #include <probes/define_trace.h>
This page took 0.059777 seconds and 5 git commands to generate.