Ted's PGO build

Discussion of third-party/unofficial Firefox/Thunderbird/SeaMonkey builds.
mmoy
Posts: 5030
Joined: February 17th, 2004, 9:05 pm
Location: New Hampshire
Contact:

Post by mmoy »

Has anyone tried PGO for Mac OSX using GCC?

I downloaded ICC for Windows and was only able to get a good build with optimization turned off. I was going to try to find the problem areas but didn't have the time and the trial license expired. I have two VS2005 licenses and I'm not crazy about spending more to purchase upgrade licenses to VS2008 though I may ask our son to get the free VS2005 and VS2008 Pro editions (he's a student).
Dell E521 X2 5600+ MacBookPro 17'' 2.5 Ghz Penryn Dell M1330 2.0 Ghz Merom 4 GB Vista x64 Compaq r3000z AMD 64 3200+ (Win 32/64) PowerMac G5 1.8 Ghz MMOY-1.5 (OSX 10) Inspiron 8500, 4100, 4000, Dimension 2300 MacBook Pro 2.2 Ghz HP E6600 HP X2 4400+
mmoy
Posts: 5030
Joined: February 17th, 2004, 9:05 pm
Location: New Hampshire
Contact:

Post by mmoy »

I read the PGO directions (Ted probably wrote these) and gave it a try on Mac OSX and it bombed. I assume that it's some amount of work to get this going and it sounds like it's just easier to use ICC for Mac OSX to get better performance.
Dell E521 X2 5600+ MacBookPro 17'' 2.5 Ghz Penryn Dell M1330 2.0 Ghz Merom 4 GB Vista x64 Compaq r3000z AMD 64 3200+ (Win 32/64) PowerMac G5 1.8 Ghz MMOY-1.5 (OSX 10) Inspiron 8500, 4100, 4000, Dimension 2300 MacBook Pro 2.2 Ghz HP E6600 HP X2 4400+
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Post by Ted Mielczarek »

We had a lot of issues using PGO on icc. The patches I checked in support it, but it never worked for me. We had some Intel engineers looking into it, and we'll probably revisit it in the Moz 2 timeframe.
User avatar
mahowi
Posts: 569
Joined: September 16th, 2005, 12:37 pm
Location: Germany
Contact:

Post by mahowi »

I tried a PGO build according to your doc. Build works fine. I can start Fx from my build directory without problems. But if I install it and start as normal user (non-Admin) I get an error, that "pgort90.dll" is missing.
I did my build with VS2008 on Vista32 SP1.
Firefox: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9pre) Gecko/2008052316 Firefox/3.0pre (mahowi) ID:2008052316
Thunderbird: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9pre) Gecko/2008052904 Thunderbird/3.0a2pre ID:2008052904
mmoy
Posts: 5030
Joined: February 17th, 2004, 9:05 pm
Location: New Hampshire
Contact:

Post by mmoy »

Sometimes I have to start it twice to get it to work. It seems to work fine after that.
Dell E521 X2 5600+ MacBookPro 17'' 2.5 Ghz Penryn Dell M1330 2.0 Ghz Merom 4 GB Vista x64 Compaq r3000z AMD 64 3200+ (Win 32/64) PowerMac G5 1.8 Ghz MMOY-1.5 (OSX 10) Inspiron 8500, 4100, 4000, Dimension 2300 MacBook Pro 2.2 Ghz HP E6600 HP X2 4400+
User avatar
mahowi
Posts: 569
Joined: September 16th, 2005, 12:37 pm
Location: Germany
Contact:

Post by mahowi »

firefox.exe seems to be linked with pgort90.dll. pgort90.dll lies in "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin". So I can start firefox.exe out of my build environment, because it's in my PATH. But in a normal installation, pgort90.dll is not in the PATH. I could copy it into the Fx installation directory, but I don't think, this DLL should be linked.

My .mozconfig:

Code: Select all

export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
export LDFLAGS="-LTCG -MANIFESTUAC:NO"
export MOZ_OPTIMIZE_LDFLAGS="-OPT:REF -LTCG"

mk_add_options BUILD_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options LDFLAGS="-LTCG -MANIFESTUAC:NO"
mk_add_options MOZ_OPTIMIZE_LDFLAGS="-OPT:REF,ICF -LTCG"
mk_add_options MOZ_MAKE_FLAGS=-j2

ac_add_options --enable-optimize="-O2 -GALFT -GS- -Gs -Zc:wchar_t- -fp:fast -arch:SSE2"
ac_add_options --enable-static
ac_add_options --disable-shared
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --disable-mochitest
ac_add_options --enable-strip
ac_add_options --enable-strip-libs
ac_add_options --disable-libxul
# ac_add_options --enable-official-branding
ac_add_options --with-distribution-id=com.mahowi

