16.5 Stability Enforcement

When developing a DTrace script or layered tool, you might want to identify the specific source of stability issues or ensure that your program has a desired set of stability attributes. You can use the -x amin=_attributes_ option with the dtrace command to force the D compiler to produce an error whenever any attributes computation results in a triplet of attributes less than the minimum values that you specify on the command line.

The following example demonstrates the use of the -x amin option using a snippet of D program source. Note that attributes are specified with three labels that are delimited /, in the usual order:

# dtrace -x amin=Evolving/Evolving/Common \
  -ev -n dtrace:::BEGIN’{trace(curthread->parent);}’
dtrace: invalid probe specifier dtrace:::BEGIN{trace(curthread->parent);}: \
    in action list: attributes for scalar curthread (Stable/Private/Common) \
    are less than predefined minimum