summaryrefslogtreecommitdiffstats
path: root/tapset
diff options
context:
space:
mode:
Diffstat (limited to 'tapset')
-rw-r--r--tapset/ChangeLog10
-rw-r--r--tapset/memory.stp10
-rw-r--r--tapset/task.stp12
3 files changed, 25 insertions, 7 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index b33e598b..4aedbfc5 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,3 +1,13 @@
+2007-07-25 Mike Mason <mmlnx@us.ibm.com>
+
+ PR 4386
+ * memory.stp (vm.pagefault, vm.pagefault.return):
+ __handle_mm_fault renamed back to handle_mm_fault in 2.6.23.
+ Changed probes to look for either name in mm/memory.c and removed
+ kernel version check.
+ * task.stp (task_cpu): thread_info in task_struct changed
+ to stack in 2.6.23. Usage appears to be the same as before.
+
2007-07-17 Mike Mason <mmlnx@us.ibm.com>
* socket.stp: changed initialization of *num2str arrays to
diff --git a/tapset/memory.stp b/tapset/memory.stp
index 93e0bb1f..5173bf8c 100644
--- a/tapset/memory.stp
+++ b/tapset/memory.stp
@@ -18,9 +18,8 @@
* address - the address of the faulting memory access.
* write_access - indicates whether this was a write
*/
-probe vm.pagefault = kernel.function(
- %( kernel_v >= "2.6.13" %? "__handle_mm_fault" %: "handle_mm_fault" %)
- )
+probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?,
+ kernel.function("handle_mm_fault@mm/memory.c") ?
{
write_access = $write_access
address = $address
@@ -40,9 +39,8 @@ probe vm.pagefault = kernel.function(
* VM_FAULT_MINOR 2 no blocking operation to handle fault
* VM_FAULT_MAJOR 3 required blocking operation to handle fault
*/
-probe vm.pagefault.return = kernel.function(
- %( kernel_v >= "2.6.13" %? "__handle_mm_fault" %: "handle_mm_fault" %)
- ).return
+probe vm.pagefault.return = kernel.function("__handle_mm_fault@mm/memory.c").return ?,
+ kernel.function("handle_mm_fault@mm/memory.c").return ?
{
fault_type = $return
}
diff --git a/tapset/task.stp b/tapset/task.stp
index 2f183838..1a7699d0 100644
--- a/tapset/task.stp
+++ b/tapset/task.stp
@@ -109,9 +109,19 @@ function task_nice:long (task:long) %{ /* pure */
// Return the scheduled cpu for the given task
-function task_cpu:long (task:long) %{ /* pure */
+function task_cpu:long (task:long)
+%( kernel_v >= "2.6.23" %?
+%{ /* pure */
+ struct task_struct *t = (struct task_struct *)(long)THIS->task;
+ struct thread_info *ti = kread(&(t->stack));
+ THIS->__retvalue = kread(&(ti->cpu));
+ CATCH_DEREF_FAULT();
+%}
+%:
+%{ /* pure */
struct task_struct *t = (struct task_struct *)(long)THIS->task;
struct thread_info *ti = kread(&(t->thread_info));
THIS->__retvalue = kread(&(ti->cpu));
CATCH_DEREF_FAULT();
%}
+%)