DTRACE_PID(4)
π NAME π
okay so this page lives in the Kernel Interfaces Manual, and the main character is dtrace_pid β a DTrace provider for dynamic userspace tracing based on function boundary instrumentation. β¨
β¨ SYNOPSIS β¨
pidPID:module:function:entry
pidPID:module:function:[offset]
pidPID:module:function:return
π¦ DESCRIPTION π¦
The pid provider is literally how you do userspace dynamic tracing by instrumenting the entry and return of functions in userspace programs. For more details about function boundary instrumentation, go read dtrace_fbt(4) β it's giving the full backstory. π«Ά
The pid provider provides the following probes:
pidPID:module:function:entryβ instruments the entry of the function.pidPID:module:function:[offset]β instruments the instruction within the function located at offset bytes (expressed as a hexadecimal integer).pidPID:module:function:returnβ instruments the return from the function.
π Probe Arguments π
The arguments of the entry probe (pidPID:module:function:entry) are the arguments of the traced function call. Entry probe tea:
Entry Probe Argument / Definition
uint64_t arg0β Function's first argumentuint64_t arg1β Function's second argumentuint64_t arg2β Function's third argument...β...
The offset probes (pidPID:module:function:[offset]) do not define any arguments. Use uregs[] to inspect the registers. No cap.
The arguments of the return probe (pidPID:module:function:return) are the program counter and the function's return value. Return probe tea:
Return Probe Argument / Definition
uint64_t arg0β Program counteruint64_t arg1β Function's return value
Note that all probe arguments within the pid provider are of type uint64_t. Periodt. π
π SEE ALSO π
The whole squad:
Brendan Gregg and Jim Mauro, DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD, Prentice Hall, https://www.brendangregg.com/dtracebook/, 2011.
The illumos Dynamic Tracing Guide, https://illumos.org/books/dtrace/chp-pid.html, 2008, Chapter pid Provider.
π AUTHORS π
This manual page was written by Mateusz Piotrowski <0mp@FreeBSD.org>. Iconic. π
π«Ά xoxo, your Debian bestie β this page is dated November 6, 2025 and filed under DTRACE_PID(4) π β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- π the page's license: BSD-2-Clause
- Copyright (c) 2025 Mateusz Piotrowski <0mp@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms