This family of probe points is used to probe memory-related events or query the memory usage of the current process. It contains the following probe points:
Name
function::vm_fault_contains — Test return value for page fault reason
Synopsis
function vm_fault_contains:long(value:long,test:long)
Arguments
value
-
The fault_type returned by vm.page_fault.return
test
-
The type of fault to test for (VM_FAULT_OOM or similar)
Name
probe::vm.pagefault — Records that a page fault occurred.
Values
write_access
-
Indicates whether this was a write or read access; 1 indicates a write, while 0 indicates a read.
name
-
Name of the probe point
address
-
The address of the faulting memory access; i.e. the address that caused the page fault.
Context
The process which triggered the fault
Name
probe::vm.pagefault.return — Indicates what type of fault occurred.
Synopsis
vm.pagefault.return
Values
name
-
Name of the probe point
fault_type
-
Returns either 0 (VM_FAULT_OOM) for out of memory faults, 2 (VM_FAULT_MINOR) for minor faults, 3 (VM_FAULT_MAJOR) for major faults, or 1 (VM_FAULT_SIGBUS) if the fault was neither OOM, minor fault, nor major fault.
Name
function::addr_to_node — Returns which node a given address belongs to within a NUMA system.
Synopsis
function addr_to_node:long(addr:long)
Arguments
addr
-
The address of the faulting memory access.
General Syntax
addr_to_node:long(addr:long)
Description
This function accepts an address, and returns the node that the given address belongs to in a NUMA system.
Name
probe::vm.write_shared — Attempts at writing to a shared page.
Values
name
-
Name of the probe point
address
-
The address of the shared write.
Context
The context is the process attempting the write.
Description
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.
Name
probe::vm.write_shared_copy — Page copy for shared page write.
Synopsis
vm.write_shared_copy
Values
name
-
Name of the probe point
zero
-
Boolean indicating whether it is a zero page (can do a clear instead of a copy).
address
-
The address of the shared write.
Context
The process attempting the write.
Description
Fires when a write to a shared page requires a page copy. This is always preceded by a vm.shared_write.
Name
probe::vm.mmap — Fires when an mmap is requested.
Values
length
-
The length of the memory segment
name
-
Name of the probe point
address
-
The requested address
Context
The process calling mmap.
Name
probe::vm.munmap — Fires when an munmap is requested.
Values
length
-
The length of the memory segment
name
-
Name of the probe point
address
-
The requested address
Context
The process calling munmap.
Name
probe::vm.brk — Fires when a brk is requested (i.e. the heap will be resized).
Values
length
-
The length of the memory segment
name
-
Name of the probe point
address
-
The requested address
Context
The process calling brk.
Name
probe::vm.oom_kill — Fires when a thread is selected for termination by the OOM killer.
Values
name
-
Name of the probe point
task
-
The task being killed
Context
The process that tried to consume excessive memory, and thus triggered the OOM.
Name
probe::vm.kmalloc — Fires when kmalloc is requested.
Values
ptr
-
Pointer to the kmemory allocated
caller_function
-
Name of the caller function.
call_site
-
Address of the kmemory function.
gfp_flag_name
-
type of kmemory to allocate (in String format)
name
-
Name of the probe point
bytes_req
-
Requested Bytes
bytes_alloc
-
Allocated Bytes
gfp_flags
-
type of kmemory to allocate
Name
probe::vm.kmem_cache_alloc — Fires when \
Synopsis
vm.kmem_cache_alloc
Values
ptr
-
Pointer to the kmemory allocated
caller_function
-
Name of the caller function.
call_site
-
Address of the function calling this kmemory function.
gfp_flag_name
-
Type of kmemory to allocate(in string format)
name
-
Name of the probe point
bytes_req
-
Requested Bytes
bytes_alloc
-
Allocated Bytes
gfp_flags
-
type of kmemory to allocate
Description
kmem_cache_alloc is requested.
Name
probe::vm.kmalloc_node — Fires when kmalloc_node is requested.
Values
ptr
-
Pointer to the kmemory allocated
caller_function
-
Name of the caller function.
call_site
-
Address of the function caling this kmemory function.
gfp_flag_name
-
Type of kmemory to allocate(in string format)
name
-
Name of the probe point
bytes_req
-
Requested Bytes
bytes_alloc
-
Allocated Bytes
gfp_flags
-
type of kmemory to allocate
Name
probe::vm.kmem_cache_alloc_node — Fires when \
Synopsis
vm.kmem_cache_alloc_node
Values
ptr
-
Pointer to the kmemory allocated
caller_function
-
Name of the caller function.
call_site
-
Address of the function calling this kmemory function.
gfp_flag_name
-
Type of kmemory to allocate(in string format)
name
-
Name of the probe point
bytes_req
-
Requested Bytes
bytes_alloc
-
Allocated Bytes
gfp_flags
-
type of kmemory to allocate
Description
kmem_cache_alloc_node is requested.
Name
probe::vm.kfree — Fires when kfree is requested.
Values
ptr
-
Pointer to the kmemory allocated which is returned by kmalloc
caller_function
-
Name of the caller function.
call_site
-
Address of the function calling this kmemory function.
name
-
Name of the probe point
Name
probe::vm.kmem_cache_free — Fires when \
Synopsis
vm.kmem_cache_free
Values
ptr
-
Pointer to the kmemory allocated which is returned by kmem_cache
caller_function
-
Name of the caller function.
call_site
-
Address of the function calling this kmemory function.
name
-
Name of the probe point
Description
kmem_cache_free is requested.
Name
function::proc_mem_size — Total program virtual memory size in pages
Synopsis
function proc_mem_size:long()
Description
Returns the total virtual memory size in pages of the current process, or zero when there is no current process or the number of pages couldn't be retrieved.
Name
function::proc_mem_size_pid — Total program virtual memory size in pages
Synopsis
function proc_mem_size_pid:long(pid:long)
Arguments
pid
-
The pid of process to examine
Description
Returns the total virtual memory size in pages of the given process, or zero when that process doesn't exist or the number of pages couldn't be retrieved.
Name
function::proc_mem_shr — Program shared pages (from shared mappings)
Synopsis
function proc_mem_shr:long()
Description
Returns the shared pages (from shared mappings) of the current process, or zero when there is no current process or the number of pages couldn't be retrieved.
Name
function::proc_mem_shr_pid — Program shared pages (from shared mappings)
Synopsis
function proc_mem_shr_pid:long(pid:long)
Arguments
pid
-
The pid of process to examine
Description
Returns the shared pages (from shared mappings) of the given process, or zero when the process doesn't exist or the number of pages couldn't be retrieved.
Name
function::proc_mem_txt — Program text (code) size in pages
Synopsis
function proc_mem_txt:long()
Description
Returns the current process text (code) size in pages, or zero when there is no current process or the number of pages couldn't be retrieved.
Name
function::proc_mem_txt_pid — Program text (code) size in pages
Synopsis
function proc_mem_txt_pid:long(pid:long)
Arguments
pid
-
The pid of process to examine
Description
Returns the given process text (code) size in pages, or zero when the process doesn't exist or the number of pages couldn't be retrieved.
Name
function::proc_mem_data — Program data size (data + stack) in pages
Synopsis
function proc_mem_data:long()
Description
Returns the current process data size (data + stack) in pages, or zero when there is no current process or the number of pages couldn't be retrieved.
Name
function::proc_mem_data_pid — Program data size (data + stack) in pages
Synopsis
function proc_mem_data_pid:long(pid:long)
Arguments
pid
-
The pid of process to examine
Description
Returns the given process data size (data + stack) in pages, or zero when the process doesn't exist or the number of pages couldn't be retrieved.
Name
function::mem_page_size — Number of bytes in a page for this architecture
Synopsis
function mem_page_size:long()
Name
function::bytes_to_string — Human readable string for given bytes
Synopsis
function bytes_to_string:string(bytes:long)
Arguments
bytes
-
Number of bytes to translate.
Description
Returns a string representing the number of bytes (up to 1024 bytes), the number of kilobytes (when less than 1024K) postfixed by 'K', the number of megabytes (when less than 1024M) postfixed by 'M' or the number of gigabytes postfixed by 'G'. If representing K, M or G, and the number is amount is less than 100, it includes a '.' plus the remainer. The returned string will be 5 characters wide (padding with whitespace at the front) unless negative or representing more than 9999G bytes.
Name
function::pages_to_string — Turns pages into a human readable string
Synopsis
function pages_to_string:string(pages:long)
Arguments
pages
-
Number of pages to translate.
Description
Multiplies pages by page_size
to get the number of bytes and returns the result of bytes_to_string
.
Name
function::proc_mem_string — Human readable string of current proc memory usage
Synopsis
function proc_mem_string:string()
Description
Returns a human readable string showing the size, rss, shr, txt and data of the memory used by the current process. For example “size: 301m, rss: 11m, shr: 8m, txt: 52k, data: 2248k”.
Name
function::proc_mem_string_pid — Human readable string of process memory usage
Synopsis
function proc_mem_string_pid:string(pid:long)
Arguments
pid
-
The pid of process to examine
Description
Returns a human readable string showing the size, rss, shr, txt and data of the memory used by the given process. For example “size: 301m, rss: 11m, shr: 8m, txt: 52k, data: 2248k”.