5.2 Principal Buffer Policies

DTrace permits tracing in highly constrained contexts in the kernel. In particular, DTrace permits tracing in contexts in which kernel software might not reliably allocate memory. One consequence of this flexibility of context is that there always exists a possibility that DTrace might attempt to trace data when there is no space available. DTrace must have a policy to deal with such situations as they arise. However, you might choose to 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 enable the tracing of 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. See Chapter 10, Options and Tunables for more details.