Solaris 10 What's New

DTrace Dynamic Tracing Facility

DTrace is a feature of key importance in the Solaris 10 OS. DTrace is new in the Solaris Express 11/03 release and was enhanced in the Solaris Express 5/04 release and the Solaris Express 11/04 release.

DTrace is a comprehensive dynamic tracing facility that gives Solaris users, administrators, and developers a new level of observability into the kernel and user processes.

DTrace helps you understand your system by permitting you to dynamically instrument the operating system kernel and user processes to record data that you specify at locations of interest, called probes. Probes are like small programmable sensors that are scattered all over your Solaris system. More than 30,000 probes are included in this release. Each probe can be associated with custom programs that are written in the new D programming language. This association enables you to access system data by using ANSI C types and expressions and easily capture stack traces, record timestamps, build histograms, and more.

All of DTrace's instrumentation is entirely dynamic and available for use on your production system. When DTrace is off, you have no performance cost. The performance impact of any tracing is limited to only those probes and actions that you enable. Moreover, DTrace is safe: you can't damage the running system because DTrace has security, complete safety, and error checking at the core of its design. These features enable you to use DTrace with confidence on your running system whenever you need the facility to help investigate a problem.

The Solaris Dynamic Tracing Guide and a set of man pages, including dtrace(1M), are provided to help you learn DTrace. The guide includes a complete feature reference and examples to help you get started. You can also join the DTrace forum on BigAdmin (see http://www.sun.com/bigadmin/content/dtrace) to learn more about DTrace, download example programs, and ask questions.

In the Solaris Express 5/04 release, user-process tracing that uses the pid provider was made available for x86 systems. This feature has been available on SPARC platforms since the introduction of DTrace in the Solaris Express 11/03 release.

The pid provider enables you to trace any instruction in any process either at the level of any function call's entry and return, or at any offset into any function. For complete details, see Chapter 27, “pid Provider,” and Chapter 32, “User Process Tracing,” in the Solaris Dynamic Tracing Guide.

In the Solaris Express 11/04 release, the plockstat(1M) utility enables you to observe user-level synchronization primitives, such as lockstat(1M) in the kernel. The DTrace plockstat provider is the underlying instrumentation methodology for plockstat(1M). Dtrace plockstat can be used to augment the data recorded by the plockstat utility. See the plockstat(1M) man page for further information.