DTrace Improvements

A number of bug fixes and enhancements including module and utility updates are included for DTrace on UEK R4U7, bringing the current version to 1.0.0.

The following are other notable changes that are included:

  • Bug fixes

    Numerous bug fixes have been applied to provide greater stability and better performance.

  • FBT improvements

    Several patches and bug fixes were applied to improve performance and expand the capability of the Function Boundary Tracing (FBT) module.

  • Added lockstat probes

    This update includes support for lockstat DTrace probes. These probes can be viewed using dtrace -l -P lockstat. DTrace lockstat support allows for dynamic tracing of kernel locking events. For example, these probes can provide information on which locks are most frequently used, which locks exhibit the most contention and which locks are held longest.

  • SDT probe improvements

    Improvements were made to the SDT probes (regular and isenabled) to encode these as a call to a stub function, that could rewrite these calls as NOP sequences during the boot process to minimize the impact of the presence of these probes and to prevent the likelihood of a crash during system boot.

  • Increased precision of timestamps

    Improvements were made to reintroduce a high resolution timer into DTrace so that time measurements returned in a timestamp variable are more accurate, reducing the possibility of a negative delta in a calculation.

  • Library interface changes

    An interface problem that can cause DTrace consumers to dereference freed memory when victim processes grabbed via ustack(), umod(), usym() or dtrace -c or -p exec() has been fixed. This requires changes to certain users of libdtrace, and relinking. The library soname has been bumped to libdtrace.so.1 correspondingly. All consumers must relink, but consumers not using the dtrace_proc_*() APIs need no code changes. All places where code changes are needed elicit a compile-time error. The dtrace_proc_*() functions have changed the type they take to an opaque handle, struct dtrace_proc. There is a new function dtrace_proc_getpid() to get the PID from this opaque handle. dtrace_proc_grab() has been renamed to dtrace_proc_grab_pid().

  • Compile-time array bounds checking

    User space packages were updated to add checks of the bounds of non-associative arrays, both in CTF and in declared arrays. Lvalue arrays used for assignment are also bounds-checked.