From 8aa140d32cf9ddf7e5a58aa35daf8c590806d9e6 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 20 Oct 2009 11:23:55 -0400 Subject: [PATCH] RHBZ519314: define task_struct cast to operate without debuginfo * tapset/task.stp: Use @cast(...,"task_struct","kernelstate + return @cast(task, "task_struct", "kernel")->state } // Return the name of the given task function task_execname:string (task:long) { - return kernel_string(@cast(task, "task_struct", "kernel")->comm) + return kernel_string(@cast(task, "task_struct", "kernel")->comm) } // Return the process id of the given task function task_pid:long (task:long) { - return @cast(task, "task_struct", "kernel")->tgid + return @cast(task, "task_struct", "kernel")->tgid } @@ -95,7 +95,7 @@ function pid2execname:string (pid:long) { // Return the thread id of the given task function task_tid:long (task:long) { - return @cast(task, "task_struct", "kernel")->pid + return @cast(task, "task_struct", "kernel")->pid } @@ -181,11 +181,11 @@ function task_nice:long (task:long) %{ /* pure */ function task_cpu:long (task:long) { %( kernel_v >= "2.6.22" %? - ti = @cast(task, "task_struct", "kernel")->stack + ti = @cast(task, "task_struct", "kernel")->stack %: - ti = @cast(task, "task_struct", "kernel")->thread_info + ti = @cast(task, "task_struct", "kernel")->thread_info %) - return @cast(ti, "thread_info", "kernel")->cpu + return @cast(ti, "thread_info", "kernel")->cpu } // Return the number of open file handlers for the given task -- 2.43.5