Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make: add back support for jemalloc 100



details:   https://anonhg.NetBSD.org/src/rev/39d20030c0de
branches:  trunk
changeset: 1027180:39d20030c0de
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Dec 09 20:47:33 2021 +0000

description:
make: add back support for jemalloc 100

The ports sun2 and vax default to jemalloc 100, as opposed to the rest
of the ports, which use jemalloc 510.  Some developers choose to use
jemalloc 100, so let them run the tests with memory debugging as well.

Suggested by mrg on source-changes-d.

diffstat:

 usr.bin/make/test-variants.sh       |  12 ++++++++----
 usr.bin/make/unit-tests/Makefile    |   5 +++--
 usr.bin/make/unit-tests/opt-file.mk |  12 ++++++++----
 3 files changed, 19 insertions(+), 10 deletions(-)

diffs (80 lines):

diff -r 21be0b837191 -r 39d20030c0de usr.bin/make/test-variants.sh
--- a/usr.bin/make/test-variants.sh     Thu Dec 09 20:27:01 2021 +0000
+++ b/usr.bin/make/test-variants.sh     Thu Dec 09 20:47:33 2021 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $NetBSD: test-variants.sh,v 1.13 2021/12/05 14:57:36 rillig Exp $
+# $NetBSD: test-variants.sh,v 1.14 2021/12/09 20:47:33 rillig Exp $
 #
 # Build several variants of make and run the tests on them.
 #
@@ -30,9 +30,13 @@
        && env -i PATH="$PATH" USETOOLS="no" "$@" \
                sh -ce "make -ks -j6 dependall" \
        && size *.o make \
-       && env -i PATH="$PATH" USETOOLS="no" MALLOC_CONF="junk:true" \
-               _MKMSG_TEST=":" "$@" \
-               sh -ce "make -s test" \
+       && env -i \
+           PATH="$PATH" \
+           USETOOLS="no" \
+           MALLOC_OPTIONS="JA" \
+           MALLOC_CONF="junk:true" \
+           _MKMSG_TEST=":" "$@" \
+           sh -ce "make -s test" \
        || fail
 }
 
diff -r 21be0b837191 -r 39d20030c0de usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Thu Dec 09 20:27:01 2021 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Thu Dec 09 20:47:33 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.286 2021/12/05 15:20:13 rillig Exp $
+# $NetBSD: Makefile,v 1.287 2021/12/09 20:47:33 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -652,7 +652,8 @@
 x!= echo; mkdir -p ${TMPDIR}
 .endif
 
-MAKE_TEST_ENV?=        MALLOC_CONF="junk:true" # for jemalloc
+MAKE_TEST_ENV= MALLOC_OPTIONS="JA"     # for jemalloc 100
+MAKE_TEST_ENV+=        MALLOC_CONF="junk:true" # for jemalloc 510
 MAKE_TEST_ENV+= TMPDIR=${TMPDIR}
 
 .if ${.MAKE.OS} == "NetBSD"
diff -r 21be0b837191 -r 39d20030c0de usr.bin/make/unit-tests/opt-file.mk
--- a/usr.bin/make/unit-tests/opt-file.mk       Thu Dec 09 20:27:01 2021 +0000
+++ b/usr.bin/make/unit-tests/opt-file.mk       Thu Dec 09 20:47:33 2021 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: opt-file.mk,v 1.13 2021/12/05 14:57:36 rillig Exp $
+# $NetBSD: opt-file.mk,v 1.14 2021/12/09 20:47:33 rillig Exp $
 #
-# Tests for the -f command line option.
+# Tests for the -f command line option, which adds a makefile to the list of
+# files that are parsed.
 
 # TODO: Implementation
 
@@ -10,7 +11,8 @@
 all: line-with-trailing-whitespace
 all: file-containing-null-byte
 
-# Passing '-' as the filename reads from stdin.  This is unusual but possible.
+# When the filename is '-', the input comes from stdin.  This is unusual but
+# possible.
 #
 # In the unlikely case where a file ends in a backslash instead of a newline,
 # that backslash is trimmed.  See ParseGetLine.
@@ -19,7 +21,9 @@
 # outside of the file buffer.
 #
 #      printf '%s' 'VAR=value\' \
-#      | MALLOC_CONF="junk:true" make-2014.01.01.00.00.00 -r -f - -V VAR -dA 2>&1 \
+#      | MALLOC_OPTIONS="JA" \
+#        MALLOC_CONF="junk:true" \
+#        make-2014.01.01.00.00.00 -r -f - -V VAR -dA 2>&1 \
 #      | less
 #
 # The debug output shows how make happily uses freshly allocated memory (the



Home | Main Index | Thread Index | Old Index