Closed Bug 590179 Opened 14 years ago Closed 14 years ago

Enable -fomit-frame-pointer for the full build on OS X

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(blocking2.0 -)

RESOLVED FIXED
mozilla2.0b5
Tracking Status
blocking2.0 --- -

People

(Reporter: sayrer, Assigned: bzbarsky)

References

Details

Attachments

(1 file, 1 obsolete file)

bug 492688 turned this on for the JS engine.
This is a noticeable speedup on some dromaeo tests (we're talking things like 10% improvement).
blocking2.0: --- → ?
Attached patch Proposed patch (obsolete) — Splinter Review
Pretty straightforward change; the only weirdness is the xptcall stuff, which the comments explain. If we don't want to do this, I'll probably start adding to some MODULE_OPTIMIZE_FLAGS, since this is a noticeable win in some code...
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #469763 - Flags: review?(ted.mielczarek)
(In reply to comment #2) > If we don't want to do this, I'll probably start adding to some > MODULE_OPTIMIZE_FLAGS, since this is a noticeable win in some code... Doing this across the board (even with a little ugliness in xptcall) is far better than sprinkling ifdefed MODULE_OPTIMIZE_FLAGS across the codebase.
Comment on attachment 469763 [details] [diff] [review] Proposed patch I can't see how an extra register would be anything but a win everywhere.
Attachment #469763 - Flags: review?(ted.mielczarek) → review+
Comment on attachment 469763 [details] [diff] [review] Proposed patch a=beltzner
Attachment #469763 - Flags: approval2.0+
Not sure I'd block on this if it turned out to cause regressions, but definitely approved for landing!
blocking2.0: ? → -
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment on attachment 469763 [details] [diff] [review] Proposed patch >+# If we compile xptcinvoke_unixish_x86.cpp with -fomit-frame-pointer >+# we end up crashing on startup, presumably because of the %esp munging we do when KEEP_STACK_16_BYTE_ALIGNED. So let's not use that flag here. >+MODULE_OPTIMIZE_FLAGS=-03 "its -O3 the letter, not -03 the number". (http://funroll-loops.info/) I'm surprised this didn't warn... (or asplode.)
It probably did warn, but warnings are hard to see.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
And yes, it turned all of Mac runs orange.
> It probably did warn, but warnings are hard to see. Without the patch: mozilla% make -C ../obj-firefox-opt/xpcom/reflect/xptcall/src/md/unix/ | & grep warning | sed 's/.*:[0-9]*://' | sort -u warning: ‘saved_esp’ is used uninitialized in this function With the patch: mozilla% make -C ../obj-firefox-opt/xpcom/reflect/xptcall/src/md/unix/ | & grep warning | sed 's/.*:[0-9]*://' | sort -u warning: ‘saved_esp’ is used uninitialized in this function So no, it did not warn. My apologies for the orange; I did also kick off a try server build last night, meaning to check it before pushing today, but it didn't have results before I had to go to bed. It's obviously orange too. I should have mentioned that in the bug; I wasn't expecting someone else to push the patch for me. :( Looking into the failures.
OK, looks like I failed to actually test my final patch, after moving that MODULE_OPTIMIZE_FLAGS into the ifdef. Seems like MODULE_OPTIMIZE_FLAGS needs to be before the config.mk include to work here?
Yeah, indeed, since config.mk is what looks at that variable. Made a change to fix that locally and pushed to try.
Attached patch Like soSplinter Review
Attachment #469763 - Attachment is obsolete: true
Attachment #469918 - Flags: review?(ted.mielczarek)
Attachment #469918 - Flags: review?(ted.mielczarek) → review+
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
Target Milestone: --- → mozilla2.0b5
Talos data: Improvement: Dromaeo (CSS) increase 3.67% on MacOSX 10.6.2 Firefox Improvement: Dromaeo (DOM) increase 5.64% on MacOSX 10.6.2 Firefox Improvement: Txul decrease 2.94% on MacOSX 10.6.2 Firefox
Blocks: 591614
Depends on: 593467
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: