From owner-svn-src-head@freebsd.org Sat Sep 5 23:30:20 2020 Return-Path: Delivered-To: svn-src-head@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 7E9743D9E05; Sat, 5 Sep 2020 23:30:20 +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 4BkW4D2q6Tz49Tq; Sat, 5 Sep 2020 23:30:20 +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 3FEB9258C7; Sat, 5 Sep 2020 23:30:20 +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 085NUKoc085554; Sat, 5 Sep 2020 23:30:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 085NUIwH085545; Sat, 5 Sep 2020 23:30:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202009052330.085NUIwH085545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 5 Sep 2020 23:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365371 - in head: . contrib/jemalloc contrib/jemalloc/doc lib/libc/stdlib/jemalloc share/man/man5 share/mk tools/build/options X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: . contrib/jemalloc contrib/jemalloc/doc lib/libc/stdlib/jemalloc share/man/man5 share/mk tools/build/options X-SVN-Commit-Revision: 365371 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2020 23:30:20 -0000 Author: dim Date: Sat Sep 5 23:30:17 2020 New Revision: 365371 URL: https://svnweb.freebsd.org/changeset/base/365371 Log: 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 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26337 Added: head/tools/build/options/WITHOUT_MALLOC_PRODUCTION (contents, props changed) head/tools/build/options/WITH_MALLOC_PRODUCTION (contents, props changed) Modified: head/UPDATING head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/doc/jemalloc.3 head/lib/libc/stdlib/jemalloc/Makefile.inc head/share/man/man5/make.conf.5 head/share/man/man5/src.conf.5 head/share/mk/src.opts.mk Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Sep 5 22:48:27 2020 (r365370) +++ head/UPDATING Sat Sep 5 23:30:17 2020 (r365371) @@ -22,9 +22,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: debugging flags in userland, and various verbose features in the kernel. Many developers choose to disable these features on build machines to maximize performance. (To completely disable malloc - debugging, define MALLOC_PRODUCTION in /etc/make.conf, or to merely - disable the most expensive debugging functionality run - "ln -s 'abort:false,junk:false' /etc/malloc.conf".) + debugging, define WITH_MALLOC_PRODUCTION in /etc/src.conf and rebuild + world, or to merely disable the most expensive debugging functionality + at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20200824: OpenZFS support has been integrated. Do not upgrade root pools until Modified: head/contrib/jemalloc/FREEBSD-diffs ============================================================================== --- head/contrib/jemalloc/FREEBSD-diffs Sat Sep 5 22:48:27 2020 (r365370) +++ head/contrib/jemalloc/FREEBSD-diffs Sat Sep 5 23:30:17 2020 (r365371) @@ -14,7 +14,7 @@ index 7fecda7c..d5ca5e86 100644 + . + Additionally, is enabled in development + versions of FreeBSD (controlled by the -+ MALLOC_PRODUCTION make variable). ++ MK_MALLOC_PRODUCTION make variable). + Modified: head/contrib/jemalloc/doc/jemalloc.3 ============================================================================== --- head/contrib/jemalloc/doc/jemalloc.3 Sat Sep 5 22:48:27 2020 (r365370) +++ head/contrib/jemalloc/doc/jemalloc.3 Sat Sep 5 23:30:17 2020 (r365371) @@ -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: head/lib/libc/stdlib/jemalloc/Makefile.inc ============================================================================== --- head/lib/libc/stdlib/jemalloc/Makefile.inc Sat Sep 5 22:48:27 2020 (r365370) +++ head/lib/libc/stdlib/jemalloc/Makefile.inc Sat Sep 5 23:30:17 2020 (r365371) @@ -45,6 +45,6 @@ MLINKS+= \ jemalloc.3 nallocx.3 \ jemalloc.3 malloc.conf.5 -.if defined(MALLOC_PRODUCTION) +.if ${MK_MALLOC_PRODUCTION} != "no" CFLAGS+= -DMALLOC_PRODUCTION .endif Modified: head/share/man/man5/make.conf.5 ============================================================================== --- head/share/man/man5/make.conf.5 Sat Sep 5 22:48:27 2020 (r365370) +++ head/share/man/man5/make.conf.5 Sat Sep 5 23:30:17 2020 (r365371) @@ -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: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Sep 5 22:48:27 2020 (r365370) +++ head/share/man/man5/src.conf.5 Sat Sep 5 23:30:17 2020 (r365371) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd July 6, 2020 +.Dd September 5, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1104,6 +1104,11 @@ 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. +Disabled by default on -CURRENT. .It Va WITHOUT_MAN Set to not build manual pages. When set, these options are also in effect: @@ -1278,12 +1283,12 @@ Enable building openldap support for kerberos. Set to not build LLVM's OpenMP runtime. .Pp This is a default setting on -arm/armv6, arm/armv7, arm64/aarch64, mips/mips, mips/mips64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_OPENMP Set to build LLVM's OpenMP runtime. .Pp This is a default setting on -amd64/amd64, i386/i386 and powerpc/powerpc64. +amd64/amd64, arm64/aarch64, i386/i386 and powerpc/powerpc64. .It Va WITHOUT_OPENSSH Set to not build OpenSSH. .It Va WITHOUT_OPENSSL Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sat Sep 5 22:48:27 2020 (r365370) +++ head/share/mk/src.opts.mk Sat Sep 5 23:30:17 2020 (r365371) @@ -213,6 +213,7 @@ __DEFAULT_NO_OPTIONS = \ LOADER_FORCE_LE \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ + MALLOC_PRODUCTION \ OFED_EXTRA \ OPENLDAP \ REPRODUCIBLE_BUILD \ Added: head/tools/build/options/WITHOUT_MALLOC_PRODUCTION ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_MALLOC_PRODUCTION Sat Sep 5 23:30:17 2020 (r365371) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +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. Added: head/tools/build/options/WITH_MALLOC_PRODUCTION ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_MALLOC_PRODUCTION Sat Sep 5 23:30:17 2020 (r365371) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +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.