Principal Buffer Policies

DTrace enables tracing in highly constrained contexts in the kernel. In particular, DTrace enables tracing in contexts in which kernel software may not reliably allocate memory. The consequence of this flexibility of context is that there always exists a possibility that DTrace will attempt to trace data when there is no space available. DTrace must have a policy to deal with such situations when they arise, but you can tune the policy based on the needs of a given experiment. Sometimes the appropriate policy might be to discard the new data. Other times it might be desirable to reuse the space containing the oldest recorded data to trace new data. Most often, the desired policy is to minimize the likelihood of running out of available space in the first place. To accommodate these varying demands, DTrace supports several different buffer policies. This support is implemented with the bufpolicy option, and can be set on a per-consumer basis. For more details about setting options, see DTrace Options and Tunables.