Closed Bug 1315939 Opened 8 years ago Closed 8 years ago

Make mozjemalloc and jemalloc use FINAL_LIBRARY = 'memory'

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox52 fixed)

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: ehoogeveen, Assigned: ehoogeveen)

References

Details

Attachments

(1 file, 1 obsolete file)

In bug 1309573 I had to add defines to mozjemalloc and jemalloc to give them access to the crash report crash reason, but they should just get it from libmemory.
This seems to work just fine. To explain the conditional in memory/jemalloc/moz.build, I did this because [1] causes jemalloc4 to be built on Nightly even if it's not enabled (I think this is the point, to make sure the build doesn't break, but I could be wrong). Using FINAL_LIBRARY in this case causes duplicate symbol errors. Build only Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d9fcc153c372281e2bc1a3de0597f4c3f4a76d4c Opt build only jemalloc4 Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b0d5a03cc6d44a489bb6e4bb3ab7e60448b545df [1] https://dxr.mozilla.org/mozilla-central/rev/783356f1476eafd8e4d6fa5f3919cf6167e84f8d/memory/moz.build#21
Assignee: nobody → emanuel.hoogeveen
Status: NEW → ASSIGNED
Attachment #8809231 - Flags: review?(mh+mozilla)
Comment on attachment 8809231 [details] [diff] [review] Use FINAL_LIBRARY = 'memory' in jemalloc and mozjemalloc. Review of attachment 8809231 [details] [diff] [review]: ----------------------------------------------------------------- ::: memory/jemalloc/moz.build @@ +50,5 @@ > > +if CONFIG['MOZ_JEMALLOC4']: > + FINAL_LIBRARY = 'memory' > +else: > + FORCE_STATIC_LIB = True actually, FORCE_STATIC_LIB is useless, so you can just remove it. It would also probably be more explicit if we made the else clause do FINAL_LIBRARY = 'replace_jemalloc' and remove the USE_LIBS in memory/replace/jemalloc/moz.build instead. ::: memory/mozjemalloc/moz.build @@ +11,5 @@ > if not CONFIG['MOZ_JEMALLOC4']: > SOURCES += [ > 'jemalloc.c', > ] > Library('mozjemalloc') with FINAL_LIBRARY set, assuming nothing else has mozjemalloc in a USE_LIBS, this can be removed. Same can be said about Library('jemalloc'), in fact.
Attachment #8809231 - Flags: review?(mh+mozilla)
Thanks! This is a definite improvement. Try runs: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2db97d864ef64d8c2a94ba9e4f5b09d8ebb3f7fc (mozjemalloc) https://treeherder.mozilla.org/#/jobs?repo=try&revision=94a344bf183e3afd5792e1c0d1ec33aba0358a29 (jemalloc4) (In reply to Mike Hommey [:glandium] from comment #2) > > + FORCE_STATIC_LIB = True > > actually, FORCE_STATIC_LIB is useless, so you can just remove it. > > It would also probably be more explicit if we made the else clause do > FINAL_LIBRARY = 'replace_jemalloc' and remove the USE_LIBS in > memory/replace/jemalloc/moz.build instead. Aha, I didn't realize that FINAL_LIBRARY is enough on its own. This is indeed much better. > ::: memory/mozjemalloc/moz.build > > Library('mozjemalloc') > > with FINAL_LIBRARY set, assuming nothing else has mozjemalloc in a USE_LIBS, > this can be removed. Same can be said about Library('jemalloc'), in fact. Done. I also noticed while going through the list that memory/build/moz.build still had the now redundant USE_LIBS in it.
Attachment #8809231 - Attachment is obsolete: true
Attachment #8809394 - Flags: review?(mh+mozilla)
Attachment #8809394 - Flags: review?(mh+mozilla) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/13ed22321146 Use FINAL_LIBRARY = 'memory' in jemalloc and mozjemalloc. r=glandium
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: