Chapter 2. Context Functions

Table of Contents

function::addr - Address of the current probe point.
function::asmlinkage - Mark function as declared asmlinkage
function::backtrace - Hex backtrace of current stack
function::caller - Return name and address of calling function
function::caller_addr - Return caller address
function::cmdline_arg - Fetch a command line argument
function::cmdline_args - Fetch command line arguments from current process
function::cmdline_str - Fetch all command line arguments from current process
function::cpu - Returns the current cpu number
function::cpuid - Returns the current cpu number
function::egid - Returns the effective gid of a target process
function::env_var - Fetch environment variable from current process
function::euid - Return the effective uid of a target process
function::execname - Returns the execname of a target process (or group of processes)
function::fastcall - Mark function as declared fastcall
function::gid - Returns the group ID of a target process
function::int_arg - Return function argument as signed int
function::is_myproc - Determines if the current probe point has occurred in the user's own process
function::is_return - Whether the current probe context is a return probe
function::long_arg - Return function argument as signed long
function::longlong_arg - Return function argument as 64-bit value
function::modname - Return the kernel module name loaded at the address
function::module_name - The module name of the current script
function::pexecname - Returns the execname of a target process's parent process
function::pgrp - Returns the process group ID of the current process
function::pid - Returns the ID of a target process
function::pid2execname - The name of the given process identifier
function::pid2task - The task_struct of the given process identifier
function::pn - Returns the active probe name
function::pointer_arg - Return function argument as pointer value
function::pp - Returns the active probe point
function::ppid - Returns the process ID of a target process's parent process
function::print_backtrace - Print stack back trace
function::print_regs - Print a register dump
function::print_stack - Print out kernel stack from string
function::print_ubacktrace - Print stack back trace for current task.
function::print_ubacktrace_brief - Print stack back trace for current task.
function::print_ustack - Print out stack for the current task from string.
function::probe_type - The low level probe handler type of the current probe.
function::probefunc - Return the probe point's function name, if known
function::probemod - Return the probe point's kernel module name
function::pstrace - Chain of processes and pids back to init(1)
function::register - Return the signed value of the named CPU register
function::registers_valid - Determines validity of register and u_register in current context
function::regparm - Specify regparm value used to compile function
function::remote_id - The index of this instance in a remote execution.
function::remote_uri - The name of this instance in a remote execution.
function::s32_arg - Return function argument as signed 32-bit value
function::s64_arg - Return function argument as signed 64-bit value
function::sid - Returns the session ID of the current process
function::sprint_backtrace - Return stack back trace as string
function::sprint_stack - Return stack for kernel addresses from string
function::sprint_ubacktrace - Return stack back trace for current task as string.
function::sprint_ustack - Return stack for the current task from string.
function::stack_size - Return the size of the kernel stack
function::stack_unused - Returns the amount of kernel stack currently available
function::stack_used - Returns the amount of kernel stack used
function::stp_pid - The process id of the stapio process
function::symdata - Return the kernel symbol and module offset for the address
function::symname - Return the kernel symbol associated with the given address
function::target - Return the process ID of the target process
function::task_backtrace - Hex backtrace of an arbitrary task
function::task_cpu - The scheduled cpu of the task
function::task_current - The current task_struct of the current task
function::task_egid - The effective group identifier of the task
function::task_euid - The effective user identifier of the task
function::task_execname - The name of the task
function::task_gid - The group identifier of the task
function::task_max_file_handles - The max number of open files for the task
function::task_nice - The nice value of the task
function::task_open_file_handles - The number of open files of the task
function::task_parent - The task_struct of the parent task
function::task_pid - The process identifier of the task
function::task_prio - The priority value of the task
function::task_state - The state of the task
function::task_tid - The thread identifier of the task
function::task_uid - The user identifier of the task
function::tid - Returns the thread ID of a target process
function::u32_arg - Return function argument as unsigned 32-bit value
function::u64_arg - Return function argument as unsigned 64-bit value
function::u_register - Return the unsigned value of the named CPU register
function::uaddr - User space address of current running task
function::ubacktrace - Hex backtrace of current task stack.
function::uid - Returns the user ID of a target process
function::uint_arg - Return function argument as unsigned int
function::ulong_arg - Return function argument as unsigned long
function::ulonglong_arg - Return function argument as 64-bit value
function::umodname - Returns the (short) name of the user module.
function::user_mode - Determines if probe point occurs in user-mode
function::usymdata - Return the symbol and module offset of an address.
function::usymname - Return the symbol of an address in the current task.

The context functions provide additional information about where an event occurred. These functions can provide information such as a backtrace to where the event occurred and the current register values for the processor.