0.6.0 (Apr 3rd, 2017)

Kernel release:

4.1.12-97.el6uek

New features:

  • Function boundary tracing (FBT) is supported for entry probes to most functions in the core kernel. The current implementation does not support retrieval of function arguments or return probes (except for some limited support on x86_64). These features are currently under development.

  • The ip provider is implemented, supporting ip:::send, ip:::receive, ip:::drop-in and ip:::drop-out, with parameters compatible with other implementations and appropriate translators. IPv4 and IPv6 are both supported.

  • Userspace tracepoints (USDT) now work on SPARC for both 64- and 32-bit processes.

  • The types and translators used by SDT probes are now acquired from the DTRACE_PROBE macros in the kernel source. New probe argument types and translations are picked up automatically without needing to change the module at all. perf-event probe argument types are acquired in the same way.

  • The DTRACE_PROBEn() macros used for SDT probes have been supplanted by a new DTRACE_PROBE() macro which works exactly the same except that you don't need to count the arguments any more and misuses (args with no types, etc) are diagnosed even when CONFIG_DTRACE is disabled. Much the same has been done for USDT, except that the old numbered USDT macros remain available for code that must be compiled with compilers that don't support __VA_ARGS__ comma elision (such as GCC when in c89/strict-ANSI mode). This involves a new, installed, internal header, /usr/include/sys/sdt_internal.h.

  • is-enabled probes are now supported for SDT: these are expressions which always return false unless the specified probe is enabled, generally used directly in if statements, and can be used to suppress collection of expensive data only needed for probes until the probes that use them are enabled:

    if (DTRACE_PROBE_ENABLED(probename)) /* expensive stuff */

    Per-provider wrappers for DTRACE_PROBE_ENABLED() can be used, as with DTRACE_PROBE() itself.

  • dtrace consumers (including dtrace(1)) can now grab themselves via -p, though symbol resolution is degraded when they do so because they cannot stop themselves. (Previously, such grabs were suppressed but the code to do so was buggy and caused dtrace not to terminate if dtrace was asked to do a self-grab in conjunction with a -c of some other process, even once the other process had terminated.)

  • D translators for the ip provider are now available.

Bugfixes:

  • Due to a logic error in preemption handling, it was possible that code was being executed under the assumption that preemption was disabled when in fact it was not.

  • Probe processing (probe context) is not re-entrant, yet probes firing as a result of processing another probe would cause re-entry into the processing core, with often horrible effects. The processing core has been modified to block any re-entry attempt except for ERROR probe processing. That is a deliberate (and acceptable) exception in the DTrace design.

  • The fast path implementation for obtaining the value of the D 'caller' variable for sparc64 has been corrected.

  • The implementation of the D 'stack' action has been made more robust, making sure that memory access faults are not fatal.

  • The implementation of the D 'ustack' action has been reworked completely to improve stability and accuracy.

  • The number of stack frames to skip has been adjusted to changes in the implementation of various providers, ensuring that DTrace related frames are skipped as they should. This makes the D 'stack' action and the D 'caller' variable values correct.

  • The implementation of the D 'stackdepth' variable could cause memory writes beyond the end of the DTrace probe scratch buffer.

  • Numerous dtrace -c/-p and USDT fixes on SPARC systems, with symptoms varying from a hanging dtrace and child process to a dtrace that runs out of file descriptors.

  • Fix memory and fd leaks when a process monitored with -c or -p exec()s frequently.

Changes to user-visible internals:

  • DTrace now uses /proc/$pid/map_files, where available.

  • The implementation of the D 'ustack' action has been moved into the kernel proper. This change was motivated by the need to access page table structures directly using a lock-free mechanism.

  • Probe processing will be bypassed when the system is entering panic mode, This ensures that DTrace will not cause panic related output to be disrupted.

  • dtrace -S now dumps the offset of DIF as well as the instruction counter, allowing you to more easily match up DIF disassembly with errors from the kernel.

  • Predicate DIF is disassembled in dtrace -S output.