[CFT/RFC]: refactor bsd.prog.mk to understand multiple programs instead of a singular program

Garrett Cooper yanegomi at gmail.com
Sun Sep 23 04:12:49 UTC 2012


On Sun, Sep 2, 2012 at 11:01 PM, Garrett Cooper <yanegomi at gmail.com> wrote:
> Hello,
>     I've been a bit busy working on porting over ATF from NetBSD, and
> one of the pieces that's currently not available in FreeBSD that's
> available in NetBSD is the ability to understand and compile multiple
> programs. In order to do this I had to refactor bsd.prog.mk (a lot).
> The attached patch is the end result so far, and I was wondering if
> anyone could please review it and/or test it (outside of me doing so).
> I wrote over 40 tests, but it's not exercising everything, and I would
> like for someone to please review/test this out who has an interest in
> NLS support (ala bsd.nls.mk) in particular. AFAICT this is the only
> gap that I couldn't resolve right away (there isn't a ton of recent
> documentation on how to use bsd.nls.mk).
>     I'll run a micro benchmark and buildworld a few times (in
> progress) with and without the change to measure the performance
> effect.
>     Any assistance would be much appreciated.

    I've attached an updated version of the patch (run through
buildworld successfully multiple times; make universe successfully;
going to submit for an -exp run). I needed to modify bsd.crunchgen.mk
to grok OBJS.${PROG}, but apart from that backwards compatibility has
been maintained -- sans-INSTALLFLAGS_EDIT (does anyone still use that
undocumented functionality?).
    Performance wise, it's slightly slower on my W3520 with the
change, but not by much (~20 seconds).
    As always, questions and comments are welcome, and if someone has
a chance, please review the proposed patch.
Thanks!
-Garrett

Without the change:

$ python calc_runtime.py bw.*_without.log | ministat -w 72
x <stdin>
+------------------------------------------------------------------------+
|     x                                                                  |
|x    x  x          x                     x         xx      x           x|
|     |_________________________A_________M________________|             |
+------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  10           919          1010           972         958.9     33.994934

With the change:

$ python calc_runtime.py bw.*.log | ministat -w 72
x <stdin>
+------------------------------------------------------------------------+
|                                                       x                |
|xx       x            x      x                         x  x           xx|
|         |___________________________A_________________M_________|      |
+------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  10           940          1002           988         972.3     24.476973

make universe results:

# make universe MAKE_JUST_WORLDS=y
--------------------------------------------------------------
>>> make universe started on Tue Sep 18 09:30:04 PDT 2012
--------------------------------------------------------------
>> amd64 started on Tue Sep 18 09:30:04 PDT 2012
>> amd64.amd64 buildworld started on Tue Sep 18 09:30:04 PDT 2012
>> amd64.amd64 buildworld completed on Tue Sep 18 11:20:19 PDT 2012
>> amd64 completed on Tue Sep 18 11:20:19 PDT 2012
>> arm started on Tue Sep 18 11:20:19 PDT 2012
>> arm.arm buildworld started on Tue Sep 18 11:20:19 PDT 2012
>> arm.arm buildworld completed on Tue Sep 18 12:25:24 PDT 2012
>> arm.armeb buildworld started on Tue Sep 18 12:25:24 PDT 2012
>> arm.armeb buildworld completed on Tue Sep 18 13:30:25 PDT 2012
>> arm.armv6 buildworld started on Tue Sep 18 13:30:25 PDT 2012
>> arm.armv6 buildworld completed on Tue Sep 18 14:35:14 PDT 2012
>> arm.armv6eb buildworld started on Tue Sep 18 14:35:14 PDT 2012
>> arm.armv6eb buildworld completed on Tue Sep 18 15:40:05 PDT 2012
>> arm completed on Tue Sep 18 15:40:05 PDT 2012
>> i386 started on Tue Sep 18 15:40:05 PDT 2012
>> i386.i386 buildworld started on Tue Sep 18 15:40:05 PDT 2012
>> i386.i386 buildworld completed on Tue Sep 18 16:56:06 PDT 2012
>> i386 completed on Tue Sep 18 16:56:06 PDT 2012
>> ia64 started on Tue Sep 18 16:56:06 PDT 2012
>> ia64.ia64 buildworld started on Tue Sep 18 16:56:06 PDT 2012
>> ia64.ia64 buildworld completed on Tue Sep 18 18:27:49 PDT 2012
>> ia64 completed on Tue Sep 18 18:27:49 PDT 2012
>> mips started on Tue Sep 18 18:27:49 PDT 2012
>> mips.mipsel buildworld started on Tue Sep 18 18:27:49 PDT 2012
>> mips.mipsel buildworld completed on Tue Sep 18 19:34:50 PDT 2012
>> mips.mips buildworld started on Tue Sep 18 19:34:50 PDT 2012
>> mips.mips buildworld completed on Tue Sep 18 20:41:49 PDT 2012
>> mips.mips64el buildworld started on Tue Sep 18 20:41:49 PDT 2012
>> mips.mips64el buildworld completed on Tue Sep 18 21:49:21 PDT 2012
>> mips.mips64 buildworld started on Tue Sep 18 21:49:21 PDT 2012
>> mips.mips64 buildworld completed on Tue Sep 18 22:57:13 PDT 2012
>> mips.mipsn32 buildworld started on Tue Sep 18 22:57:13 PDT 2012
>> mips.mipsn32 buildworld completed on Wed Sep 19 00:04:43 PDT 2012
>> mips completed on Wed Sep 19 00:04:43 PDT 2012
>> pc98 started on Wed Sep 19 00:04:43 PDT 2012
>> pc98.i386 buildworld started on Wed Sep 19 00:04:43 PDT 2012
>> pc98.i386 buildworld completed on Wed Sep 19 01:20:42 PDT 2012
>> pc98 completed on Wed Sep 19 01:20:42 PDT 2012
>> powerpc started on Wed Sep 19 01:20:42 PDT 2012
>> powerpc.powerpc buildworld started on Wed Sep 19 01:20:42 PDT 2012
>> powerpc.powerpc buildworld completed on Wed Sep 19 02:37:34 PDT 2012
>> powerpc.powerpc64 buildworld started on Wed Sep 19 02:37:34 PDT 2012
>> powerpc.powerpc64 buildworld completed on Wed Sep 19 04:28:10 PDT 2012
>> powerpc completed on Wed Sep 19 04:28:10 PDT 2012
>> sparc64 started on Wed Sep 19 04:28:10 PDT 2012
>> sparc64.sparc64 buildworld started on Wed Sep 19 04:28:10 PDT 2012
>> sparc64.sparc64 buildworld completed on Wed Sep 19 05:42:30 PDT 2012
>> sparc64 completed on Wed Sep 19 05:42:30 PDT 2012
--------------------------------------------------------------
>>> make universe completed on Wed Sep 19 05:42:30 PDT 2012
                      (started Tue Sep 18 09:30:04 PDT 2012)
--------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: share-mk-bsd-prog-mk-CURRENT.patch
Type: application/octet-stream
Size: 22233 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20120923/71f5145a/share-mk-bsd-prog-mk-CURRENT.obj


More information about the freebsd-hackers mailing list