[m-rev.] for review: reduce link time in debug grades

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Oct 20 02:47:07 AEDT 2009

On Mon, 19 Oct 2009, Zoltan Somogyi wrote:

> I have asked Julien to measure how long linking takes on Snow Leopard before
> this diff, so we can see whether this diff improves link times as intended,
> and so, by how much.

As it turns out linking is only one of the problems on Snow Leopard.
Compilation in debugging grades, e.g. none.gc.debug, on Mac OS 10.6, can
be summarised in one word: ouch!

Compiling the .c files into .o files in none.gc.debug is taking forever.

Doing: time mmake from the top-level of a freshly checked out workspace
on eris in grade none.gc.debug took

     real    227m23.884s
     user    67m13.706s
     sys     38m3.656s

to get _only_ as far as compiling io.c from the standard library, i.e. 
this step:

     ../scripts/mgnuc --grade none.gc.debug --no-ansi -- -c io.c -o io.o

I killed it after this point - nearly all of the time is being spent
compiling C to object code; compiling Mercury to C contributes very
little to the overall time.

In contrast, building the entire (e.g. library, compiler, profilers etc) system
from scratch on goliath in grade none.gc.debug took

     real    40m43.229s
     user    36m37.181s
     sys     3m39.522s

Repeating the above, i.e. building the entire system to completion, with
grade none.gc on eris yields:

     real    50m6.766s
     user    46m13.516s
     sys     3m35.396s

(goliath is faster here, even with the .debug grade and despite being
slower than eris, mainly because its Mercury compiler is built in the
asm_fast.gc grade whereas eris's is none.gc.)

These excessive compilation times are new with 10.6; it was certainly
never this bad with Mac OS 10.5 -- that said, they were never
particularly good on it either.

I have set the none.gc.debug build going on eris again and will let it
run overnight.  Once the object files for the library have been created
I will measure the linking time for it separately.

If I can get pjs's laptop for long enough I will also time building the
library in none.gc.debug on 10.5.

mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au

More information about the reviews mailing list