Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Feb 2022 02:48:22 GMT
From:      Chuck Silvers <chs@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: f339a3ef6369 - main - dtrace: remove unnecessary fflush()
Message-ID:  <202202100248.21A2mMWw070398@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by chs:

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

commit f339a3ef6369b368f3a2455792a7a3a4c28f92c4
Author:     Chuck Silvers <chs@FreeBSD.org>
AuthorDate: 2022-02-10 01:09:26 +0000
Commit:     Chuck Silvers <chs@FreeBSD.org>
CommitDate: 2022-02-10 01:09:26 +0000

    dtrace: remove unnecessary fflush()
    
    This call was added back in the early days of dtrace porting and
    no one knows why anymore.  The extra flushing causes lots of
    unnecessary CPU overhead when a script produces lots of output,
    as well as easily losing output because the command can't keep up.
    
    Sponsored by:   Netflix
    Reviewed by:    imp, markj
    Differential Revision:  https://reviews.freebsd.org/D34216
---
 cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c
index 2d8c24a0a596..1729eaf2e7be 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c
@@ -694,7 +694,6 @@ dt_printf(dtrace_hdl_t *dtp, FILE *fp, const char *format, ...)
 
 	va_copy(ap2, ap);
 	n = vfprintf(fp, format, ap2);
-	fflush(fp);
 	va_end(ap2);
 	va_end(ap);
 



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