Date: Fri, 4 Dec 2015 10:20:23 -0800 From: Bryan Drewery <bdrewery@FreeBSD.org> To: John Baldwin <jhb@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291744 - in head/sys: conf modules Message-ID: <5661D967.2030108@FreeBSD.org> In-Reply-To: <2092924.RITcBJdNZd@ralph.baldwin.cx> References: <201512040427.tB44RL8S067654@repo.freebsd.org> <2092924.RITcBJdNZd@ralph.baldwin.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On 12/4/2015 9:50 AM, John Baldwin wrote: > On Friday, December 04, 2015 04:27:21 AM Bryan Drewery wrote: >> Author: bdrewery >> Date: Fri Dec 4 04:27:21 2015 >> New Revision: 291744 >> URL: https://svnweb.freebsd.org/changeset/base/291744 >> >> Log: >> Calculate MPATH for sys/modules to save 92% time in a basic 'obj' tree-walk. >> >> Sponsored by: EMC / Isilon Storage Division >> >> Modified: >> head/sys/conf/kmod.mk >> head/sys/modules/Makefile >> >> Modified: head/sys/conf/kmod.mk >> ============================================================================== >> --- head/sys/conf/kmod.mk Fri Dec 4 03:54:18 2015 (r291743) >> +++ head/sys/conf/kmod.mk Fri Dec 4 04:27:21 2015 (r291744) >> @@ -370,8 +370,10 @@ vnode_if_typedef.h: >> .endif >> >> # Build _if.[ch] from _if.m, and clean them when we're done. >> +# This is duplicated in sys/modules/Makefile. >> .if !defined(__MPATH) >> __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m >> +.export __MPATH >> .endif >> _MFILES=${__MPATH:T:O} >> _MPATH=${__MPATH:H:O:u} > > It's also duplicated in sys/conf/kern.pre.mk which uses this to export it: > > # Calculate path for .m files early, if needed. > .if !defined(__MPATH) > __MPATH!=find ${S:tA}/ -name \*_if.m > .endif > .... > MKMODULESENV+= __MPATH="${__MPATH}" > Ah. I do want to consolidate this logic. Further I want to only generate these files *ONCE* and not for every sub-directory that needs them. It's on my list to tackle soon. I'll put that one out for review. > So, the comment should probably reference the two other places that will pass > an __MPATH down (kern.pre.mk and sys/modules/Makefile). > > Note though that you should only be seeing this if you are building modules > outside of a kernel build (e.g. MODULES_WITH_WORLD). modules built as part of > a kernel build will inherit __MPATH from kern.pre.mk. > > When I ran a buildkernel with truss -af and grepp'd for all the execve's of > /usr/bin/find I only found about 6 for a GENERIC kernel, so I believe that > the kern.pre.mk bits were working already. > I've been running a lot of manual builds against sys/modules to verify various changes. I actually have not been running buildworld much lately. -- Regards, Bryan Drewery [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWYdlnAAoJEDXXcbtuRpfP7okIAKtWVMYJgGCMViWih+YM9ZpV 0nRn7jT4qsog+Eli7A+86XgmAYMlsZvrJvxexPMGwL3mIjeqL7yed7VI44450NjQ RlPbBgxOjUKGxnEiP8F+oO4RbuNRr70XIDW3vPkOPVp+bz7phnXkQYPVFhR0hYBi PPHH8KKBOOXGZvoQNHXuc/xqSrlHCIjGwPomnKeXolrAIjMnSCe7juMKspizui5c OLB/qxuAVY+Wt31llKkhQ+j/OFq+00K/c9OfN3bZt4giYI93kTd9AcnMP+7tnYd1 +9nWEng+2QgtYpKg8Zj139kBCP3yw016y2EpgWIxCn4g35qgaKGmw2VLtjY3bgI= =5w1l -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5661D967.2030108>
