From ba4b1d99384b208b8bcda2be3cc0e27d0b03a915 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Thu, 13 Nov 2008 15:51:24 -0500 Subject: Add xml documentation for memory.stp. --- tapset/memory.stp | 215 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 179 insertions(+), 36 deletions(-) (limited to 'tapset/memory.stp') diff --git a/tapset/memory.stp b/tapset/memory.stp index a2d9cc19..03568ad0 100644 --- a/tapset/memory.stp +++ b/tapset/memory.stp @@ -7,17 +7,34 @@ // Public License (GPL); either version 2, or (at your option) any // later version. -/* probe vm.pagefault - * - * Records that a page fault occurred. - * - * Context: - * The process which triggered the fault. - * - * Arguments: - * address - the address of the faulting memory access. - * write_access - indicates whether this was a write - */ +/// +/// 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 = kernel.function("__handle_mm_fault@mm/memory.c") ?, kernel.function("handle_mm_fault@mm/memory.c") ? { @@ -25,20 +42,54 @@ probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?, address = $address } -/* probe vm.pagefault.return - * - * Records type of fault that occurred. - * - * Context: - * The process which triggered the fault. - * - * Arguments: - * fault_type - type of fault - * 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 - */ +/// +/// 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 = kernel.function("__handle_mm_fault@mm/memory.c").return ?, kernel.function("handle_mm_fault@mm/memory.c").return ? { @@ -65,22 +116,52 @@ function _IS_ZERO_PAGE:long(from:long, vaddr:long) %{ /* pure */ %} -/* probe 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 vm.write_shared_copy. - * - * Context: - * The process attempting the write. - * - * Arguments: - * address - the address of the shared write. - */ +/// +/// 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 = 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 @@ -100,6 +181,24 @@ 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. @@ -117,6 +216,21 @@ 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. @@ -133,6 +247,21 @@ probe vm.munmap = kernel.function("do_munmap") { 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). @@ -149,6 +278,18 @@ probe vm.brk = kernel.function("do_brk") { 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. @@ -163,3 +304,5 @@ probe vm.brk = kernel.function("do_brk") { probe vm.oom_kill = kernel.function("__oom_kill_task") { task = $p } + +///
-- cgit