From owner-freebsd-arch@freebsd.org Wed Jan 27 19:27:29 2016 Return-Path: Delivered-To: freebsd-arch@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 4D222A6F554 for ; Wed, 27 Jan 2016 19:27:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 36A771E7D for ; Wed, 27 Jan 2016 19:27:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id 33B48A6F552; Wed, 27 Jan 2016 19:27:29 +0000 (UTC) Delivered-To: arch@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 333E6A6F551 for ; Wed, 27 Jan 2016 19:27:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 220B91E7C for ; Wed, 27 Jan 2016 19:27:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 163DE189F for ; Wed, 27 Jan 2016 19:27:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id C916914640 for ; Wed, 27 Jan 2016 19:27:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id yp97_-UQ1MZX for ; Wed, 27 Jan 2016 19:27:25 +0000 (UTC) To: arch@FreeBSD.org DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 9F6451463A From: Bryan Drewery Subject: build: FAST_DEPEND default (kernel first, then world) Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc X-Enigmail-Draft-Status: N1110 Organization: FreeBSD Message-ID: <56A91A1E.4060304@FreeBSD.org> Date: Wed, 27 Jan 2016 11:27:26 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KhfkIiPlw1xAunSpK83XREa2G5lOqUEHn" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2016 19:27:29 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KhfkIiPlw1xAunSpK83XREa2G5lOqUEHn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, WITH_FAST_DEPEND makes 'make depend' mostly a NOP and pushes the dependency generation to the compilation phase which saves around 35% time in the kernel build. Various bugs have been found with the implementation and all but 1 are now fixed. The last is not including the dependency files via .depend (really .MAKE.DEPENDFILE) which make considers special when finding missing targets (it would be nice if make had something like a .dinclude to flag any file with this magic). I have a fix in testing that I plan to commit today. I would like to enable FAST_DEPEND by default in the kernel build. I have been asked to also remove the old mkdep version of 'make depend'. I am unsure on this as I think it may be useful for some people for the sake of debugging. However it does entail running the preprocessor and given you can compile the entire kernel in minutes usually it may not be worth keeping this as opposed to just compiling to generate them. Keeping a behavior of generating the depend files pre-compile or without-compile is my only real question here. I could likely work this without-compile behavior into the FAST_DEPEND method to avoid needing mkdep entirely. The old code is horrendous, slow, and easily wrong and hard to maintain. Some of the code that would be removed: sys/conf/kern.post.mk > .depend: .PRECIOUS ${SRCS} > .if ${MK_FAST_DEPEND} =3D=3D "no" > rm -f ${.TARGET}.tmp > # C files > ${MAKE} -V CFILES_NORMAL -V SYSTEM_CFILES -V GEN_CFILES | \ > CC=3D"${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${CFLAG= S} > ${MAKE} -V CFILES_CDDL | \ > CC=3D"${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_C= FLAGS} \ > ${FBT_CFLAGS} ${DTRACE_CFLAGS} > ${MAKE} -V CFILES_LINUXKPI | \ > CC=3D"${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp \ > ${CFLAGS} ${LINUXKPI_INCLUDES} > ${MAKE} -V CFILES_OFED -V CFILES_MLX5 | \ > CC=3D"${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp \ > ${CFLAGS} ${OFEDINCLUDES} > # Assembly files > ${MAKE} -V SFILES_NORMAL | \ > CC=3D"${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${ASM_C= FLAGS} > ${MAKE} -V SFILES_CDDL | \ > CC=3D"${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_A= SM_CFLAGS} > mv ${.TARGET}.tmp ${.TARGET} > .else > { \ > echo '.for __dependfile in $${DEPENDFILES_OBJS}'; \ > echo '.sinclude "$${__dependfile}"'; \ > echo '.endfor'; \ > } > ${.TARGET} > .endif (the for loop is a pending fix for the .depend issue) sys/conf/kern.pre.mk > .if ${MK_FAST_DEPEND} =3D=3D "no" && (make(depend) || make(kernel-depen= d)) =20 >=20 > # This hack lets us use the ipfilter code without spamming a new > # include path into contrib'ed source files. > INCLUDES+=3D -I$S/contrib/ipfilter >=20 > # ... and the same for ath > INCLUDES+=3D -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath= _hal >=20 > # ... and the same for the NgATM stuff > INCLUDES+=3D -I$S/contrib/ngatm >=20 > # ... and the same for vchiq > INCLUDES+=3D -I$S/contrib/vchiq >=20 > # ... and the same for twa > INCLUDES+=3D -I$S/dev/twa >=20 > # ... and the same for cxgb and cxgbe > INCLUDES+=3D -I$S/dev/cxgb -I$S/dev/cxgbe >=20 > .endif As for world, it is far larger and impacts ports. So I am still taking it slow there. I do want to enable it by default and make the same decisions there in the future. --=20 Regards, Bryan Drewery --KhfkIiPlw1xAunSpK83XREa2G5lOqUEHn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWqRoeAAoJEDXXcbtuRpfP+fcH/3meIRYw8XDg90LHLR7/kobr u0P+PBH1r4Ux9kR8PebwGu1k8sB3q9YZWyQBL8Izy8FwGqO+v+toGYwX1R9EiSA2 7cgy/Q1uzs5vxnXSVl2gkmWIHBFEExWFy84rJPC6gSLS1nLAf2KSEmpKo7WvZKx5 Q6hif3yeh7UFPqAh5lZ1Fp8w+CK3bUm2EsfbjV5O53oyX0GNuewJ0WTXE7G9wOfO XijzZXdVms+yBCNpHKh7WCjuEDKdi8QzVnaOO2SP1zUSM7rBMRvZPbMG/9JDcIg2 2bGZ/dDpEYIdH5nBpx/ixR3njF/2Q1E7JbHxy3iYxDhjJPEqvBfdvpCsHf63MlQ= =cSh6 -----END PGP SIGNATURE----- --KhfkIiPlw1xAunSpK83XREa2G5lOqUEHn--