Solaris Dynamic Tracing Guide

How This Book Is Organized

Chapter 1, Introduction provides a whirlwind tour of the entire DTrace facility and introduces readers to the D programming language. Chapter 2, Types, Operators, and Expressions, Chapter 3, Variables, and Chapter 4, D Program Structure then discuss the fundamentals of D in greater detail, and explain how D programs are converted into dynamic instrumentation. This initial group of chapters should be read first by all readers.

Chapter 5, Pointers and Arrays, Chapter 6, Strings, Chapter 7, Structs and Unions, and Chapter 8, Type and Constant Definitions discuss the remaining D language features, most of which will be familiar already to C, C++, and JavaTM programmers. Readers who are unfamiliar with any of these languages should read these chapters; more experienced programmers may wish to proceed directly to later chapters.

Chapter 9, Aggregations and Chapter 10, Actions and Subroutines discuss DTrace's powerful primitive for aggregating data and the set of built-in actions that can be used to build tracing experiments. All readers should carefully read these chapters.

Chapter 11, Buffers and Buffering describes the DTrace policies for buffering data and how these can be configured. This chapter should be read by users once they are familiar with constructing and running D programs.

Chapter 12, Output Formatting describes the D output formatting actions as well as the default policy for formatting trace data. Readers who are familiar with the C printf() function can rapidly skim this chapter. Readers who have never seen printf() before should read this chapter carefully.

Chapter 13, Speculative Tracing discusses the DTrace facility for speculatively committing data to a trace buffer. This chapter should be read by users who need to use DTrace in a situation where data must be traced prior to understanding whether it is relevant to the question at hand.

Chapter 14, dtrace(1M) Utility provides a complete reference for the dtrace command-line utility, similar to the corresponding on-line manual page. Readers may wish to refer to this chapter when various command-line options are presented elsewhere in the book. Chapter 15, Scripting then discusses how the dtrace utility can be used to construct executable D scripts and process their command-line arguments, and Chapter 16, Options and Tunables describes the options that can be tuned on the command-line or from within a D program itself.

The group of chapters beginning with Chapter 17, dtrace Provider and ending with Chapter 32, fasttrap Provider discuss the various DTrace providers that can be used to instrument various aspects of the Solaris system. All readers should skim these chapters to familiarize themselves with the various providers, and then return back to read particular chapters in detail as needed.

Chapter 33, User Process Tracing discusses examples of using DTrace to instrument user processes. Chapter 34, Statically Defined Tracing for User Applications describes how application programmers can add customized DTrace providers and probes to user applications. Readers who are user program developers or administrators and wish to use DTrace to investigate user process behavior should read these chapters.

Chapter 35, Security and the remaining chapters discuss advanced topics such as security, versioning, and stability attributes of DTrace, and how to perform boot-time and post-mortem tracing with DTrace. These chapters are intended for advanced DTrace users.