summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--tapset/ChangeLog5
-rw-r--r--tapset/scheduler.stp26
-rw-r--r--tapset/tskschedule.stp27
-rwxr-xr-xtestsuite/buildok/sched_test.stp4
-rwxr-xr-xtestsuite/buildok/tskschedule.stp6
6 files changed, 43 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog
index 8327d0df..e3ddd615 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-05-18 Li Guanglei <guanglei@cn.ibm.com>
+
+ * tapset/tskschedule.stp: deleted, merge into scheduler.stp
+ * tapset/scheduler.stp: incorporate tskschedule.stp
+ * testsuite/buildok/tskschedule.stp: deleted, merge into
+ sched_test.stp
+ * testsuite/buildok/sched_test.stp: incorporate tskschedule.stp
+
2006-05-17 Josh Stone <joshua.i.stone@intel.com>
* testsuite/buildok/sched_test.stp: test scheduler tapset
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index 7c534c81..aa5fef32 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,5 +1,10 @@
2006-05-18 Li Guanglei <guanglei@cn.ibm.com>
+ * tapset/tskschedule.stp: deleted, merge into scheduler.stp
+ * tapset/scheduler.stp: incorporate tskschedule.stp
+
+2006-05-18 Li Guanglei <guanglei@cn.ibm.com>
+
* testsuite/buildok/ioscheduler.stp: testcase for ioscheduler.stp
* testsuite/buildok/memory.stp: testcase for memory.stp
* testsuite/buildok/networking.stp: testcase for networking.stp
diff --git a/tapset/scheduler.stp b/tapset/scheduler.stp
index e1fac79d..08581332 100644
--- a/tapset/scheduler.stp
+++ b/tapset/scheduler.stp
@@ -1,5 +1,6 @@
// scheduler tapset
// Copyright (C) 2006 Intel Corporation.
+// 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
@@ -98,8 +99,33 @@ probe scheduler.migrate = kernel.inline("pull_task") {
/* probe scheduler.balance
*
* Fires when a cpu attempts to find more work.
+ * Only applicable to SMP systems
*
* Context:
* The cpu looking for more work.
*/
probe scheduler.balance = kernel.inline("idle_balance") {}
+
+
+/* probe scheduler.ctxswitch
+ *
+ * Fires when there is a context switch
+ *
+ * Arguments:
+ * prev_pid: The pid of the process to be switched out
+ * next_pid: The pid of the process to be switched in
+ * prevtsk_state: the state of the process to be switched out
+ */
+probe scheduler.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
+%)
+}
diff --git a/tapset/tskschedule.stp b/tapset/tskschedule.stp
deleted file mode 100644
index 75ccb221..00000000
--- a/tapset/tskschedule.stp
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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
-%)
-}
diff --git a/testsuite/buildok/sched_test.stp b/testsuite/buildok/sched_test.stp
index 547b0682..3fa9187d 100755
--- a/testsuite/buildok/sched_test.stp
+++ b/testsuite/buildok/sched_test.stp
@@ -32,3 +32,7 @@ probe scheduler.balance {
log(pp())
}
+probe scheduler.ctxswitch
+{
+ printf("%d, %d, %d\n", prev_pid, next_pid, prevtsk_state);
+}
diff --git a/testsuite/buildok/tskschedule.stp b/testsuite/buildok/tskschedule.stp
deleted file mode 100755
index 5c58b192..00000000
--- a/testsuite/buildok/tskschedule.stp
+++ /dev/null
@@ -1,6 +0,0 @@
-#! stap -p4
-
-probe tskdispatch.ctxswitch
-{
- printf("%d, %d, %d\n", prev_pid, next_pid, prevtsk_state);
-}