summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ogness <john.ogness@linutronix.de>2019-03-28 15:21:48 +0106
committerJohn Ogness <john.ogness@linutronix.de>2019-03-28 15:21:48 +0106
commit115114f896fbb1a89467ea07476d2b6d1b18f1b8 (patch)
tree9bd374936be08e4cb8bfd55be9e8c43d93d26e2d
parente1e6511cd68b646234dcc8f5f86b25b7ea48a720 (diff)
schulung_tools: add sleep_wake demo
A very simple demo that shows the full chain of events from sys_nanosleep_enter to sys_nanosleep_exit. (For the IRQ calculations use expires= and now= from the hrtimer events.) Signed-off-by: John Ogness <john.ogness@linutronix.de>
-rw-r--r--schulung_tools/sleep_wake/README19
1 files changed, 19 insertions, 0 deletions
diff --git a/schulung_tools/sleep_wake/README b/schulung_tools/sleep_wake/README
new file mode 100644
index 0000000..b18efa9
--- /dev/null
+++ b/schulung_tools/sleep_wake/README
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+sudo trace-cmd record -e sched:* -e timer:* -e syscalls:* chrt -f 98 /bin/sleep 2
+
+# Notice the chain of events:
+#
+# sys_enter_nanosleep
+# hrtimer_init
+# hrtimer_start
+# sched_switch
+# ...
+# hrtimer_cancel
+# hrtimer_expire_entry
+# sched_wakeup
+# hrtimer_expire_exit
+# sched_switch
+# sys_exit_nanosleep
+
+kernelshark