0.3.0 (Sep 14th, 2012)

Kernel release:

2.6.39-201.0.1.el6uek

New features:

  • CTF support. This exposes all kernel types declared at the global scope to DTrace scripts (even those private to single files). All global kernel variables not declared static are also available to the ` operator as external variables.

    The module for kernel-wide symbols is known as vmlinux, but genunix can still be used as a name for it to aid script portability.

    Kernel modules from a compatible kernel must be visible to DTrace for this feature to work, as must the kernel-provided file /proc/kallmodsyms. DTrace will work with no kernel modules, with no visible /proc, or with a kernel whose modules do not contain type information, but no kernel types or variables will be available. (See -xprocfspath and -xmodpath below.)

  • The curcpu builtin variable has been implemented as a DIF builtin variable on Linux, providing a pointer to the CPU info structure for the CPU that is currently active.

  • A new DIF subroutine has been implemented: d_path(). This subroutine takes a pointer to a path structure as argument, and returns a string representing the full pathname for that path.

  • The raise() action has been implemented. This action allows a D script to raise a signal in the current task.

  • The io provider probes has been implemented. It provides the following SDT probes: start, wait-start, wait-done, and done.

  • The proc provider has been implemented. It provides the following SDT probes: create, exec, exec-failure, exit, lwp-create, lwp-exit, lwp-start, signal-clear, signal-discard, signal-handle, signal-send, start.

  • The sched provider has been implemented. It provides the following SDT probes: change-pri, dequeue, enqueue, off-cpu, on-cpu, preempt, remain-cpu, sleep, surrender, tick, wakeup.

  • Argument mappings have been provided for io, proc, and sched provider probes. This information is used by userspace consumers.

New dependencies:

  • DTrace now depends on libdtrace-ctf, a modified, GPLed port of the Solaris libctf type-storage library. Despite its name it cannot read Solaris CTF files: the file formats are incompatible.

New options:

  • -xprocfspath: if set, specifies the path to /proc. May be useful in chroots, though glibc and other things may break if /proc is moved to another location.

  • -xmodpath: if set, specifies the path to kernel modules, rather than looking in /lib/modules/$(uname -r).

Options removed:

  • The undocumented -xlinkmode=primary option is removed: it never worked in DTrace for Linux in any case.

Bugfixes:

  • The -c and -p command-line options work.

  • Lexer bugs causing aggressive and unnecessary reading of modules are fixed. As a result, when used with typo-free scripts, DTrace now starts much faster than ever it did on Solaris (often taking half the time or less). You may find a few error messages have changed error text (though not error tag) as a result of this bugfix and the following one.

  • The SDT provider now describes its argument types to DTrace userspace.

  • The types of many DTrace actions and variables are fixed to correspond to the Linux reality.

  • The set of available error numbers in errno.d is more complete.

  • DTrace libraries are installed to /usr/lib64 now, not /usr/lib.

  • Users of dtrace -C can now include <sys/dtrace.h> without incident.

  • Various DIF builtin variables that were providing a hardcoded value based on the init task whenever a probe was executing in interrupt context are now providing the actual value from the current task. In Linux, there is always a valid task structure available as 'current'.

  • The numbering of the registers for the x86_64 architecture has been updated to match the order of registers pushed onto the stack.

  • It is now possible to get the correct value for the DS, ES, FS, and GS registers.

  • SDT probes are now correctly cleaned up when the SDT meta-provider module is unloaded from the system.

  • The rw_read_held() DIF subroutine will now verify whether it can safely access the passed in argument based on the correct argument datatype.

Changes to user-visible internals:

  • A new file /proc/kallmodsyms now exists, like /proc/kallsyms but giving object sizes and listing the module each kernel object would be part of were it built as a module, even if it is currently built in.

  • A new module dtrace_ctf.ko is pulled in whenever dtrace.ko is loaded. It is a container for type information.

  • The undocumented -B buffer-inspection command-line option no longer crashes DTrace.

  • The invalid operand trap logic previously provided to support SDT probes has been made more generic to support any probes that wish to utilize this facility.

  • The DTrace core module now depends on the core kernel CTF data-module, to ensure that when DTrace modules are loaded on the system, CTF data for the kernel will be available also.