From 0166f61e34a34ef1138e1de7a7068bf602741a0c Mon Sep 17 00:00:00 2001 From: William Cohen Date: Tue, 25 Nov 2008 11:03:28 -0500 Subject: Add context, timestamp, memory, and networking tapsets. --- tapset/memory.stp | 267 +++++++++++------------------------------------------- 1 file changed, 51 insertions(+), 216 deletions(-) (limited to 'tapset/memory.stp') diff --git a/tapset/memory.stp b/tapset/memory.stp index 03568ad0..9370073b 100644 --- a/tapset/memory.stp +++ b/tapset/memory.stp @@ -7,34 +7,14 @@ // Public License (GPL); either version 2, or (at your option) any // later version. -/// -/// Memory Tapset -/// -/// This family of probe points is used to probe page fault events. -/// It contains the following probe points: -/// - -/// -/// vm.pagefault -/// vm.pagefault -/// -/// Records that a page fault occurred. -/// The context is the process which triggered the fault. -/// -/// -/// Arguments: -/// address -/// -/// The address of the faulting memory access. -/// -/// -/// write_access -/// -/// Indicates whether this was a write. -/// -/// -/// -/// +/** + * probe vm.pagefault - Records that a page fault occurred. + * @address: The address of the faulting memory access. + * @write_access: Indicates whether this was a write. + * + * Context: The process which triggered the fault + * + */ probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?, kernel.function("handle_mm_fault@mm/memory.c") ? { @@ -42,61 +22,22 @@ probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?, address = $address } -/// -/// vm.pagefault.return -/// vm.pagefault.return -/// -/// Records type of fault that occurred. -/// The context is the process which triggered the fault. -/// -/// -/// -/// Arguments: -/// fault_type -/// The possible values of fault_type are: -/// Fault values -/// -/// -/// -/// -/// -/// DefineValueReason -/// -/// -/// -/// VM_FAULT_OOM -/// 0 -/// out of memory -/// -/// -/// VM_FAULT_SIGBUS -/// 1 -/// if not oom, minor, or major fault, this val -/// -/// -/// VM_FAULT_MINOR -/// 2 -/// no blocking operation to handle fault -/// -/// -/// VM_FAULT_MAJOR -/// 3 -/// required blocking operation to handle fault -/// -/// -/// -///
-///
-///
-///
-///
+/** + * probe vm.pagefault.return - Records type of fault that occurred. + * @fault_type: 0 (VM_FAULT_OOM), 1 (VM_FAULT_SIGBUS), + * 2 (VM_FAULT_MINOR), and 3 (VM_FAULT_MAJOR) + */ 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 } -/* Return which node the given address belongs to in a NUMA system */ +/** + * sfunction addr_to_node - Returns which NUMA node has the given address. + * @addr: The address of the faulting memory access. + * + */ function addr_to_node:long(addr:long) %{ /* pure */ int nid; int pfn = __pa(THIS->addr) >> PAGE_SHIFT; @@ -116,64 +57,32 @@ function _IS_ZERO_PAGE:long(from:long, vaddr:long) %{ /* pure */ %} -/// -/// vm.write_shared -/// vm.write_shared -/// -/// Fires when a process attempts to write to a shared page. -/// If a copy is necessary, this will be followed by a -/// . -/// The context is the process attempting the write. -/// -/// -/// -/// Arguments: -/// address -/// The address of the shared write. -/// -/// -/// +/** + * probe vm.write_shared - Write to shared page. + * @address: The address of the shared write. + * + * Context: + * The context is the process attempting the write. + * + * Fires when a process attempts to write to a shared page. + * If a copy is necessary, this will be followed by a + * vm.write_shared_copy. + */ probe vm.write_shared = kernel.function("do_wp_page") { address = $address } - -/// -/// vm.write_shared_copy -/// vm.write_shared_copy -/// -/// Fires when a write to a shared page requires a page copy. -/// This is always preceded by a . -/// The context is the process attempting the write. -/// -/// -/// -/// Arguments: -/// address -/// -/// The address of the shared write. -/// -/// -/// zero -/// -/// Boolean indicating whether it is a zero page -/// (can do a clear instead of a copy). -/// -/// -/// -/// -/* probe vm.write_shared_copy - * - * Fires when a write to a shared page requires a page copy. This is - * always preceded by a vm.shared_write. +/** + * probe vm.write_shared_copy- Page copy for shared page write. + * @address: the address of the shared write. + * @zero: boolean indicating whether it is a zero page + * (can do a clear instead of a copy). * * Context: * The process attempting the write. * - * Arguments: - * address - the address of the shared write. - * zero - boolean indicating whether it is a zero page - * (can do a clear instead of a copy). + * Fires when a write to a shared page requires a page copy. This is + * always preceded by a vm.shared_write. */ probe vm.write_shared_copy = kernel.function("copy_cow_page")? { address = $address @@ -181,34 +90,13 @@ probe vm.write_shared_copy = kernel.function("copy_cow_page")? { } -/// -/// vm.mmap -/// vm.mmap -/// -/// Fires when an mmap is requested. -/// The context is the process calling mmap. -/// -/// -/// -/// Arguments: -/// address -/// The requested address. -/// -/// length -/// The length of the memory segment. -/// -/// -/// -/* probe vm.mmap - * - * Fires when an mmap is requested. +/** + * probe vm.mmap - Fires when an mmap is requested. + * @address: the requested address + * @length: the length of the memory segment * * Context: * The process calling mmap. - * - * Arguments: - * address - the requested address - * length - the length of the memory segment */ probe vm.mmap = kernel.function("do_mmap"), kernel.function("do_mmap2")? { address = $addr @@ -216,93 +104,40 @@ probe vm.mmap = kernel.function("do_mmap"), kernel.function("do_mmap2")? { } -/// -/// vm.munmap -/// vm.munmap -/// Fires when an munmap is requested. -/// -/// -/// Arguments: -/// address -/// The requested address. -/// -/// length -/// The length of the memory segment. -/// -/// -/// -/* probe vm.munmap - * - * Fires when an munmap is requested. +/** + * probe vm.munmap - Fires when an munmap is requested. + * @address: the requested address + * @length: the length of the memory segment * * Context: * The process calling munmap. - * - * Arguments: - * address - the requested address - * length - the length of the memory segment */ probe vm.munmap = kernel.function("do_munmap") { address = $start length = $len } -/// -/// vm.brk -/// vm.brk -/// Fires when a brk is requested (resizing a heap). -/// -/// -/// Arguments: -/// address -/// The requested address. -/// -/// length -/// The length of the memory segment. -/// -/// -/// -/* probe vm.brk - * - * Fires when a brk is requested (resizing a heap). +/** + * probe vm.brk -Fires when a brk is requested (resizing a heap). + * @address - the requested address + * @length - the length of the memory segment * * Context: * The process calling brk. - * - * Arguments: - * address - the requested address - * length - the length of the memory segment */ probe vm.brk = kernel.function("do_brk") { address = $addr length = $len } -/// -/// vm.oom_kill -/// vm.oom_kill -/// Fires when a thread is targetted by the OOM killer. -/// -/// -/// Arguments: -/// task -/// The task being killed. -/// -/// -/// -/* probe vm.oom_kill - * - * Fires when a thread is targetted by the OOM killer. +/** + * probe vm.oom_kill - Fires when a thread is targetted by the OOM killer. + * @task: the task being killed * * Context: * The process that tried to consume more memory, and thus * triggered the OOM. (correct?) - * - * Arguments: - * task - the task being killed */ probe vm.oom_kill = kernel.function("__oom_kill_task") { task = $p } - -///
-- cgit