From owner-svn-src-stable-12@freebsd.org Sat Sep 12 16:50:06 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F295F3DD418; Sat, 12 Sep 2020 16:50:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BpdsB684yz4DQh; Sat, 12 Sep 2020 16:50:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B74C017E73; Sat, 12 Sep 2020 16:50:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08CGo6BV079761; Sat, 12 Sep 2020 16:50:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08CGo5Eq079753; Sat, 12 Sep 2020 16:50:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202009121650.08CGo5Eq079753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 12 Sep 2020 16:50:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@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... X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: 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/doc 12/lib/libc/stdlib/j... X-SVN-Commit-Revision: 365662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Sep 2020 16:50:07 -0000 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 + . + Additionally, is enabled in development + versions of FreeBSD (controlled by the -+ MALLOC_PRODUCTION make variable). ++ MK_MALLOC_PRODUCTION make variable). + 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.