---
name: "tapset::context"
section: "3stap"
platform: "linux"
package: "systemtap-doc"
version: "5.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/tapset::context"
---

# tapset::context(3stap)

systemtap context tapset

## NAME

tapset::context - systemtap context tapset

## DESCRIPTION

 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.

-

  - **print\_regs**

  Print a register dump

-

  See  [*function::print\_regs*(3stap)](/function::print_regs/3stap.md)\
    for details.

- **pp**

  Returns the active probe point

-

  See  [*function::pp*(3stap)](/function::pp/3stap.md)\
    for details.

- **ppfunc**

  Returns the function name parsed from pp()

-

  See  [*function::ppfunc*(3stap)](/function::ppfunc/3stap.md)\
    for details.

- **probe\_type**

  The low level probe handler type of the current probe.

-

  See  [*function::probe\_type*(3stap)](/function::probe_type/3stap.md)\
    for details.

- **execname**

  Returns the execname of a target process (or group of processes)

-

  See  [*function::execname*(3stap)](/function::execname/3stap.md)\
    for details.

- **pexecname**

  Returns the execname of a target process's parent process

-

  See  [*function::pexecname*(3stap)](/function::pexecname/3stap.md)\
    for details.

- **pid**

  Returns the ID of a target process

-

  See  [*function::pid*(3stap)](/function::pid/3stap.md)\
    for details.

- **ns\_pid**

  Returns the ID of a target process as seen in a pid namespace

-

  See  [*function::ns\_pid*(3stap)](/function::ns_pid/3stap.md)\
    for details.

- **tid**

  Returns the thread ID of a target process

-

  See  [*function::tid*(3stap)](/function::tid/3stap.md)\
    for details.

- **ns\_tid**

  Returns the thread ID of a target process as seen in a pid namespace

-

  See  [*function::ns\_tid*(3stap)](/function::ns_tid/3stap.md)\
    for details.

- **ppid**

  Returns the process ID of a target process's parent process

-

  See  [*function::ppid*(3stap)](/function::ppid/3stap.md)\
    for details.

- **ns\_ppid**

  Returns the process ID of a target process's parent process as seen in a pid namespace

-

  See  [*function::ns\_ppid*(3stap)](/function::ns_ppid/3stap.md)\
    for details.

- **pgrp**

  Returns the process group ID of the current process

-

  See  [*function::pgrp*(3stap)](/function::pgrp/3stap.md)\
    for details.

- **ns\_pgrp**

  Returns the process group ID of the current process as seen in a pid namespace

-

  See  [*function::ns\_pgrp*(3stap)](/function::ns_pgrp/3stap.md)\
    for details.

- **sid**

  Returns the session ID of the current process

-

  See  [*function::sid*(3stap)](/function::sid/3stap.md)\
    for details.

- **ns\_sid**

  Returns the session ID of the current process as seen in a pid namespace

-

  See  [*function::ns\_sid*(3stap)](/function::ns_sid/3stap.md)\
    for details.

- **gid**

  Returns the group ID of a target process

-

  See  [*function::gid*(3stap)](/function::gid/3stap.md)\
    for details.

- **ns\_gid**

  Returns the group ID of a target process as seen in a user namespace

-

  See  [*function::ns\_gid*(3stap)](/function::ns_gid/3stap.md)\
    for details.

- **egid**

  Returns the effective gid of a target process

-

  See  [*function::egid*(3stap)](/function::egid/3stap.md)\
    for details.

- **ns\_egid**

  Returns the effective gid of a target process as seen in a user namespace

-

  See  [*function::ns\_egid*(3stap)](/function::ns_egid/3stap.md)\
    for details.

- **uid**

  Returns the user ID of a target process

-

  See  [*function::uid*(3stap)](/function::uid/3stap.md)\
    for details.

- **ns\_uid**

  Returns the user ID of a target process as seen in a user namespace

-

  See  [*function::ns\_uid*(3stap)](/function::ns_uid/3stap.md)\
    for details.

- **euid**

  Return the effective uid of a target process

-

  See  [*function::euid*(3stap)](/function::euid/3stap.md)\
    for details.

- **ns\_euid**

  Returns the effective user ID of a target process as seen in a user namespace

-

  See  [*function::ns\_euid*(3stap)](/function::ns_euid/3stap.md)\
    for details.

- **is\_myproc**

  Determines if the current probe point has occurred in the user's own process

-

  See  [*function::is\_myproc*(3stap)](/function::is_myproc/3stap.md)\
    for details.

- **cpuid**

  Returns the current cpu number

-

  See  [*function::cpuid*(3stap)](/function::cpuid/3stap.md)\
    for details.

- **cpu**

  Returns the current cpu number

-

  See  [*function::cpu*(3stap)](/function::cpu/3stap.md)\
    for details.

- **registers\_valid**

  Determines validity of register() and u\_register() in current context

-

  See  [*function::registers\_valid*(3stap)](/function::registers_valid/3stap.md)\
    for details.

- **user\_mode**

  Determines if probe point occurs in user-mode

-

  See  [*function::user\_mode*(3stap)](/function::user_mode/3stap.md)\
    for details.

- **is\_return**

  Whether the current probe context is a return probe

-

  See  [*function::is\_return*(3stap)](/function::is_return/3stap.md)\
    for details.

- **target**

  Return the process ID of the target process

-

  See  [*function::target*(3stap)](/function::target/3stap.md)\
    for details.

- **module\_name**

  The module name of the current script

