From d86b8ab490be3d252b2960e77157c89f502fa4fe Mon Sep 17 00:00:00 2001 From: John Ogness Date: Wed, 3 Apr 2019 13:31:00 +0206 Subject: sleep_wake: update with more details, new events There were an unnecessary number of events that were captured. Only capture the ones that are truly interesting. And add the irq vector. Also, add some description to the significance of the events. Signed-off-by: John Ogness --- schulung_tools/sleep_wake/README | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/schulung_tools/sleep_wake/README b/schulung_tools/sleep_wake/README index b18efa9..5e4da5c 100644 --- a/schulung_tools/sleep_wake/README +++ b/schulung_tools/sleep_wake/README @@ -1,19 +1,27 @@ #!/bin/sh -sudo trace-cmd record -e sched:* -e timer:* -e syscalls:* chrt -f 98 /bin/sleep 2 +sudo trace-cmd record \ + -e syscalls:sys_enter_nanosleep \ + -e timer:hrtimer_start \ + -e sched:sched_switch \ + -e irq_vectors:local_timer_entry \ + -e timer:hrtimer_expire_entry \ + -e sched:sched_wakeup \ + -e syscalls:sys_exit_nanosleep \ + chrt -f 98 /bin/sleep 2 -# Notice the chain of events: +# Notice the chain of events (and their latencies!): # -# sys_enter_nanosleep -# hrtimer_init -# hrtimer_start -# sched_switch -# ... -# hrtimer_cancel -# hrtimer_expire_entry -# sched_wakeup -# hrtimer_expire_exit -# sched_switch -# sys_exit_nanosleep +# sys_enter_nanosleep (call to clock_nanosleep()) +# hrtimer_start (hrtimer set) +# sched_switch (go to sleep) +# +# ... about 2 seconds later ... +# +# local_timer_entry (cpu in irq vector) +# hrtimer_expire_entry (hrtimer callback) +# sched_wakeup (wake the sleeping task) +# sched_switch (task scheduled) +# sys_exit_nanosleep (return from clock_nanosleep()) kernelshark -- cgit v1.2.3