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 kernel stack
function::caller — Return name and address of calling function
function::caller_addr — Return caller address
function::callers — Return first n elements of kernel stack backtrace
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::pnlabel — Returns the label name parsed from the probe name
function::pointer_arg — Return function argument as pointer value
function::pp — Returns the active probe point
function::ppfunc — Returns the function name parsed from pp
function::ppid — Returns the process ID of a target process's parent process
function::print_backtrace — Print kernel stack back trace
function::print_regs — Print a register dump
function::print_stack — Print out kernel stack from string
function::print_syms — Print out kernel stack from string
function::print_ubacktrace — Print stack back trace for current user-space task.
function::print_ubacktrace_brief — Print stack back trace for current user-space task.
function::print_ustack — Print out stack for the current task from string.
function::print_usyms — Print out user stack 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_syms — Return stack for kernel addresses from string
function::sprint_ubacktrace — Return stack back trace for current user-space task as string.
function::sprint_ustack — Return stack for the current task from string.
function::sprint_usyms — Return stack for user addresses from string
function::stack — Return address at given depth of kernel stack backtrace
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_ancestry — The ancestry of the given task
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 user-space task stack.
function::ucallers — Return first n elements of user stack backtrace
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::ustack — Return address at given depth of user stack backtrace
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.