From owner-svn-ports-head@freebsd.org Thu Aug 20 15:16:24 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE6339BFC72 for ; Thu, 20 Aug 2015 15:16:24 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from vfemail.net (ninezero.vfemail.net [96.30.253.190]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB503AE5 for ; Thu, 20 Aug 2015 15:16:24 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: (qmail 85602 invoked by uid 89); 20 Aug 2015 15:16:16 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 20 Aug 2015 15:16:16 -0000 Received: (qmail 85181 invoked by uid 89); 20 Aug 2015 15:15:59 -0000 Received: by simscan 1.3.1 ppid: 85171, pid: 85176, t: 0.0052s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 20 Aug 2015 15:15:59 -0000 Received: (qmail 17850 invoked by uid 89); 20 Aug 2015 15:15:59 -0000 Received: by simscan 1.4.0 ppid: 17827, pid: 17847, t: 0.7568s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by 172.16.100.62 with ESMTPA; 20 Aug 2015 15:15:58 -0000 From: Jan Beich To: John Marino Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org, marino@freebsd.org Subject: Re: svn commit: r394871 - in head: Mk mail/thunderbird mail/thunderbird/files www/firefox www/firefox-esr www/firefox-esr/files www/firefox/files www/libxul www/libxul/files www/seamonkey www/seamonkey... References: <201508201316.t7KDGDPs042842@repo.freebsd.org> <55D5D3FC.9060001@marino.st> Date: Thu, 20 Aug 2015 17:15:44 +0200 In-Reply-To: <55D5D3FC.9060001@marino.st> (John Marino's message of "Thu, 20 Aug 2015 15:19:56 +0200") Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Aug 2015 15:16:25 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable John Marino writes: F> On 8/20/2015 3:16 PM, Jan Beich wrote: > >> Author: jbeich >> Date: Thu Aug 20 13:16:12 2015 >> New Revision: 394871 >> URL: https://svnweb.freebsd.org/changeset/ports/394871 >>=20 >> Log: >> gecko: use system jemalloc on 11.0-CURRENT again >>=20=20=20 >> Requested by: mi >>=20 >>=20 >> Modified: head/Mk/bsd.gecko.mk >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/Mk/bsd.gecko.mk Thu Aug 20 13:15:18 2015 (r394870) >> +++ head/Mk/bsd.gecko.mk Thu Aug 20 13:16:12 2015 (r394871) >> @@ -130,7 +130,12 @@ LDFLAGS+=3D -L${LOCALBASE}/lib -Wl,-rpath >>=20=20 >> # use jemalloc 3.0.0 API for stats/tuning >> MOZ_EXPORT+=3D MOZ_JEMALLOC3=3D1 >> -.if ${OSVERSION} < 1000012 || ${MOZILLA_VER:R:R} >=3D 37 >> +.if ${OSVERSION} >=3D 1100079 >> +. if ${MOZILLA_VER:R:R} < 43 >> +# system jemalloc 4.0.0 vs. bundled jemalloc 3.6.0-204-gb4acf73 >> +EXTRA_PATCHES+=3D ${FILESDIR}/extra-patch-bug1125514 >> +. endif >> +.elif ${OSVERSION} < 1000012 || ${MOZILLA_VER:R:R} >=3D 37 >> MOZ_OPTIONS+=3D --enable-jemalloc >> .endif >>=20=20 > > > By switching the comparison from < to >=3D, I think this just broke > DragonFly which does not support jemalloc on any version. Ahem, OSVERSION=3D9999999 in DPorts' bsd.port.mk isn't sane either. Either emulate it (along with OSREL) via USES=3Dalias, derive from __DragonFly_version or force breakage by not defining it. =2D-enable-jemalloc is a toggle for bundled jemalloc. Without it the build defaults to system malloc. configure also checks if system malloc supports jemalloc non-standard API. The API is mainly used for about:memory. However, lack of malloc_usable_size() may impact performance but it is usually available elsewhere (musl, glibc, etc). files/extra-patch-bug1125514 should be a nop for DragonFly, FreeBSD 9.x and FreeBSD 10.x. It can cause garbage in memory stats for bundled jemalloc but otherwise explicitly separated by make(1) conditional. My intent is to make DragonFly use bundled jemalloc like older releases of FreeBSD. Try applying below commit under ${WRKSRC}/memory/jemalloc. https://github.com/jemalloc/jemalloc/commit/1aa25a3 > I would guess the fix would be to check OPSYS before using OSVERSION. To avoid undefined behavior OPSYS check has to be added twice for (large and small) OSVERSION. Or maybe inverse it like # use jemalloc 3.0.0 API for stats/tuning MOZ_EXPORT+=3D MOZ_JEMALLOC3=3D1 .if ${OPSYS} !=3D FreeBSD || (${OSVERSION} < 1000012 || \ (${MOZILLA_VER:R:R} >=3D 37 && ${OSVERSION} < 1100079)) MOZ_OPTIONS+=3D --enable-jemalloc .else . if ${MOZILLA_VER:R:R} < 43 # system jemalloc 4.0.0 vs. bundled jemalloc 3.6.0-204-gb4acf73 EXTRA_PATCHES+=3D ${FILESDIR}/extra-patch-bug1125514 . endif .endif > > Thanks, > John --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJV1e8hXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3beOoH/3WmkWxOdun55ylacjb9Ohld +sEavl55gNle2PmIBvfiRvlFs6lMU3kwcHxZ17oGuFGxRIB712ic2blueYFUA2vG 3YIlIuObUANChJIvFgpeULoQhAA5qmjvPaE20bKQLQ7Hl9zG0g3cc2cLLfcJhYJ5 ojnV3voX2ME2HVyZCkXBit7rT4GM0xVZ3lrX9phwlQX95ILjQTGtAxajiK5jFKAC HZmq+DM3PqxV0kyr1sHgNOXOBplcGW9zQB1BPjF5H+aVJU26UVk+F9QpEcQqLSY2 OsNmBv3sEBToSCqX1O1mHGluWP2KBXm47X2DMeI4mO+2Lp+g6uToIeI+OAJjW2Y= =FLl+ -----END PGP SIGNATURE----- --=-=-=--