User`s guide
DTrace
4
DTrace 0.4 in UEK R3 has the following additional features compared with DTrace 0.3.2 in UEK R2:
• In UEK R2, you had to install separately available packages that contained a DTrace-enabled version
of the kernel, and you had to boot the system with this kernel to be able to use DTrace. In UEK R3,
DTrace support is integrated with the kernel. To use DTrace, you still need to install the dtrace-utils
and dtrace-modules packages, which are available on the ol6_x86_64_UEKR3_latest and
ol6_x86_64_Dtrace_userspace_latest channels. If you use yum to install the dtrace-utils
package, it automatically pulls in the other packages, such as dtrace-modules, that are required.
• The libdtrace headers, which required for implementing a libdtrace consumer, are now located in
the separate dtrace-utils-devel package. The headers for provider development are located in the
dtrace-modules-provider-headers package. If you require these packages, you must install them
separately from the dtrace-modules or dtrace-utils packages.
• Meta-provider support has been implemented, which allows DTrace to instantiate providers dynamically
on demand. An example of a meta-provider is the fasttrap provider that is used for user-space
tracing.
• User-space statically defined tracing (USDT) supports SDT-like probes in user-space executable and
libraries. To ensure that your program computes the arguments to a DTrace probe only when required,
you can use an is-enabled probe test to verify whether the probe is currently enabled.
• USDT requires programs to be modified to include embedded static probe points. The sys/sdt.h
header file is provided to support USDT, but you can also use the -h option to dtrace to generate a
suitable header file from a provider description file.
The -G option to the dtrace command processes the provider description file and the compiled object
files for the code that contains the probe points to generate a DOF ELF object file (which is a Extensible
Linking Format (ELF) object file with a DTrace Object Format (DOF) section). You can then create a
DTrace-enabled executable or shared library by linking this DOF ELF object file with the object files.
For more information, refer to the chapter Statically Defined Tracing for User Applications in the Oracle
Linux 6 Dynamic Tracing Guide, which you can find in the Oracle Linux 6 documentation library at http://
docs.oracle.com/cd/E37670_01/index.html.
• To enable the use of USDT probes in DTrace-enabled programs, you must load the new fasttrap
module:
# modprobe fasttrap
Currently, the fasttrap provider supports the use of USDT probes. It is not used to implement the pid
provider.
• DTrace-enabled versions of user-space applications are planned to be made available via the
playground repository of Oracle Public Yum (http://public-yum.oracle.com/repo/OracleLinux/OL6/
playground/latest/x86_64/). The packages that are provided in the playground repository are intended
for experimentation only and you should not use them with production systems. Oracle does not offer
support for these packages and does not accept any liability for their use.
PHP 5.4.20, PHP 5.5.4, and later versions can be built with DTrace support on Oracle Linux. See https://
blogs.oracle.com/opal/entry/using_php_dtrace_on_oracle.
PostgreSQL 9.2.4 includes support for DTrace as described in http://www.postgresql.org/docs/9.2/
static/dynamic-trace.html. You can build a DTrace-enabled version of pgsql by specifying the
--enable-dtrace option to configure as described in http://www.postgresql.org/docs/9.2/
static/install-procedure.html. For information about obtaining the PostgreSQL packages, see http://
www.postgresql.org/download/linux/redhat/.