Chapter 13 Statically Defined Tracing for User Applications

Table of Contents

13.1 Choosing the Probe Points
13.2 Adding Probes to an Application
13.2.1 Defining Providers and Probes
13.2.2 Adding Probes to Application Code
13.2.3 Testing if a Probe Is Enabled
13.2.4 Building Applications with Probes
13.2.5 Using Statically Defined Probes

DTrace provides a facility for user application developers to define customized probes in application code. These static probes impose little to no overhead when disabled and are dynamically enabled like all other DTrace probes. You can use static probes to describe application semantics to users of DTrace without exposing or requiring implementation knowledge of your applications. This chapter describes how to define static probes in user applications and how to use DTrace to enable such probes in user processes.


DTrace supports statically defined tracing of user applications for both 32-bit and 64-bit binaries.