svn commit: r365722 - in releng/12.2: . contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc lib/libc/stdlib/jemalloc share/man/man5 share/mk tools/build/options
Dimitry Andric
dim at FreeBSD.org
Mon Sep 14 14:53:11 UTC 2020
Author: dim
Date: Mon Sep 14 14:53:09 2020
New Revision: 365722
URL: https://svnweb.freebsd.org/changeset/base/365722
Log:
MF12 r365662:
MFC r365371:
Turn MALLOC_PRODUCTION into a regular src.conf(5) option
For historical reasons, defining MALLOC_PRODUCTION in /etc/make.conf has
been used to turn off potentially expensive debug checks and statistics
gathering in the implementation of malloc(3).
It seems more consistent to turn this into a regular src.conf(5) option,
e.g. WITH_MALLOC_PRODUCTION / WITHOUT_MALLOC_PRODUCTION. This can then
be toggled similar to any other source build option, and turned on or
off by default for e.g. stable branches.
Reviewed by: imp, #manpages
Differential Revision: https://reviews.freebsd.org/D26337
MFC r365373:
Follow-up r365371 by removing sentences which indicate the state of the
MK_MALLOC_PRODUCTION option on -CURRENT.
Also, for the sake of backwards compatibility, support the old way of
enabling 'production malloc', e.g. by adding a define in make.conf(5).
MF12 r365671:
Follow-up r365662 (MFC of r365371 and r365373) by correctly setting
WITH_MALLOC_PRODUCTION for stable branches. Also add a note to UPDATING,
to inform users about the new setting.
Direct commit to stable/{11,12} as this does not apply to head.
Noticed by: imp, Ronald Klop <ronald-lists at klop.ws>
MF12 r365672:
Follow-up r365662 (MFC of r365371 and r365373) by also removing the
header hack from jemalloc_FreeBSD.h, which rendered any make.conf
MALLOC_PRODUCTION or src.conf WITH/WITHOUT_MALLOC_PRODUCTION irrelevant.
Direct commit to stable/{11,12} as this does not apply to head.
Noticed by: kevans
Approved by: re (gjb)
Added:
releng/12.2/tools/build/options/WITHOUT_MALLOC_PRODUCTION
- copied unchanged from r365662, stable/12/tools/build/options/WITHOUT_MALLOC_PRODUCTION
releng/12.2/tools/build/options/WITH_MALLOC_PRODUCTION
- copied unchanged from r365662, stable/12/tools/build/options/WITH_MALLOC_PRODUCTION
Modified:
releng/12.2/UPDATING
releng/12.2/contrib/jemalloc/FREEBSD-diffs
releng/12.2/contrib/jemalloc/doc/jemalloc.3
releng/12.2/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
releng/12.2/lib/libc/stdlib/jemalloc/Makefile.inc
releng/12.2/share/man/man5/make.conf.5
releng/12.2/share/man/man5/src.conf.5
releng/12.2/share/mk/src.opts.mk
Directory Properties:
releng/12.2/ (props changed)
Modified: releng/12.2/UPDATING
==============================================================================
--- releng/12.2/UPDATING Mon Sep 14 14:52:22 2020 (r365721)
+++ releng/12.2/UPDATING Mon Sep 14 14:53:09 2020 (r365722)
@@ -16,6 +16,18 @@ from older versions of FreeBSD, try WITHOUT_CLANG and
the tip of head, and then rebuild without this option. The bootstrap process
from older version of current across the gcc/clang cutover is a bit fragile.
+20200912:
+ The make.conf(5) MALLOC_PRODUCTION variable, used for disabling and
+ enabling assertions and statistics gathering in malloc(3), has been
+ migrated to a src.conf(5) WITH/WITHOUT_MALLOC_PRODUCTION option.
+
+ On stable branches, WITH_MALLOC_PRODUCTION is set by default, which
+ means that malloc(3) has assertions and statistics gathering disabled,
+ for improved performance.
+
+ For backwards compatibility, the make.conf(5) MALLOC_PRODUCTION is still
+ honored, but it is now deprecated and undocumented.
+
20200909:
The resume code now notifies devd with the 'kernel' system
rather than the old 'kern' subsystem to be consistent with
Modified: releng/12.2/contrib/jemalloc/FREEBSD-diffs
==============================================================================
--- releng/12.2/contrib/jemalloc/FREEBSD-diffs Mon Sep 14 14:52:22 2020 (r365721)
+++ releng/12.2/contrib/jemalloc/FREEBSD-diffs Mon Sep 14 14:53:09 2020 (r365722)
@@ -14,7 +14,7 @@ index 1e12fd3a..c42a7e10 100644
+ <option>--with-malloc-conf=abort_conf:false</option>.
+ Additionally, <option>--enable-debug</option> is enabled in development
+ versions of FreeBSD (controlled by the
-+ <constant>MALLOC_PRODUCTION</constant> make variable).</para>
++ <constant>MK_MALLOC_PRODUCTION</constant> make variable).</para>
+
</refsect1>
<refsynopsisdiv>
Modified: releng/12.2/contrib/jemalloc/doc/jemalloc.3
==============================================================================
--- releng/12.2/contrib/jemalloc/doc/jemalloc.3 Mon Sep 14 14:52:22 2020 (r365721)
+++ releng/12.2/contrib/jemalloc/doc/jemalloc.3 Mon Sep 14 14:53:09 2020 (r365722)
@@ -43,7 +43,7 @@ The following configuration options are enabled in lib
\fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally,
\fB\-\-enable\-debug\fR
is enabled in development versions of FreeBSD (controlled by the
-\fBMALLOC_PRODUCTION\fR
+\fBMK_MALLOC_PRODUCTION\fR
make variable)\&.
.SH "SYNOPSIS"
.sp
Modified: releng/12.2/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
==============================================================================
--- releng/12.2/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Mon Sep 14 14:52:22 2020 (r365721)
+++ releng/12.2/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Mon Sep 14 14:53:09 2020 (r365722)
@@ -5,7 +5,7 @@
#undef JEMALLOC_OVERRIDE_VALLOC
#ifndef MALLOC_PRODUCTION
-#define MALLOC_PRODUCTION
+#define JEMALLOC_DEBUG
#endif
#undef JEMALLOC_DSS
Modified: releng/12.2/lib/libc/stdlib/jemalloc/Makefile.inc
==============================================================================
--- releng/12.2/lib/libc/stdlib/jemalloc/Makefile.inc Mon Sep 14 14:52:22 2020 (r365721)
+++ releng/12.2/lib/libc/stdlib/jemalloc/Makefile.inc Mon Sep 14 14:53:09 2020 (r365722)
@@ -44,6 +44,6 @@ MLINKS+= \
jemalloc.3 nallocx.3 \
jemalloc.3 malloc.conf.5
-.if defined(MALLOC_PRODUCTION)
+.if ${MK_MALLOC_PRODUCTION} != "no" || defined(MALLOC_PRODUCTION)
CFLAGS+= -DMALLOC_PRODUCTION
.endif
Modified: releng/12.2/share/man/man5/make.conf.5
==============================================================================
--- releng/12.2/share/man/man5/make.conf.5 Mon Sep 14 14:52:22 2020 (r365721)
+++ releng/12.2/share/man/man5/make.conf.5 Mon Sep 14 14:53:09 2020 (r365722)
@@ -401,12 +401,6 @@ console driver to
and allow access over FireWire(IEEE1394) using
.Xr dconschat 8 .
Currently, only i386 and amd64 are supported.
-.It Va MALLOC_PRODUCTION
-.Pq Vt bool
-Set this to disable assertions and statistics gathering in
-.Xr malloc 3 .
-It also defaults the A and J runtime options to off.
-Disabled by default on -CURRENT.
.It Va MAN_ARCH
.Pq Vt str
Space-delimited list of one or more MACHINE and/or MACHINE_ARCH values
Modified: releng/12.2/share/man/man5/src.conf.5
==============================================================================
--- releng/12.2/share/man/man5/src.conf.5 Mon Sep 14 14:52:22 2020 (r365721)
+++ releng/12.2/share/man/man5/src.conf.5 Mon Sep 14 14:53:09 2020 (r365722)
@@ -1,6 +1,6 @@
.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
.\" $FreeBSD$
-.Dd April 9, 2020
+.Dd September 12, 2020
.Dt SRC.CONF 5
.Os
.Sh NAME
@@ -1325,6 +1325,10 @@ if executed as an unprivileged user.
See
.Xr tests 7
for more details.
+.It Va WITHOUT_MALLOC_PRODUCTION
+Set to enable assertions and statistics gathering in
+.Xr malloc 3 .
+It also defaults the A and J runtime options to on.
.It Va WITHOUT_MAN
Set to not build manual pages.
When set, these options are also in effect:
Modified: releng/12.2/share/mk/src.opts.mk
==============================================================================
--- releng/12.2/share/mk/src.opts.mk Mon Sep 14 14:52:22 2020 (r365721)
+++ releng/12.2/share/mk/src.opts.mk Mon Sep 14 14:53:09 2020 (r365722)
@@ -143,6 +143,7 @@ __DEFAULT_YES_OPTIONS = \
MAIL \
MAILWRAPPER \
MAKE \
+ MALLOC_PRODUCTION \
NDIS \
NETCAT \
NETGRAPH \
Copied: releng/12.2/tools/build/options/WITHOUT_MALLOC_PRODUCTION (from r365662, stable/12/tools/build/options/WITHOUT_MALLOC_PRODUCTION)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ releng/12.2/tools/build/options/WITHOUT_MALLOC_PRODUCTION Mon Sep 14 14:53:09 2020 (r365722, copy of r365662, stable/12/tools/build/options/WITHOUT_MALLOC_PRODUCTION)
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to enable assertions and statistics gathering in
+.Xr malloc 3 .
+It also defaults the A and J runtime options to on.
Copied: releng/12.2/tools/build/options/WITH_MALLOC_PRODUCTION (from r365662, stable/12/tools/build/options/WITH_MALLOC_PRODUCTION)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ releng/12.2/tools/build/options/WITH_MALLOC_PRODUCTION Mon Sep 14 14:53:09 2020 (r365722, copy of r365662, stable/12/tools/build/options/WITH_MALLOC_PRODUCTION)
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to disable assertions and statistics gathering in
+.Xr malloc 3 .
+It also defaults the A and J runtime options to off.
More information about the svn-src-releng
mailing list