Figure out why building jemalloc breaks with PGO enabled

RESOLVED FIXED in Firefox 54

Status

RESOLVED FIXED
11 years ago
9 months ago

People

(Reporter: ted, Assigned: dmajor)

Tracking

Trunk
mozilla54
x86
Linux

Firefox Tracking Flags

(firefox54 fixed)

Details

Attachments

(1 attachment)

See bug 418866 comment 6 for error details.  We're just going to disable this for the time being, but we should figure out why it breaks.

Comment 1

11 years ago
My first guess is that profile-guided optimization (PGO) is being tripped up by the use of thread-local storage (TLS).  If so, this is a compiler bug.
Jason: If you'd like to test this yourself, you can add this line to your mozconfig:
mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'

And then build using |make -f client.mk profiledbuild|. We're using GCC 4.1.1 (+ Redhat patches) on trunk:
http://wiki.mozilla.org/ReferencePlatforms/Linux-CentOS-5.0#Make_GCC_4.1_.28redhat_branch.29
Also, for reference, I didn't see this on x86-64 with gcc 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
Taras, we currently have PGO disabled for jemalloc. Can you see if this is still a problem with a modern GCC? It's just a matter of removing the NO_PROFILE_GUIDED_OPTIMIZE here:
http://mxr.mozilla.org/mozilla-central/source/memory/jemalloc/Makefile.in#135

Comment 5

9 years ago
This is still busted in 4.5. Haven't had a chance to check why.

Updated

8 years ago
Blocks: 586962
(Assignee)

Comment 6

2 years ago
Created attachment 8839003 [details] [diff] [review]
re-enable

Looks fine now: https://treeherder.mozilla.org/#/jobs?repo=try&revision=36ee285db1171d5aa813f29a28154ec20cea546c
Assignee: nobody → dmajor
Attachment #8839003 - Flags: review?(mh+mozilla)
Attachment #8839003 - Flags: review?(mh+mozilla) → review+

Comment 7

2 years ago
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/972714aa03b2
Re-enable PGO for Linux mozjemalloc. r=glandium

Comment 8

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/972714aa03b2
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54

Updated

9 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.