From owner-svn-src-all@freebsd.org Fri Jan 15 22:08:52 2016 Return-Path: Delivered-To: svn-src-all@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 C1082A83C17; Fri, 15 Jan 2016 22:08:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74C99122B; Fri, 15 Jan 2016 22:08:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0FM8p9G093290; Fri, 15 Jan 2016 22:08:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0FM8pPP093288; Fri, 15 Jan 2016 22:08:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201601152208.u0FM8pPP093288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 15 Jan 2016 22:08:51 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2016 22:08:52 -0000 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}