User`s guide
DTrace
5
• The DTrace header files in the kernel, kernel modules, and DTrace user-space utility have been
restructured to provide better support for custom consumers and DTrace-related utilities.
• The systrace provider has been updated to account for changes in the 3.8.13 kernel.
• Symbol lookup can now be performed by the & operator. ustack() output contains symbolic names
instead of addresses provided that the symbols are present in the DT_NEEDED section of the ELF
objects or in libraries that have been loaded with dlopen() or dlmopen(). Symbol lookup of global
symbols in user-space processes respects symbol interposition and similar methods of symbol-ordering.
Symbol lookup works correctly with programs that you compiled against the version of the GNU C
Library (glibc) that ships with Oracle Linux 6.4 or later. With other versions of glibc, symbol lookup
might fall back to using a simpler approach that does not support symbol interposition or dlmopen(). As
symbol lookup depends on new machinery in the kernel that uses waitfd() and PTRACE_GETMAPFD, it
does not work with earlier DTrace kernels.
• The -x evaltime={exec | main | preinit | postinit} option to dtrace is now available with the
following limitations:
• postinit (the default behavior) is equivalent to main.
• For statically linked binaries, preinit is equivalent to exec, and it might not skip ld.so initialization,
which can happen after main().
• For stripped, statically linked binaries, both postinit and main are equivalent to preinit, because
the main symbol cannot be looked up if there is no symbol table.
In previous versions of DTrace, the default behavior was equivalent to evaltime=exec being set.
• You can now set DTrace options by using environment variables named DTRACE_OPT_NAME, where
NAME is the name of the option in upper case. For example, the variable name corresponding to
incdir, which adds a #include directory to the preprocessor search path, is DTRACE_OPT_INCDIR:
# export DTRACE_OPT_INCDIR=/usr/lib64/dtrace:/usr/include/sys
• The following changes have been made to user-visible internals:
• The name of the ELF section in which CTF data is stored has been changed from .dtrace_ctf to
.ctf.
• The storage representation of internal kernel symbols has been improved, which reduces DTrace
memory usage at start up by approximately one megabyte.
• The libdtrace public API header now names its arguments.
• The prototypes for several libdtrace functions have changed.
• Two undocumented libproc environment variables (_LIBPROC_INCORE_ELF and
_LIBPROC_NO_QSORT) from Oracle Solaris have been removed because the code, whose behaviour
they adjusted, no longer exists.
• New low-overhead debugging machinery has been implemented. If you export the
DTRACE_DEBUG=signal environment variable, DTrace will emit debugging output only when it
receives a SIGUSR1, avoiding the overhead due to printf() locking affecting any timings. The
mechanism uses a ring buffer with a default size of 100 (in units of megabytes), which you can adjust
by setting the value of the DTRACE_DEBUG_BUF_SIZE variable.
• Negative values specified to dtrace options that take only positive integers are now correctly diagnosed
as errors.