Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Sep 2020 16:50:06 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r365662 - in stable: 11/contrib/jemalloc 11/contrib/jemalloc/doc 11/lib/libc/stdlib/jemalloc 11/share/man/man5 11/share/mk 11/tools/build/options 12/contrib/jemalloc 12/contrib/jemalloc...
Message-ID:  <202009121650.08CGo6Nh079767@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat Sep 12 16:50:04 2020
New Revision: 365662
URL: https://svnweb.freebsd.org/changeset/base/365662

Log:
  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).

Added:
  stable/11/tools/build/options/WITHOUT_MALLOC_PRODUCTION
     - copied, changed from r365371, head/tools/build/options/WITHOUT_MALLOC_PRODUCTION
  stable/11/tools/build/options/WITH_MALLOC_PRODUCTION
     - copied, changed from r365371, head/tools/build/options/WITH_MALLOC_PRODUCTION
Modified:
  stable/11/contrib/jemalloc/FREEBSD-diffs
  stable/11/contrib/jemalloc/doc/jemalloc.3
  stable/11/lib/libc/stdlib/jemalloc/Makefile.inc
  stable/11/share/man/man5/make.conf.5
  stable/11/share/man/man5/src.conf.5
  stable/11/share/mk/src.opts.mk
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Added:
  stable/12/tools/build/options/WITHOUT_MALLOC_PRODUCTION
     - copied, changed from r365371, head/tools/build/options/WITHOUT_MALLOC_PRODUCTION
  stable/12/tools/build/options/WITH_MALLOC_PRODUCTION
     - copied, changed from r365371, head/tools/build/options/WITH_MALLOC_PRODUCTION
Modified:
  stable/12/contrib/jemalloc/FREEBSD-diffs
  stable/12/contrib/jemalloc/doc/jemalloc.3
  stable/12/lib/libc/stdlib/jemalloc/Makefile.inc
  stable/12/share/man/man5/make.conf.5
  stable/12/share/man/man5/src.conf.5
  stable/12/share/mk/src.opts.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/jemalloc/FREEBSD-diffs
==============================================================================
--- stable/11/contrib/jemalloc/FREEBSD-diffs	Sat Sep 12 16:33:05 2020	(r365661)
+++ stable/11/contrib/jemalloc/FREEBSD-diffs	Sat Sep 12 16:50:04 2020	(r365662)
@@ -14,7 +14,7 @@ index c4a44e3..4626e9b 100644
 +    <option>--enable-tls</option>, <option>--enable-utrace</option>, and
 +    <option>--enable-xmalloc</option>.  Additionally,
 +    <option>--enable-debug</option> is enabled in development versions of
