Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Feb 2024 15:12:29 GMT
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: fb9c50f983ff - stable/14 - dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag
Message-ID:  <202402171512.41HFCT15080804@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by avg:

URL: https://cgit.FreeBSD.org/src/commit/?id=fb9c50f983ff6bdd6f33a22ae7d5b391435dd02a

commit fb9c50f983ff6bdd6f33a22ae7d5b391435dd02a
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2021-12-24 09:38:38 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2024-02-17 14:18:04 +0000

    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)
---
 sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
index ce02676e0dc1..83c0648b23b1 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402171512.41HFCT15080804>