summaryrefslogtreecommitdiffstats
path: root/tapset/tskschedule.stp
diff options
context:
space:
mode:
authorguanglei <guanglei>2006-05-18 00:21:05 +0000
committerguanglei <guanglei>2006-05-18 00:21:05 +0000
commitf8e6042eef05612c93efee7adb00cb006fbcc643 (patch)
treefb19e1ad13dc724828f0dec89cb1174105941a49 /tapset/tskschedule.stp
parenta955efeaa5ede86838aa3df87ec059548171bafe (diff)
downloadsystemtap-steved-f8e6042eef05612c93efee7adb00cb006fbcc643.tar.gz
systemtap-steved-f8e6042eef05612c93efee7adb00cb006fbcc643.tar.xz
systemtap-steved-f8e6042eef05612c93efee7adb00cb006fbcc643.zip
I break LKET into layered structure. The first layer is those generic tapsets.
The second layer is tracing specific. I checked into CVS those generic tapsets at the first step.
Diffstat (limited to 'tapset/tskschedule.stp')
-rw-r--r--tapset/tskschedule.stp27
1 files changed, 27 insertions, 0 deletions
diff --git a/tapset/tskschedule.stp b/tapset/tskschedule.stp
new file mode 100644
index 00000000..75ccb221
--- /dev/null
+++ b/tapset/tskschedule.stp
@@ -0,0 +1,27 @@
+// task scheduler tapset
+// Copyright (C) 2005, 2006 IBM Corp.
+//
+// This file is part of systemtap, and is free software. You can
+// redistribute it and/or modify it under the terms of the GNU General
+// Public License (GPL); either version 2, or (at your option) any
+// later version.
+
+/* Only applicable to SMP systems */
+probe tskdispatch.cpuidle
+ = kernel.inline("idle_balance")
+{
+}
+
+probe tskdispatch.ctxswitch
+ = kernel.function("__switch_to")
+{
+%( arch == "ppc64" %?
+ prev_pid = $prev->pid
+ next_pid = $new->pid
+ prevtsk_state = $prev->state
+%:
+ prev_pid = $prev_p->pid
+ next_pid = $next_p->pid
+ prevtsk_state = $prev_p->pid
+%)
+}