diff options
author | guanglei <guanglei> | 2006-05-18 05:55:34 +0000 |
---|---|---|
committer | guanglei <guanglei> | 2006-05-18 05:55:34 +0000 |
commit | e55fe027da6703dd1222b2503f2a89cdb30eeea5 (patch) | |
tree | bb32f8046abbab9f80b73ce57e3adf2dd20290ef /tapset | |
parent | 1617d766b6c65e3da6b630173b42a15dd606f835 (diff) | |
download | systemtap-steved-e55fe027da6703dd1222b2503f2a89cdb30eeea5.tar.gz systemtap-steved-e55fe027da6703dd1222b2503f2a89cdb30eeea5.tar.xz systemtap-steved-e55fe027da6703dd1222b2503f2a89cdb30eeea5.zip |
merge tskschedule.stp into scheduler.stp
Diffstat (limited to 'tapset')
-rw-r--r-- | tapset/ChangeLog | 5 | ||||
-rw-r--r-- | tapset/scheduler.stp | 26 | ||||
-rw-r--r-- | tapset/tskschedule.stp | 27 |
3 files changed, 31 insertions, 27 deletions
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 -%) -} |