# atlbase.h
#ac_add_options --disable-xpconnect-idispatch
#ac_add_options --disable-activex
#ac_add_options --disable-activex-scripting
#ac_add_options --disable-accessibility

mk_add_options MOZ_OBJDIR='/builddir/obj-@CONFIG_GUESS@'
mk_add_options MOZ_BUILD_PROJECTS="browser mail"
mk_add_options MOZ_CO_PROJECT="browser mail"
mk_add_options MOZ_CO_MODULE="mozilla/other-licenses/bsdiff mozilla/tools/update-packaging"
mk_add_options MOZ_CO_LOCALES="de"

mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_BUILD_ROOT)/_profile/pgo/profileserver.py'
ac_add_options --enable-profile-guided-optimization
ac_add_options --with-windows-version=501
ac_add_options --enable-canvas
ac_add_options --enable-crypto
ac_add_options --enable-svg
ac_add_options --enable-update-packaging
ac_add_options --enable-installer
ac_add_options --enable-single-profile
ac_add_options --disable-profilesharing

ac_add_app_options browser --enable-application=browser
ac_add_app_options browser --enable-extensions=default,xforms,schema-validation
ac_add_app_options browser --disable-mailnews
ac_add_app_options browser --disable-composer
ac_add_app_options browser --enable-safe-browsing
ac_add_app_options browser --with-branding=mahowi/branding/firefox

ac_add_app_options mail --enable-application=mail
ac_add_app_options mail --enable-plugins
ac_add_app_options mail --with-branding=mahowi/branding/thunderbird


Is there any way to do a PGO build without linking against pgort90.dll?
Firefox: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9pre) Gecko/2008052316 Firefox/3.0pre (mahowi) ID:2008052316
Thunderbird: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9pre) Gecko/2008052904 Thunderbird/3.0a2pre ID:2008052904
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Post by Ted Mielczarek »

FWIW, you have a lot of junk in your mozconfig.

The PGO build links with the PGO DLL during the first pass, because it builds an instrumented binary. After running the instrumented binary, in the second pass the build is re-linked, and should not link with that DLL. The official Win32 nightlies are built in this manner, and they don't require that DLL.
User avatar
mahowi
Posts: 569
Joined: September 16th, 2005, 12:37 pm
Location: Germany
Contact:

Post by mahowi »

Yes, I know there are some unneeded options in my .mozconfig. I have to do some cleanup.

I haven't been at my computer while the build ran. So I have to check, if the relinking worked. As far as I could see, there was no error message.
Firefox: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9pre) Gecko/2008052316 Firefox/3.0pre (mahowi) ID:2008052316
Thunderbird: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9pre) Gecko/2008052904 Thunderbird/3.0a2pre ID:2008052904
swiftweasel
Posts: 1
Joined: June 8th, 2008, 10:20 am

Post by swiftweasel »

During the generating of the profile, what types of sites and actions are advised to produce the fastest build?
User avatar
loadbang
Posts: 874
Joined: November 3rd, 2003, 12:18 pm
Location: Birmingham, UK.

Post by loadbang »

I like to visit a few "web 2.0" sites with AJAX, then run sunspider for good measure.

Depends on what you like to browse.
User avatar
tqft
Posts: 1232
Joined: April 22nd, 2003, 11:57 pm

Post by tqft »

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008060917 Minefield/3.0pre ID:2008060917

Adblock Plus 0.7.5.4
Console² 0.3.9.2
Flashblock 1.5.6
Nightly Tester Tools 2.0.2
Spectator 2a9

Sweeeeeeeeeeeeeeeet!

PGO builds and runs

I started, logged into gmail and closed.
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Post by Ted Mielczarek »

For reference, the official nightlies currently just start the browser and then shut it down. We haven't really tested further profiling yet.
User avatar
tqft
Posts: 1232
Joined: April 22nd, 2003, 11:57 pm

Post by tqft »

It hates me today
/media/sdb2/mozilla/mozilla/netwerk/cookie/src/nsCookie.cpp:1: warning: ‘nsCookie.gcda’ is version ‘401p’, expected version ‘402p’
make[8]: *** [nsCookie.o] Error 1

Same command sequence as the other day
User avatar
tqft
Posts: 1232
Joined: April 22nd, 2003, 11:57 pm

Re: Ted's PGO build

Post by tqft »

I found the problem some idiot (me) forgot to update something - no idea how it managed to work the first time - but have built and am running suiterunner
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008061619 SeaMonkey/2.0a1pre ID:2008061619

So ff should work - is building as I type

Edit 5.21pm my time 17/6/2008
ff pgo working - trying a tb build now
dhave
Posts: 3
Joined: March 8th, 2007, 10:04 pm

Re: Ted's PGO build

Post by dhave »

@Ted: Do you have a FF3 PGO'd build for Linux x86_64? I tried to build one myself but failed.

Thank you very much.
Post Reply