Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jan 2016 22:08:51 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r294104 - in head: share/mk sys/conf
Message-ID:  <201601152208.u0FM8pPP093288@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Fri Jan 15 22:08:51 2016
New Revision: 294104
URL: https://svnweb.freebsd.org/changeset/base/294104

Log:
  FAST_DEPEND: Rework optimization for r290524.
  
  The .MAKEFLAGS check inside of the .for loop is extremely slow for some
  reason.  Just moving it out of the loop trimmed -V lookup time from 11
  seconds to 1 second in the kernel obj directory.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.dep.mk
  head/sys/conf/kern.post.mk

Modified: head/share/mk/bsd.dep.mk
==============================================================================
--- head/share/mk/bsd.dep.mk	Fri Jan 15 21:59:18 2016	(r294103)
+++ head/share/mk/bsd.dep.mk	Fri Jan 15 22:08:51 2016	(r294104)
@@ -170,12 +170,12 @@ DEPENDSRCS=	${SRCS:M*.[cSC]} ${SRCS:M*.c
 .if !empty(DEPENDSRCS)
 DEPENDOBJS+=	${DEPENDSRCS:R:S,$,.o,}
 .endif
-.for __obj in ${DEPENDOBJS:O:u}
+DEPENDFILES_OBJS=	${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./}
 .if ${.MAKEFLAGS:M-V} == ""
-.sinclude "${DEPENDFILE}.${__obj:${DEPEND_FILTER}}"
-.endif
-DEPENDFILES_OBJS+=	${DEPENDFILE}.${__obj:${DEPEND_FILTER}}
+.for __depend_obj in ${DEPENDFILES_OBJS}
+.sinclude "${__depend_obj}"
 .endfor
+.endif
 .endif	# ${MK_FAST_DEPEND} == "yes"
 .endif	# defined(SRCS)
 

Modified: head/sys/conf/kern.post.mk
==============================================================================
--- head/sys/conf/kern.post.mk	Fri Jan 15 21:59:18 2016	(r294103)
+++ head/sys/conf/kern.post.mk	Fri Jan 15 22:08:51 2016	(r294104)
@@ -206,12 +206,12 @@ DEPEND_CFLAGS+=	-MD -MP -MF.depend.${.TA
 DEPEND_CFLAGS+=	-MT${.TARGET}
 CFLAGS+=	${DEPEND_CFLAGS}
 DEPENDOBJS+=	${SYSTEM_OBJS}
-.for __obj in ${DEPENDOBJS:O:u}
+DEPENDFILES_OBJS=	${DEPENDOBJS:O:u:C/^/.depend./}
 .if ${.MAKEFLAGS:M-V} == ""
-.sinclude ".depend.${__obj}"
-.endif
-DEPENDFILES_OBJS+=	.depend.${__obj}
+.for __depend_obj in ${DEPENDFILES_OBJS}
+.sinclude "${__depend_obj}"
 .endfor
+.endif
 .endif	# ${MK_FAST_DEPEND} == "yes"
 
 .NOPATH: .depend ${DEPENDFILES_OBJS}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601152208.u0FM8pPP093288>