Dynamic instrumentation of production systems

Bryan Cantrill, Michael W. Shapiro, Adam Leventhal

2004 · 436 citations · 10 references

Concepts

TL;DR

The paper introduces DTrace, a new facility for dynamic instrumentation of production systems. DTrace provides a unified, safe dynamic instrumentation framework for both user‑ and kernel‑level software, supporting tens of thousands of points, a C‑like control language with user‑defined variables, and scalable data aggregation and speculative tracing. When not enabled, DTrace imposes zero probe effect, and its integration into Solaris has enabled the discovery of serious systemic performance problems on production systems that were previously undetectable with existing facilities.

Abstract

This paper presents DTrace, a new facility for dynamic instrumentation of production systems. DTrace features the ability to dynamically instrument both user-level and kernel-level software in a unified and absolutely safe fashion. When not explicitly enabled, DTrace has zero. probe effect--the system operates exactly as if DTrace were not present at all. DTrace allows for many tens of thousands of instrumentation points, with even the smallest of systems offering on the order of 30,000 such points in the kernel alone. We have developed a C-like high-level control language to describe the predicates and actions at a given point of instrumentation. The language features user-defined variables, including thread-local variables and associative arrays. To eliminate the need for most postprocessing, the facility features a scalable mechanism for aggregating data and a mechanism for speculative tracing. DTrace has been integrated into the Solaris operating system and has been used to find serious systemic performance problems on production systems-problems that could not be found using pre-existing facilities.

References

10