-
Notifications
You must be signed in to change notification settings - Fork 19
Home
This is the Linux port of the Solaris Dynamic Tracing Framework.
Please consider joining our development list: dtrace-devel at oss.oracle.com
DTrace is a userspace utility. The latest development code can be found in the 2.0-branch-dev branch of this dtrace-utils repository. The various releases can also be found here.
DTrace for Linux depends on libctf
(part of newer binutils, with full functionality in the upcoming version 2.36) or libdtrace-ctf.
While libctf is preferred, building against libdtrace-ctf is fully supported. Libdtrace-ctf can be found at:
https://github.com/oracle/libdtrace-ctf
DTrace for Linux makes use of BPF library functions that are compiled at build time. It depends on BPF support in GCC and binutils to generate the pre-compiled BPF function library.
In addition, DTrace for Linux makes use of 3 tracing support features that are not commonly available in the Linux kernel:
- CTF data generation at compile time: this provides important datatype information for kernel and kernel module symbols.
- waitfd() system call: this provides a mechanism to monitor for state changes of processes that are being traced.
- /proc/kallsyms module grouping support: this adds annotation with module names to all symbols that are part of a kernel module even if the module is configured to be compiled into the kernel proper. This allows for consistent ways to refer to probes by module and function (or probe) name.
These additional support features for tracing are available at: https://github.com/oracle/dtrace-linux-kernel/tree/v2/5.8.1 (as new kernels are released we'll forward port the code).
DTrace for Linux started in 2011. Since then and until 2019, DTrace for Linux required a set of custom kernel modules and core kernel support functions for its implementation. This design continued through DTrace version 1.2.1.
That version is still maintained and it supports nearly all language features available in Solaris DTrace, and a great many of the providers, including FBT
, USDT
and pid
. Perf events are available as the perf
provider.
The source code for the kernel changes for these DTrace versions is available in the dtrace-linux-kernel Github repo in the v1/* branches, ported to the most recent versions of releases Linux kernel.
These versions of DTrace require the libdtrace-ctf type storage library.
Starting from 2020, with release 2.0.0, we have re-implemented DTrace for Linux utilizing BPF and other core kernel tracing functionality. These more recent versions of DTrace are mentioned at the beginning of this page (https://github.com/oracle/dtrace-utils/wiki/DTrace-on-Linux#source-code-and-dependencies). All DTrace functionality is being moved from kernel space to userspace, and it is being re-implemented. Please refer to the Release Notes in this wiki, to see what functionality is incrementally being added.
RPMs for Oracle Linux are available from here:
Kernel/OL release | Repository |
---|---|
5.4 (UEKR6), OL8, X86 | http://yum.oracle.com/repo/OracleLinux/OL8/UEKR6/x86_64/index.html |
5.4 (UEKR6), OL8, AArch64 | http://yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/aarch64/index.html |
5.4 (UEKR6), OL7, X86 | http://yum.oracle.com/repo/OracleLinux/OL7/UEKR6/x86_64/index.html |
5.4 (UEKR6), OL7, AArch64 | http://yum.oracle.com/repo/OracleLinux/OL7/UEKR6/aarch64/index.html |
4.14 (UEKR5), OL7, x86 | https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/x86_64/index.html |
4.14 (UEKR5), OL7, AArch64 | https://yum.oracle.com/repo/OracleLinux/OL7/latest/aarch64/index.html |
The license for DTrace, post-0.6.1, is GPLv2 for the kernel component, (GPL-compatible) UPL for dtrace-utils, and dual-licensed GPLv2/UPL for libdtrace-ctf. (libdtrace-ctf master is now synched with a component in upstream binutils trunk: that component is GPLv3+.)