0.4.0 (Sep 20th, 2013)

Kernel release:

3.8.13-16.el6uek

New features:

  • Support for meta-providers, such as fasttrap (used for userspace tracing). A meta-provider implements a framework to instantiate providers dynamically (on demand).

  • Userspace Statically Defined Tracing (USDT) provides support for SDT-alike probes in userspace executable and libraries. Two types of probes are available: regular SDT-alike probes, and is-enabled probes. A new header file (sys/sdt.h) is installed in support of USDT.

  • The fasttrap provider has been implemented, although it is currently only supporting USDT probes.

  • Symbol lookup now works: stack() and ustack() now print symbols, as does &. ustack() can look up symbols in libraries loaded with dlopen() and dlmopen() as well as via DT_NEEDED. Symbol lookup of global symbols in userspace processes respects symbol interposition and all other symbol-ordering trickery. Some of the machinery involved in this only works with programs running against specific versions of the GNU C Library. (It will always work with the version of glibc shipped with OEL, and falls back to a simpler approach which does not support symbol interposition or dlmopen() if it appears an incompatible glibc is in use).

    This depends on new machinery in the kernel, notably waitfd()s and PTRACE_GETMAPFD, so will not work with earlier DTrace kernels.

  • -xevaltime={preinit, postinit, main} now work, with a few caveats:

    • postinit (the default) is equivalent to main.

    • On statically linked binaries, preinit is equivalent to exec, and may not skip ld.so initialization (which can happen after main() on such binaries).

    • On stripped, statically linked binaries, postinit and main are equivalent to preinit, because we cannot look up the 'main' symbol when there is no symbol table.

  • DTrace options can now be set from environment variables named DTRACE_OPT_*. Example:

    export DTRACE_OPT_INCDIR=/usr/lib64/dtrace:/usr/include/sys

Changes to user-visible internals:

  • The ELF section in which CTF data is stored has changed from .dtrace_ctf to .ctf.

  • The storage representation of internal kernel symbols is improved, saving DTrace memory usage at startup by a megabyte or so.

  • The libdtrace public API header now names its arguments. A few other libdtrace functions have changed prototype: see INCOMPATIBILITIES.

  • Two undocumented libproc environment variables from Solaris are removed, because the code whose behaviour they adjusted no longer exists: _LIBPROC_INCORE_ELF and _LIBPROC_NO_QSORT.

  • New low-overhead debugging machinery. Exporting DTRACE_DEBUG=signal in the environment will emit debugging output only when DTrace is hit by a SIGUSR1, avoiding all printf() locking overhead until then. This uses a ring buffer to stop debugging output, by default 100Mb in size, changeable via the DTRACE_DEBUG_BUF_SIZE variable (which takes a size in megabytes).

  • What was previously defined as a meta-provider (see 0.2.0 below) is in fact better defined as a multi-provider, i.e. a provider framework that handles multiple providers that essentially share (the majority of) a single implementation, such as SDT where probes are grouped together into providers even though they are all provided by the same provider (sdt).

  • The DTrace header files in the kernel proper, the kernel modules, and the userspace utility have been restructured to avoid duplication and to offer a more consistent and clean design. This also offers better support for custom consumers or other DTrace-related utilities.

  • The systrace provider has been updated to account for changes in the Linux kernel (between 2.6.39 and 3.8.13).

Bugfixes:

  • It is now possible to get the correct value for the ERR registers.

  • The ustack() and jstack() actions were not passing the PID correctly as the first element in the result array.

  • The ustack() action implementation has been replaced.

  • Several obscure locking problems have been resolved.

  • Correct handling of arg5 through arg9.

  • The -h and -G command-line options work.

  • Negative values passed to DTrace options that take only positive integers are correctly diagnosed as errors again.

Known problems:

  • Presently, kill -9'ing a running dtrace can leave breakpoints outstanding in other processes, which may sooner or later kill them. This will be fixed in due course (by avoiding the use of breakpoints in more cases).