Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jan 2022 16:33:11 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        Free BSD <freebsd-arm@freebsd.org>
Subject:   Re: devel/llvm13 failed to reclaim memory on 8 GB Pi4 running -current [UFS context: used the whole swap space too]
Message-ID:  <03306779-68BB-4C87-9B03-81756EFC519C@yahoo.com>
In-Reply-To: <20220129002017.GA58768@www.zefox.net>
References:  <20220127214801.GA51710@www.zefox.net> <5E861D46-128A-4E09-A3CF-736195163B17@yahoo.com> <20220127233048.GA51951@www.zefox.net> <6528ED25-A3C6-4277-B951-1F58ADA2D803@yahoo.com> <10B4E2F0-6219-4674-875F-A7B01CA6671C@yahoo.com> <54CD0806-3902-4B9C-AA30-5ED003DE4D41@yahoo.com> <A4FA4E8B-635B-454E-87D1-C36A84E2C3BA@yahoo.com> <9771EB33-037E-403E-8A77-7E8E98DCF375@yahoo.com> <B12D2AB9-147E-49EF-854F-A3B999ADDECC@yahoo.com> <BA25F969-4DAC-4E5D-88EF-9475139B6B8A@yahoo.com> <20220129002017.GA58768@www.zefox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2022-Jan-28, at 16:20, bob prohaska <fbsd@www.zefox.net> wrote:

> On Fri, Jan 28, 2022 at 03:05:06PM -0800, Mark Millard wrote:
>>=20
>> I'll set things up for swap totaling to 30 GiBytes, reboot,
>> and start it again. This will hopefully let me see and
>> report MaxObs??? figures for a successful build when there
>> is RAM+SWAP: 38 GiBytes. So: more than 9 GiBytes per compiler
>> instance (mean).
>>=20
>=20
> Am I mistaken to think there's been a drastic and abrupt increase
> in memory needed to compile clang13 and friends?=20
>=20

Not that I know of.

I've still never managed to repeat your RPi3B + 2 GiByte SWAP
problem (.cpp and .sh example). I'm still trying.

At this point I've still no clue what is going on.

One thing that you could check is the content of
/usr/src/lib/googletest/tests/Makefile.inc . It
should look like (up to email whitespace oddities):

QUOTE
# $FreeBSD$

.include "../Makefile.inc"
# Keep the existing tests directory structure (with subdirs per =
component)
# rather than installing all of them to /usr/tests/lib/googletest
TESTSDIR=3D       ${TESTSBASE}/lib/googletest/${.CURDIR:T}

# Clang's optimizer spends a really long time on these tests at -O2. =
Changing
# -O2 to -O1 reduces the -j32 time for lib/googletest/test from 131s to =
71s.
# Using -O0 further reduces the time to 29s, and also reduces the disk =
usage
# from 144MB (at -O2) / 92MB (at -O1) to 82MB, so we use -O0.
# Note: Building without debug info saves about 10-15% of the build =
time, so we
# only enable debug info if DEBUG_FLAGS is not empty (71s -> 64s at -O1 =
and -j32).
CFLAGS.clang+=3D  -O0
.if empty(DEBUG_FLAGS)
MK_DEBUG_FILES:=3Dno
CFLAGS.clang+=3D  -g0
.endif
END QUOTE

The part of it that has:

CFLAGS.clang+=3D  -O0
.if empty(DEBUG_FLAGS)
MK_DEBUG_FILES:=3Dno
CFLAGS.clang+=3D  -g0
.endif

is important to limiting memory use for building
googletest.

It is also important to not have done anything that
forces -O2 for some parts of googletest.

As I remember, this issue predates clang13 but still
applies.



=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?03306779-68BB-4C87-9B03-81756EFC519C>