-+    FreeBSD (controlled by the <constant>MALLOC_PRODUCTION</constant> make
++    FreeBSD (controlled by the <constant>MK_MALLOC_PRODUCTION</constant> make
 +    variable).</para>
 +
    </refsect1>

Modified: stable/11/contrib/jemalloc/doc/jemalloc.3
==============================================================================
--- stable/11/contrib/jemalloc/doc/jemalloc.3	Sat Sep 12 16:33:05 2020	(r365661)
+++ stable/11/contrib/jemalloc/doc/jemalloc.3	Sat Sep 12 16:50:04 2020	(r365662)
@@ -45,7 +45,7 @@ The following configuration options are enabled in lib
 \fB\-\-enable\-xmalloc\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: stable/11/lib/libc/stdlib/jemalloc/Makefile.inc
==============================================================================
--- stable/11/lib/libc/stdlib/jemalloc/Makefile.inc	Sat Sep 12 16:33:05 2020	(r365661)
+++ stable/11/lib/libc/stdlib/jemalloc/Makefile.inc	Sat Sep 12 16:50:04 2020	(r365662)
@@ -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: stable/11/share/man/man5/make.conf.5
==============================================================================
--- stable/11/share/man/man5/make.conf.5	Sat Sep 12 16:33:05 2020	(r365661)
+++ stable/11/share/man/man5/make.conf.5	Sat Sep 12 16:50:04 2020	(r365662)
@@ -388,12 +388,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 MODULES_WITH_WORLD
 .Pq Vt bool
 Set to build modules with the system instead of the kernel.

Modified: stable/11/share/man/man5/src.conf.5
==============================================================================
--- stable/11/share/man/man5/src.conf.5	Sat Sep 12 16:33:05 2020	(r365661)
+++ stable/11/share/man/man5/src.conf.5	Sat Sep 12 16:50:04 2020	(r365662)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd May 5, 2020
+.Dd September 12, 2020
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -315,6 +315,8 @@ When set, it enforces these options:
 .It
 .Va WITHOUT_CLANG_EXTRAS
 .It
+.Va WITHOUT_CLANG_FORMAT
+.It
 .Va WITHOUT_CLANG_FULL
 .It
 .Va WITHOUT_LLVM_COV
@@ -339,6 +341,8 @@ This is a default setting on
 amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386.
 .It Va WITH_CLANG_EXTRAS
 Set to build additional clang and llvm tools, such as bugpoint.
+.It Va WITH_CLANG_FORMAT
+Set to build clang-format.
 .It Va WITHOUT_CLANG_FULL
 Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of
 the Clang C/C++ compiler.
@@ -460,6 +464,8 @@ When set, it enforces these options:
 .It
 .Va WITHOUT_CLANG_EXTRAS
 .It
+.Va WITHOUT_CLANG_FORMAT
+.It
 .Va WITHOUT_CLANG_FULL
 .It
 .Va WITHOUT_GNUCXX
@@ -1177,6 +1183,10 @@ MTA selector.
 Set to not install
 .Xr make 1
 and related support files.
+.It Va WITH_MALLOC_PRODUCTION
+Set to disable assertions and statistics gathering in
+.Xr malloc 3 .
+It also defaults the A and J runtime options to off.
 .It Va WITHOUT_MAN
 Set to not build manual pages.
 When set, these options are also in effect:
@@ -1356,12 +1366,12 @@ Enable building openldap support for kerberos.
 Set to not build LLVM's OpenMP runtime.
 .Pp
 This is a default setting on
-arm/arm, arm/armeb, arm/armv6, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and sparc64/sparc64.
+arm/arm, arm/armeb, arm/armv6, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and sparc64/sparc64.
 .It Va WITH_OPENMP
 Set to build LLVM's OpenMP runtime.
 .Pp
 This is a default setting on
-amd64/amd64, i386/i386, pc98/i386 and powerpc/powerpc64.
+amd64/amd64, arm64/aarch64, i386/i386, pc98/i386 and powerpc/powerpc64.
 .It Va WITHOUT_OPENSSH
 Set to not build OpenSSH.
 .It Va WITHOUT_OPENSSL
@@ -1651,6 +1661,8 @@ When set, it enforces these options:
 .Va WITHOUT_CLANG
 .It
 .Va WITHOUT_CLANG_EXTRAS
+.It
+.Va WITHOUT_CLANG_FORMAT
 .It
 .Va WITHOUT_CLANG_FULL
 .It

Modified: stable/11/share/mk/src.opts.mk
==============================================================================
--- stable/11/share/mk/src.opts.mk	Sat Sep 12 16:33:05 2020	(r365661)
+++ stable/11/share/mk/src.opts.mk	Sat Sep 12 16:50:04 2020	(r365662)
@@ -203,6 +203,7 @@ __DEFAULT_NO_OPTIONS = \
     LOADER_FORCE_LE \
     LOADER_VERBOSE \
     NAND \
+    MALLOC_PRODUCTION \
     OFED_EXTRA \
     OPENLDAP \
     REPRODUCIBLE_BUILD \

Copied and modified: stable/11/tools/build/options/WITHOUT_MALLOC_PRODUCTION (from r365371, head/tools/build/options/WITHOUT_MALLOC_PRODUCTION)
==============================================================================
--- head/tools/build/options/WITHOUT_MALLOC_PRODUCTION	Sat Sep  5 23:30:17 2020	(r365371, copy source)
+++ stable/11/tools/build/options/WITHOUT_MALLOC_PRODUCTION	Sat Sep 12 16:50:04 2020	(r365662)
@@ -2,4 +2,3 @@
 Set to enable assertions and statistics gathering in
 .Xr malloc 3 .
 It also defaults the A and J runtime options to on.
-Enabled by default on -CURRENT.

Copied and modified: stable/11/tools/build/options/WITH_MALLOC_PRODUCTION (from r365371, head/tools/build/options/WITH_MALLOC_PRODUCTION)
==============================================================================
--- head/tools/build/options/WITH_MALLOC_PRODUCTION	Sat Sep  5 23:30:17 2020	(r365371, copy source)
+++ stable/11/tools/build/options/WITH_MALLOC_PRODUCTION	Sat Sep 12 16:50:04 2020	(r365662)
@@ -2,4 +2,3 @@
 Set 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.



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