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/scheduler.stp | |
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/scheduler.stp')
-rw-r--r-- | tapset/scheduler.stp | 26 |
1 files changed, 26 insertions, 0 deletions
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 +%) +} |