diff options
-rw-r--r-- | tapset/ioscheduler.stp | 12 | ||||
-rw-r--r-- | tapset/memory.stp | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/tapset/ioscheduler.stp b/tapset/ioscheduler.stp index a79ae752..637e2783 100644 --- a/tapset/ioscheduler.stp +++ b/tapset/ioscheduler.stp @@ -18,7 +18,11 @@ * @elevator_name: The type of I/O elevator currently enabled */ probe ioscheduler.elv_next_request - = kernel.function("elv_next_request") + = %( kernel_v >= "2.6.31" %? + kernel.function("blk_peek_request") + %: + kernel.function("elv_next_request") + %) { %( kernel_v >= "2.6.10" %? elevator_name = kernel_string($q->elevator->elevator_type->elevator_name) @@ -35,7 +39,11 @@ probe ioscheduler.elv_next_request * @disk_minor: Disk minor number of the request */ probe ioscheduler.elv_next_request.return - = kernel.function("elv_next_request").return + = %( kernel_v >= "2.6.31" %? + kernel.function("blk_peek_request").return + %: + kernel.function("elv_next_request").return + %) { if($return == 0) { req = 0 diff --git a/tapset/memory.stp b/tapset/memory.stp index 83875aa4..a855fbcb 100644 --- a/tapset/memory.stp +++ b/tapset/memory.stp @@ -15,6 +15,7 @@ global VM_FAULT_OOM=0, VM_FAULT_SIGBUS=1, VM_FAULT_MINOR=2, VM_FAULT_MAJOR=3 global VM_FAULT_NOPAGE=4, VM_FAULT_LOCKED=5, VM_FAULT_ERROR=6 +global FAULT_FLAG_WRITE=1 /** * sfunction vm_fault_contains - Test return value for page fault reason @@ -64,7 +65,11 @@ function vm_fault_contains:long (value:long, test:long) probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?, kernel.function("handle_mm_fault@mm/memory.c") ? { +%( kernel_v >= "2.6.31" %? + write_access = $flags & FAULT_FLAG_WRITE +%: write_access = $write_access +%) address = $address } |