DTrace offers easy-but-powerful dynamic tracing of system behavior, and it is so lightweight and safe that it can routinely be used on production systems. DTrace was originally developed for the Oracle Solaris operating system.
Oracle has also ported DTrace to Linux. Recent enhancements for Linux include:
- initial ARM64 support
- implementation of additional providers (lockstat, initial pid provider support)
- improved feature alignment with other DTrace implementations (llquantize, a third argument to tracemem, etc.)
- compile-time array bounds checking
- translator support for kernels 4.12 – 4.14
- pid provider support for userspace tracing
- bug fixes (better address-to-symbolic-name translation, drastically faster dtrace_sync() data updating, etc.)
Providers now include:
| X86 | ARM64 | Provider |
|---|---|---|
| X | X | dtrace (BEGIN, END, ERROR) |
| X | fbt (function boundary tracing) | |
| X | io | |
| X | ip | |
| X | lockstat | |
| X | perf | |
| X | X | pid (tracing in a specific pid) |
| X | proc (e.g. for process creation and termination) | |
| X | X | profile |
| X | sched | |
| X | sdt (statically defined tracing; e.g., for instrumenting specific source code sites) | |
| X | X | usdt (statically defined tracing for user applications) |
| X | X | syscall |
| X | tcp | |
| X | udp |
DTrace for Linux is shipped as part of the Unbreakable Enterprise Kernel (UEK) Release 4 for Oracle Linux (for x86_64) and UEK Release 5 (for aarch64 and x86_64 with Oracle Linux 7). Going forward, new versions of DTrace will be released exclusively on UEK R5 and beyond, as development for UEK R4 is no longer active.
The recent DTrace for Linux presentation at FOSDEM 2018 provides more helpful details.
Download information can be found athttps://www.oracle.com/linux/downloads/linux-dtrace.html On Oracle Linux, you can install the dtrace-utils and dtrace-utils-devel packages, which can be found on yum.oracle.com or the Unbreakable Linux Network.
In addition, source code is available with other Oracle open source projects on github at https://github.com/oracle/dtrace-utils.
The Linux kernel DTrace code is also merged periodically with more recent upstream kernels and the resulting code can be found in a git repository on oss.oracle.com: https://github.com/oracle/dtrace-linux-kernel.
Help is available on the dtrace-devel mailing list.