summaryrefslogtreecommitdiffstats
path: root/tapset/task.stp
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2010-03-09 15:39:15 -0600
committerDavid Smith <dsmith@redhat.com>2010-03-09 15:39:15 -0600
commit595187eb19a18c6f534d1e44aeb912c01b8dc41b (patch)
tree951fcaa12eafdbddc2c6b4945a980a70cef72d1a /tapset/task.stp
parenta8350a5d1c6e99d6929d1891767c6ddee015137a (diff)
downloadsystemtap-steved-595187eb19a18c6f534d1e44aeb912c01b8dc41b.tar.gz
systemtap-steved-595187eb19a18c6f534d1e44aeb912c01b8dc41b.tar.xz
systemtap-steved-595187eb19a18c6f534d1e44aeb912c01b8dc41b.zip
PR 11338 (partial): Used '@defined()' in task, dentry, and scsi tapsets.
* tapset/task.stp: Used '@defined()' to remove kernel version checks. * tapset/dentry.stp: Ditto. * tapset/scsi.stp: Ditto.
Diffstat (limited to 'tapset/task.stp')
-rw-r--r--tapset/task.stp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tapset/task.stp b/tapset/task.stp
index 9cd37026..b8b24d7e 100644
--- a/tapset/task.stp
+++ b/tapset/task.stp
@@ -241,11 +241,9 @@ function task_nice:long (task:long) %{ /* pure */
*/
function task_cpu:long (task:long)
{
-%( kernel_v >= "2.6.22" %?
- ti = @cast(task, "task_struct", "kernel<linux/sched.h>")->stack
-%:
- ti = @cast(task, "task_struct", "kernel<linux/sched.h>")->thread_info
-%)
+ ti = (@defined(@cast(task, "task_struct", "kernel<linux/sched.h>")->stack)
+ ? @defined(@cast(task, "task_struct", "kernel<linux/sched.h>")->stack)
+ : @cast(task, "task_struct", "kernel<linux/sched.h>")->thread_info)
return @cast(ti, "thread_info", "kernel<linux/sched.h>")->cpu
}