dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag
This should disable allocation of the second per-CPU principal buffer which is never used. This will also enable additional asserts for buffers that are never switched.
This commit is contained in:
@@ -12058,7 +12058,6 @@ dtrace_buffer_switch(dtrace_buffer_t *buf)
|
||||
hrtime_t now;
|
||||
|
||||
ASSERT(!(buf->dtb_flags & DTRACEBUF_NOSWITCH));
|
||||
ASSERT(!(buf->dtb_flags & DTRACEBUF_RING));
|
||||
|
||||
cookie = dtrace_interrupt_disable();
|
||||
now = dtrace_gethrtime();
|
||||
@@ -14866,10 +14865,10 @@ dtrace_state_buffer(dtrace_state_t *state, dtrace_buffer_t *buf, int which)
|
||||
|
||||
if (which == DTRACEOPT_BUFSIZE) {
|
||||
if (opt[DTRACEOPT_BUFPOLICY] == DTRACEOPT_BUFPOLICY_RING)
|
||||
flags |= DTRACEBUF_RING;
|
||||
flags |= DTRACEBUF_RING | DTRACEBUF_NOSWITCH;
|
||||
|
||||
if (opt[DTRACEOPT_BUFPOLICY] == DTRACEOPT_BUFPOLICY_FILL)
|
||||
flags |= DTRACEBUF_FILL;
|
||||
flags |= DTRACEBUF_FILL | DTRACEBUF_NOSWITCH;
|
||||
|
||||
if (state != dtrace_anon.dta_state ||
|
||||
state->dts_activity != DTRACE_ACTIVITY_ACTIVE)
|
||||
|
||||
Reference in New Issue
Block a user