Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Sep 2020 21:13:10 +0200
From:      "Ronald Klop" <ronald-lists@klop.ws>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org, "Dimitry Andric" <dim@freebsd.org>
Subject:   Re: 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:  <op.0quib8ffkndu52@sjakie>
In-Reply-To: <202009121650.08CGo5Eq079753@repo.freebsd.org>
References:  <202009121650.08CGo5Eq079753@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

Isn't this important enough for a note in UPDATING? Or a message in the  
backwards compatibility code to point the user to the new setting?

Regards,
Ronald.


On Sat, 12 Sep 2020 18:50:05 +0200, Dimitry Andric <dim@freebsd.org> wrote:

> 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/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)
>
> Changes in other areas also in this revision:
> 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)
>
> Modified: stable/12/contrib/jemalloc/FREEBSD-diffs
> ==============================================================================
> --- stable/12/contrib/jemalloc/FREEBSD-diffs	Sat Sep 12 16:33:05  
> 2020	(r365661)
> +++ stable/12/contrib/jemalloc/FREEBSD-diffs	Sat Sep 12 16:50:04  
> 2020	(r365662)
> @@ -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: stable/12/contrib/jemalloc/doc/jemalloc.3
> ==============================================================================
> --- stable/12/contrib/jemalloc/doc/jemalloc.3	Sat Sep 12 16:33:05  
> 2020	(r365661)
> +++ stable/12/contrib/jemalloc/doc/jemalloc.3	Sat Sep 12 16:50:04  
> 2020	(r365662)
> @@ -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: stable/12/lib/libc/stdlib/jemalloc/Makefile.inc
> ==============================================================================
> --- stable/12/lib/libc/stdlib/jemalloc/Makefile.inc	Sat Sep 12 16:33:05  
> 2020	(r365661)
> +++ stable/12/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/12/share/man/man5/make.conf.5
> ==============================================================================
> --- stable/12/share/man/man5/make.conf.5	Sat Sep 12 16:33:05  
> 2020	(r365661)
> +++ stable/12/share/man/man5/make.conf.5	Sat Sep 12 16:50:04  
> 2020	(r365662)
> @@ -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: stable/12/share/man/man5/src.conf.5
> ==============================================================================
> --- stable/12/share/man/man5/src.conf.5	Sat Sep 12 16:33:05  
> 2020	(r365661)
> +++ stable/12/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 September 11, 2020
> +.Dd September 12, 2020
>  .Dt SRC.CONF 5
>  .Os
>  .Sh NAME
> @@ -1357,6 +1357,10 @@ if executed as an unprivileged user.
>  See
>  .Xr tests 7
>  for more details.
> +.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:
>
> Modified: stable/12/share/mk/src.opts.mk
> ==============================================================================
> --- stable/12/share/mk/src.opts.mk	Sat Sep 12 16:33:05 2020	(r365661)
> +++ stable/12/share/mk/src.opts.mk	Sat Sep 12 16:50:04 2020	(r365662)
> @@ -208,6 +208,7 @@ __DEFAULT_NO_OPTIONS = \
>      LOADER_FIREWIRE \
>      LOADER_FORCE_LE \
>      LOADER_VERIEXEC_PASS_MANIFEST \
> +    MALLOC_PRODUCTION \
>      NAND \
>      OFED_EXTRA \
>      OPENLDAP \
>
> Copied and modified:  
> stable/12/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/12/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/12/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/12/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.
> _______________________________________________
> svn-src-all@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"



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