-

  See  [*function::module\_name*(3stap)](/function::module_name/3stap.md)\
    for details.

- **module\_size**

  The module size of the current script

-

  See  [*function::module\_size*(3stap)](/function::module_size/3stap.md)\
    for details.

- **stp\_pid**

  The process id of the stapio process

-

  See  [*function::stp\_pid*(3stap)](/function::stp_pid/3stap.md)\
    for details.

- **remote\_id**

  The index of this instance in a remote execution.

-

  See  [*function::remote\_id*(3stap)](/function::remote_id/3stap.md)\
    for details.

- **remote\_uri**

  The name of this instance in a remote execution.

-

  See  [*function::remote\_uri*(3stap)](/function::remote_uri/3stap.md)\
    for details.

- **stack\_size**

  Return the size of the kernel stack

-

  See  [*function::stack\_size*(3stap)](/function::stack_size/3stap.md)\
    for details.

- **stack\_used**

  Returns the amount of kernel stack used

-

  See  [*function::stack\_used*(3stap)](/function::stack_used/3stap.md)\
    for details.

- **stack\_unused**

  Returns the amount of kernel stack currently available

-

  See  [*function::stack\_unused*(3stap)](/function::stack_unused/3stap.md)\
    for details.

- **addr**

  Address of the current probe point.

-

  See  [*function::addr*(3stap)](/function::addr/3stap.md)\
    for details.

- **uaddr**

  User space address of current running task

-

  See  [*function::uaddr*(3stap)](/function::uaddr/3stap.md)\
    for details.

- **cmdline\_args**

  Fetch command line arguments from current process

-

  See  [*function::cmdline\_args*(3stap)](/function::cmdline_args/3stap.md)\
    for details.

- **cmdline\_arg**

  Fetch a command line argument

-

  See  [*function::cmdline\_arg*(3stap)](/function::cmdline_arg/3stap.md)\
    for details.

- **cmdline\_str**

  Fetch all command line arguments from current process

-

  See  [*function::cmdline\_str*(3stap)](/function::cmdline_str/3stap.md)\
    for details.

## SEE ALSO

[*function::print\_regs*(3stap)](/function::print_regs/3stap.md), [*function::pp*(3stap)](/function::pp/3stap.md), [*function::ppfunc*(3stap)](/function::ppfunc/3stap.md), [*function::probe\_type*(3stap)](/function::probe_type/3stap.md), [*function::execname*(3stap)](/function::execname/3stap.md), [*function::pexecname*(3stap)](/function::pexecname/3stap.md), [*function::pid*(3stap)](/function::pid/3stap.md), [*function::ns\_pid*(3stap)](/function::ns_pid/3stap.md), [*function::tid*(3stap)](/function::tid/3stap.md), [*function::ns\_tid*(3stap)](/function::ns_tid/3stap.md), [*function::ppid*(3stap)](/function::ppid/3stap.md), [*function::ns\_ppid*(3stap)](/function::ns_ppid/3stap.md), [*function::pgrp*(3stap)](/function::pgrp/3stap.md), [*function::ns\_pgrp*(3stap)](/function::ns_pgrp/3stap.md), [*function::sid*(3stap)](/function::sid/3stap.md), [*function::ns\_sid*(3stap)](/function::ns_sid/3stap.md), [*function::gid*(3stap)](/function::gid/3stap.md), [*function::ns\_gid*(3stap)](/function::ns_gid/3stap.md), [*function::egid*(3stap)](/function::egid/3stap.md), [*function::ns\_egid*(3stap)](/function::ns_egid/3stap.md), [*function::uid*(3stap)](/function::uid/3stap.md), [*function::ns\_uid*(3stap)](/function::ns_uid/3stap.md), [*function::euid*(3stap)](/function::euid/3stap.md), [*function::ns\_euid*(3stap)](/function::ns_euid/3stap.md), [*function::is\_myproc*(3stap)](/function::is_myproc/3stap.md), [*function::cpuid*(3stap)](/function::cpuid/3stap.md), [*function::cpu*(3stap)](/function::cpu/3stap.md), [*function::registers\_valid*(3stap)](/function::registers_valid/3stap.md), [*function::user\_mode*(3stap)](/function::user_mode/3stap.md), [*function::is\_return*(3stap)](/function::is_return/3stap.md), [*function::target*(3stap)](/function::target/3stap.md), [*function::module\_name*(3stap)](/function::module_name/3stap.md), [*function::module\_size*(3stap)](/function::module_size/3stap.md), [*function::stp\_pid*(3stap)](/function::stp_pid/3stap.md), [*function::remote\_id*(3stap)](/function::remote_id/3stap.md), [*function::remote\_uri*(3stap)](/function::remote_uri/3stap.md), [*function::stack\_size*(3stap)](/function::stack_size/3stap.md), [*function::stack\_used*(3stap)](/function::stack_used/3stap.md), [*function::stack\_unused*(3stap)](/function::stack_unused/3stap.md), [*function::addr*(3stap)](/function::addr/3stap.md), [*function::uaddr*(3stap)](/function::uaddr/3stap.md), [*function::cmdline\_args*(3stap)](/function::cmdline_args/3stap.md), [*function::cmdline\_arg*(3stap)](/function::cmdline_arg/3stap.md), [*function::cmdline\_str*(3stap)](/function::cmdline_str/3stap.md), [*stap*(1)](/stap/1.md), [*stapprobes*(3stap)](/stapprobes/3stap.md)
