While the DTrace in FreeBSD is similar to that found in Solaris™, differences do exist. The primary difference is that in FreeBSD, DTrace is implemented as a set of kernel modules and DTrace can not be used until the modules are loaded. To load all of the necessary modules:
Beginning with FreeBSD 10.0-RELEASE, the modules are
automatically loaded when
FreeBSD uses the
DDB_CTF kernel option to
enable support for loading CTF data from
kernel modules and the kernel itself. CTF is
the Solaris™ Compact C Type Format which encapsulates a reduced
form of debugging information similar to
DWARF and the venerable stabs.
CTF data is added to binaries by the
build tools. The
ctfconvert utility parses
DWARF ELF debug sections
created by the compiler and
CTF ELF sections from
objects into either executables or shared libraries.
Some different providers exist for FreeBSD than for Solaris™.
Most notable is the
dtmalloc provider, which
malloc() by type in the FreeBSD
kernel. Some of the providers found in Solaris™, such as
mib, are not
present in FreeBSD. These may appear in future versions of FreeBSD.
Moreover, some of the providers available in both operating
systems are not compatible, in the sense that their probes have
different argument types. Thus, D scripts
written on Solaris™ may or may not work unmodified on FreeBSD, and
Due to security differences, only
root may use DTrace on FreeBSD.
Solaris™ has a few low level security checks which do not yet
exist in FreeBSD. As such, the
/dev/dtrace/dtrace is strictly limited to
DTrace falls under the Common Development and Distribution
License (CDDL) license. To view this license
on FreeBSD, see
or view it online at
While a FreeBSD kernel with DTrace support is
BSD licensed, the CDDL is
used when the modules are distributed in binary form or the
binaries are loaded.