mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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. (cherry picked from commit e92491d95ff3500e140eafa614e88ca84ffb0d26)
This commit is contained in:
parent
a9bab712eb
commit
fb9c50f983
1 changed files with 2 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue