Extend sched_process_fork with scheduling fields sched_update_prio
authorJulien Desfossez <jdesfossez@efficios.com>
Mon, 19 Sep 2016 16:56:33 +0000 (12:56 -0400)
committerJulien Desfossez <jdesfossez@efficios.com>
Mon, 19 Sep 2016 16:56:33 +0000 (12:56 -0400)
Add the scheduling policy informations of the newly created process:
- nice
- rt_priority,
- dl_runtime,
- dl_deadline,
- dl_period

Here is an example output:
sched_process_fork: { cpu_id = 4 }, { parent_comm = "bash", parent_tid =
17942, parent_pid = 17942, parent_ns_inum = 4026531836, child_comm =
"bash", child_tid = 10005, _vtids_length = 1, vtids = [ [0] = 10005 ],
child_pid = 10005, child_ns_inum = 4026531836, prio = 20, policy = (
"SCHED_NORMAL" : container = 0 ), nice = 0, rt_priority = 0, dl_runtime
= 0, dl_deadline = 0, dl_period = 0 }

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
instrumentation/events/lttng-module/sched.h

index 9eb41183b6223b73e3bc528979a2f3c14a24693f..6601b8c544c8fd23c61b1d932dbcd30dfbfffcd9 100644 (file)
@@ -440,6 +440,13 @@ LTTNG_TRACEPOINT_EVENT_CODE(sched_process_fork,
                                child_ns_inum;
                        }))
 #endif
+               ctf_integer(int, prio, child->prio - MAX_RT_PRIO)
+               ctf_enum(lttng_sched_policy, unsigned int, policy, child->policy)
+               ctf_integer(int, nice, task_nice(child))
+               ctf_integer(unsigned int, rt_priority, child->rt_priority)
+               ctf_integer(u64, dl_runtime, child->dl.dl_runtime)
+               ctf_integer(u64, dl_deadline, child->dl.dl_deadline)
+               ctf_integer(u64, dl_period, child->dl.dl_period)
        ),
 
        TP_code_post()
This page took 0.025626 seconds and 5 git commands to generate.