summaryrefslogtreecommitdiffstats
path: root/tapset/scheduler.stp
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2010-03-08 13:38:51 -0600
committerDavid Smith <dsmith@redhat.com>2010-03-08 13:38:51 -0600
commit08f88cde0a68f46008cd7498c775f435778e2f5d (patch)
treefd72ebd5afeb4cb96d8a6cff61abf2a2b658e8b5 /tapset/scheduler.stp
parentab5e90c22127ef3c354835571414f9165c07bebe (diff)
downloadsystemtap-steved-08f88cde0a68f46008cd7498c775f435778e2f5d.tar.gz
systemtap-steved-08f88cde0a68f46008cd7498c775f435778e2f5d.tar.xz
systemtap-steved-08f88cde0a68f46008cd7498c775f435778e2f5d.zip
PR 11338 (partial): Used '@defined()' in tty, scheduler, and vfs tapsets.
* tapset/tty.stp: Used '@defined()' to remove kernel version checks. * tapset/scheduler.stp: Ditto. * tapset/vfs.stp: Used '@defined()' to remove kernel version checks. Also made several probe points optional instead of using kernel version checks to know when to include them. * testsuite/buildok/vfs_testcase.stp: Removed stap '-u' (unoptimized mode) switch, since '@defined()' doesn't work in unoptimized mode.
Diffstat (limited to 'tapset/scheduler.stp')
-rw-r--r--tapset/scheduler.stp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tapset/scheduler.stp b/tapset/scheduler.stp
index 1610dc0a..46463514 100644
--- a/tapset/scheduler.stp
+++ b/tapset/scheduler.stp
@@ -1,6 +1,7 @@
// scheduler tapset
// Copyright (C) 2006 Intel Corporation.
// Copyright (C) 2005, 2006 IBM Corp.
+// Copyright (C) 2010 Red Hat Inc.
//
// 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
@@ -285,11 +286,7 @@ probe __scheduler.migrate.kp1 = kernel.function("pull_task")
}
probe __scheduler.migrate.kp = kernel.function("set_task_cpu")
{
-%( kernel_v >= "2.6.23" %?
- cpu_to = $new_cpu
-%:
- cpu_to = $cpu
-%)
+ cpu_to = (@defined($new_cpu) ? $new_cpu : $cpu)
}
probe __scheduler.migrate.tp = kernel.trace("sched_migrate_task")
{