DTraceToolkit Style Guide

This is a guide for writing DTrace scripts in the style used by the DTraceToolkit - a collection of useful DTrace scripts for Solaris 10.
Note: This document is not written by Sun.
Brendan Gregg, 20-Apr-2006, version 0.20.


Contents



1. Intro



2. Generic coding

The following are the same as C programmang in the style enforced by cstyle.



2.1. Line width of 80 chars



2.2. Line continuation of 4 chars



2.3. Term seperator



2.4. Comments



2.5. cstyle



3. DTrace specific

The following are specific to the D programming language.



3.1. Fully qualified probe names



3.2. BEGIN with a printf



3.3. Sampling/Tracing...



3.4. Units



10. Links


Back to Brendan Gregg's Homepage


Created: 20-Apr-2006
Last updated: 20-Apr-2006
Copyright (c) 2006 Brendan Gregg