Saturday, October 4, 2008

Building Mozilla Using Gold Linker

Earlier, I saw on the Contrib Opportunities page that they wanted someone to test out the Gold Linker with the Mozilla build. Since I had to build, build, and build some more on Mozilla, I thought I might as well build it with the gold linker and test it for them. So after I've got all the necessary components installed, I tested the build with and without the gold linker on Ubuntu in my VirtualBox.

My machine is a 2.0 GHz Duo, with 4GB ram, and a 7200rpm Harddrive running Windows Vista Business edition. The profile I set for Ubuntu on VirtualBox is 1G Ram. In the .mozconfig file, I had the following settings:

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-@CONFIG_GUESS@
ac_add_options --enable-application=browser
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_MAKE FLAGS=-j5
ac_add_options --disable-ogg


And the build times - all from scratch - I've got was this:

With Gold Linker (2 runs)
Real 48m 03.693s 44m 57.422s
User 23m 57.074s 18m 49.275s
Sys 21m 46.282s 23m 12.551

Without Gold Linker (2 runs)
Real 42m 50.664s 47m 31.936s
User 17m 26.149s 32m 35.010s
Sys 23m 39.225s 12m 24.479s


I hope this helps Dave and Ted.

2 comments:

Ted Mielczarek said...

Interesting results, thanks for running this test! It might be interesting to share this with the folks who wrote the gold linker to see what they think.

Unknown said...

Nice results. It is really good to see more people testing gold on large projects. If you didn't do it yet, perhaps you could post your results on the binutils mailing list. I posted there with results for running the Oracle install. Since all the gold contributors tend to read that list, it is a nice place to post feedback like this.